Weblogic-cmp-jar.xml and EJB 1.1

I am working on migrating a number of components from JBoss to WebLogic 10. Some of these components are using EJB 1.1. I want to do the migration without having to updated to EJB 2.0 or EJB 3.0.
I have looked at the documentation for WebLogic 10 and understand that you need to use weblogic-cmp-jar.xml when using EJB 1.1. The problem is that I can not find an example of the weblogic-cmp-jar.xml. The documentation doesn't appear to fully document what the xml needs to look like.
Would someone be able to provide me with a simple example of the weblogic-cmp-jar.xml for use with EJB 1.1?
Thanks

You can reference the edoc at:
http://e-docs.bea.com/wls/docs100/ejb/DDreference-cmp-jar.html
http://e-docs.bea.com/wls/docs100/ejb/ejb11.html

Similar Messages

  • Weblogic-cmp-jar.xml vs weblogic-cmp-rdbms-jar.xml

    We've recently upgraded from WLS 6.1 to 8.1.
    Can anyone clarify the difference between <b>weblogic-cmp-jar.xml</b> and <b>weblogic-cmp-rdbms-jar.xml</b>?
    The weblogic-cmp-rdbms-jar.xml format we've been using is essentially just a list of data base elements, but we may have been under-utilizing it.
    The weblogic-cmp-jar.xml seems more complex and useful.
    Thanks.

    You can reference the edoc at:
    http://e-docs.bea.com/wls/docs100/ejb/DDreference-cmp-jar.html
    http://e-docs.bea.com/wls/docs100/ejb/ejb11.html

  • How will be the weblogic-ejb-jar and ejb-jar xml for EJB Local Interface?

    Hi,
    I have one ear application which is using Stateless Session Beans. I don't have any Bean to Bean communication . At present, the client is invoking remote methods thro Home/Remote interfaces. My doubt is , shall I implement EJBLocal home/ local interface to obtain this same functionality cos, in this app, both client and EJb bean have been deployed in same JVM. Can Local interfaces only be applicable to Bean - Bean relation ship?If LocalHome/Local interfaces can be implemented in my scenario, then may I know how will be the ejb-jar.xml and weblogic-ejb-jar.xml?
    thanks and regards,
    Venkat.

    Local interfaces are for communication between ejbs and their clients when both are in the same JVM. The clients can be normal clients, jsps, servlets, and other ejbs. If the client is not in the same JVM you cannot use local interfaces even though your client is another ejb.
    Advantage of using local interface is it reduces the network overhead.
    For more information you can download Mastering Enterprise Java Beans Third Edition by Ed Roman. You can go through 45
    You can download pdf version from.
    http://www.theserverside.com/books/wiley/masteringEJB/index.tss.
    Let me know the URL of the ejb doc that you referred.
    Thanks..

  • Stateless session Bean - xml and ejb-jar.xml file ???

    Dear Experts,
    Stateless-session bean
    For Creating an ear file
    we need ejb-jar.xml and weblogic-ejb-jar.xml files
    Is these files are already available
    or we have to type these files ??
    Advance Thanks
    Rengaraj.R

    My best advice: surrender to use an IDE.
    You wonder sometimes at how much productivity (read as 'time') could be wasted by doing something that could be done automatically. For a learning experience or a once only exercise is fine but as a routine thing, not worth it.
    Cheers

  • Ejb-jar.xml and orion-ejb-jar.xml configuration issue

    Chris,
    We have an application that uses the Oracle 10g Application Server and WebSphere MQ v5.3 w/ fixpack 9.
    Our application is a J2EE messaging system which essentially consists of Message Driven Beans, the EJB
    realization of the J2EE Java Message Service (JMS) API. Our application has Message Driven Beans which
    listen to queues and send messages to queues -- a simple messaging system. Currently we can listen to queues, but
    cannot send messages to queues in the Oracle 10g Application Server environment.
    Any J2EE application server has its own implementation of Java Naming Directory Interface (JNDI) API that
    deployed J2EE applications utilize to lookup resources such as Data Sources, JMS Destinations (i.e. MQ Queue),
    JMS QueueConnectionFactories (i.e. MQ QManagers).
    Our application uses the 3rd party JMS Provider, WebSphere MQ.
    MQ ships with a JMSAdmin tool which allows one to create JMS administered objects (i.e. objects a java
    application searches for in some JNDI directory) that reside in some JNDI context. We create a JNDI context for
    MQ resources, queues and QManagers. We configure the MQ provided
    JMSAdmin tool with two property name/value pairs:
    PROVIDER_URL=file:/opt/mqm/JNDI-Directory
    INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
    A resultant .bindings file is created in /opt/mqm/JNDI-Directory which represents our JDNI context
    containing our JMS administered objects. A standalone java application that needs to directly access this
    JNDI context can simply conduct a JNDI lookup on the following context: "java:comp/resource/MQSeries/". An
    example of how a standalone application would lookup a JMS administered object named "qNumber1" would be to
    lookup "java:comp/resource/MQSeries/qNumber1". This lookup would result in the standalone java application
    having a JMS reference to an MQ Queue.
    There is a major difference in how an enterprise EJB application deployed into a J2EE Container (Oracle 10g App Server)
    conducts a JNDI lookup on a 3rd party resource such as MQ as a JMS Provider. A typical EJB application deployed
    into a J2EE container as an .ear (enterprise archive) file has implicit access to the application server's own
    JNDI context. This JNDI context is usually "java:comp/env/". Looking up the Application Server's own Data Source or
    it's own JMS Resources is easy. An application that needs references to these Application Server provided resources
    simply conducts a lookup for "java:comp/env/jms/someQ" or "java:comp/env/jdbc/myDataSource".
    The problem we face is mapping our MQ JNDI context to the Oracle App Server's own JNDI context. We believe this is
    accomplished through mappings defined in both the ejb-jar.xml (EJB Descriptor) and the application server specific
    counterpart, orion-ejb-jar.xml. Note that Oracle 10g Application Server uses the popular orion J2EE container for
    hosting J2EE enterpise applications.
    Our Message Driven Beans (MDBs)currently listen to the Queue at the JNDI location "prodQ". Our problem is that we cannot
    get our MDB to send messages to any queues. Note that the MQ implementation of the queues and Queue Managers work
    flawlessly with standalone java applications. It's safe to say that the MQ objects are working.
    We are looking for a solid example of how the ejb-jar.xml and the orion-ejb-jar.xml map 3rd party JMS provider
    JNDI locations to the App Server's JNDI context.
    Below is how we have attempted to configure our own ejb-jar.xml and orion-ejb-jar.xml:
    ejb-jar.xml begin >>>>>>>>>>>>>>><?xml version = '1.0' encoding = 'UTF-8'?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <display-name>Production Message Driven Bean</display-name>
    <enterprise-beans>
    <message-driven>
    <display-name>prodMdb</display-name>
    <ejb-name>prodMdb</ejb-name>
    <ejb-class>message.handler.AIDMSMessageConsumerBean</ejb-class>
    <transaction-type>Bean</transaction-type>
    <message-driven-destination>
    <destination-type>javax.jms.Queue</destination-type>
    </message-driven-destination>
         <resource-ref>
    <res-ref-name>prodQCF</res-ref-name>
    <res-type>javax.jms.QueueConnectionFactory</res-type>
    <res-auth>Application</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
         <resource-ref>
    <res-ref-name>prodQ</res-ref-name>
    <res-type>javax.jms.Queue</res-type>
    <res-auth>Application</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
                   <resource-ref>
    <res-ref-name>prodR</res-ref-name>
    <res-type>javax.jms.Queue</res-type>
    <res-auth>Application</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    </message-driven>
    </enterprise-beans>
    </ejb-jar>
    <<<<<<<< ejb-jar.xml end <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    begin orion-ejb-jar.xml >>>>>>>>>>>>>>>>>>>>>>>>>>><orion-ejb-jar>
    <enterprise-beans>
    <message-driven-deployment name="prodMdb" connection-factory-location="java:comp/resource/MQSeries/prodQCF" destination-location="java:comp/resource/MQSeries/prodR">
              <resource-ref-mapping location="prodQ" name="prodQ">     
                   <lookup-context location="java:comp/resource/MQSeries/" >
                        <!-- <context-attribute name="java.naming.factory.initial"
                             value="com.sun.jndi.fscontext.RefFSContextFactory" /> -->
                   </lookup-context>
              </resource-ref-mapping>
              <resource-ref-mapping location="prodR" name="prodR">     
                   <lookup-context location="java:comp/resource/MQSeries/" >
                        <!-- <context-attribute name="java.naming.factory.initial"
                             value="com.sun.jndi.fscontext.RefFSContextFactory" /> -->
                   </lookup-context>
              </resource-ref-mapping>
         </message-driven-deployment>
    </enterprise-beans>
    </orion-ejb-jar>
    <<<<<<<<< end orion-ejb-jar.xml <<<<<<<<<<<<<<<<<<<<<<<<

    If you look at the contents of a deployment plan (Plan.xml) when you have it generated
    <deployment-plan ...>
      <module-override>
        <module-name>ejb.jar</module-name>
        <module-type>ejb</module-type>
        <module-descriptor external="true">
          <root-element>weblogic-ejb-jar</root-element>
          <uri>META-INF/weblogic-ejb-jar.xml</uri>
        </module-descriptor>
        <module-descriptor external="false">
          <root-element>ejb-jar</root-element>
          <uri>META-INF/ejb-jar.xml</uri>
        </module-descriptor>
        <module-descriptor external="true">
          <root-element>persistence-configuration</root-element>
          <uri>META-INF/persistence-configuration.xml</uri>
        </module-descriptor>
        <module-descriptor external="false">
          <root-element>persistence</root-element>
          <uri>META-INF/persistence.xml</uri>
        </module-descriptor>
      </module-override>
    </deployment-plan>You can see which files can be external and which can be not. The weblogic-ejb-jar.xml can be external
    but in this case you need a deployment plan to point weblogic to the file. The ejb-jar.xml cannot be
    external (see external=false)
    The benefit of storing the weblogic-ejb-jar.xml is that your administrator can fine tune certain
    configurations by using a deployment plan, instead of having to extract the contents from the jar file
    and then repackage it again.
    No need to worry about a clustered environment, you can place the jar and the deployment plan
    on the server where the admin server is located, when you deploy an application you deploy it to
    the cluster and everything is taken care off.
    More information on deployment plans can be found here: http://download.oracle.com/docs/cd/E11035_01/wls100/deployment/config.html

  • Does TopLink 10g generate toplink-ejb-jar.xml and weblogic-ejb-jar.xml?

    Also, does it have the ability to deploy an EJB JAR to an app server of choice?
    Thanks in advance.

    TopLink's Mapping Workbench will generate the toplink-ejb-jar.xml file for use in CMP and will augment the base ejb-jar.xml file.
    http://download-west.oracle.com/docs/cd/B10464_04/web.904/b10313/pkg_depl.htm#1132804
    TopLink does not generate the container specific file for WebLogic. More details available at:
    http://download-west.oracle.com/docs/cd/B10464_04/web.904/b10313/pkg_depl.htm#1124592
    TopLink does not include any deployment capabilities. This is the roll of yor IDE or scripts.
    Doug

  • Please check this ejb-jar.xml, weblogic-ejb-jar.xml,weblogic-cmp-rdbms.xml

    i am getting a classcast exception.My Stateless and stateful session bean works
    fine .. problem only with Entity bean. Please check these xml files and let me
    know if i have missed anything.
    ejb-jar.xml
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
    2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <ejb-name>stores</ejb-name>
    <home>Ejb.Stores.storesHome</home>
    <remote>Ejb.Stores.storesRemote</remote>
    <ejb-class>Ejb.Stores.storesBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.String</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>storesBean</abstract-schema-name>
    <cmp-field>
    <field-name>productId</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>descrip</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>price</field-name>
    </cmp-field>
    <primkey-field>productId</primkey-field>
    <query>
    <query-method>
    <method-name>findPriceGreaterThan</method-name>
    <method-params>
    <method-param>double</method-param>
    </method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(a) FROM storesBean AS a WHERE a.price > ?1]]>
    </ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>stores</ejb-name>
         <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    ------------- end of ejb-ar.xml---------------------
    weblogic-jar.xml
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN"
    "http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd" >
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>stores</ejb-name>
    <entity-descriptor>
    <persistence>
    <persistence-type>
         <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
         <type-version>6.0</type-version>
         <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
         </persistence-type>
         <persistence-use>
         <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
         <type-version>6.0</type-version>
         </persistence-use>
    </persistence>
    </entity-descriptor>
    <jndi-name>storesEntity</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    ------------- end of weblogic-jar.xml----------
    weblogic-cmp-rdbms-jar.xml
    <!DOCTYPE weblogic-rdbms-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 6.0.0
    EJB RDBMS Persistence//EN' 'http://www.bea.com/servers/wls600/dtd/weblogic-rdbms20-persistence-600.dtd'>
    <weblogic-rdbms-jar>
    <weblogic-rdbms-bean>
    <ejb-name>stores</ejb-name>
    <data-source-name>sqlTX</data-source-name>
    <table-name>ProductEJBTable</table-name>
    <field-map>
    <cmp-field>productId</cmp-field>
    <dbms-column>productId</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>descrip</cmp-field>
    <dbms-column>descrip</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>price</cmp-field>
    <dbms-column>price</dbms-column>
    </field-map>
    </weblogic-rdbms-bean>
    <create-default-dbms-tables>false</create-default-dbms-tables>
    </weblogic-rdbms-jar>
    ---------------- end of weblogic-cmp-rdbms-jar.xml----------
    Do i have to mention the connection Pool name anywhere .. My connection Pool name
    is sql7Pool and my datasource name which i have mentioned is sqlTx. I am using
    Sql server 7. I am deploying a jar file(not a war file) and accessng the EJB through
    a Servlet. Please any help would definitely be appreciated.
    Cheers
    Ashish.

    I thought you were getting a class cast exception but the stack trace shows
    a NullPointerException on line 38 of your servlet code. I am not sure if the
    code that you have attached is the complete code or just snippets of your
    complete code. Anyways, counting 38 lines in the code you attached points to
    the line "mr =
    mh.create(request.getParameter("login"),request.getParameter("name"));"
    which could be because "mh" is null. Can you verify "mh" is not null and
    also "objRef" is not null.
    Attaching the stack trace for ClassCastException would be useful.
    -- Anand
    "Ashish Suvarna" <[email protected]> wrote in message
    news:[email protected]...
    >
    Hey Anand,
    Thanks for your reply. I have attached the StackTrace,Servlet code andmy
    location and settings of my servlet .
    This is the StackTrace which i get :
    pl.java:265)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:200)
    atweblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
    rvletContext.java:2495)
    atweblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
    pl.java:2204)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    before create
    java.lang.NullPointerException
    at trialweblogic.webServlet.doGet(webServlet.java:38)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:265)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:200)
    atweblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
    rvletContext.java:2495)
    atweblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
    pl.java:2204)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    -------------- end of StackTrace---------------------
    My Servlet Code is
    package trialweblogic;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    import java.sql.*;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    import javax.ejb.ObjectNotFoundException;
    import javax.ejb.DuplicateKeyException;
    import javax.ejb.EJBException;
    import java.rmi.RemoteException;
    import java.rmi.Remote;
    import trialweblogic.*;
    public class webServlet extends HttpServlet {
    masterHome mh;
    masterRemote mr;
    OutputStream out;
    private static final String CONTENT_TYPE = "text/html";
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    public void doGet(HttpServletRequest request, HttpServletResponseresponse)
    throws ServletException, IOException {
    response.setContentType(CONTENT_TYPE);
    PrintWriter out = response.getWriter();
    // out = response.getOutputStream();
    try{
    InitialContext ic = new InitialContext();
    Object objRef = ic.lookup("masterBeanJNDI");
    mh =(masterHome)PortableRemoteObject.narrow(objRef,masterHome.class);
    >
    mr =mh.create(request.getParameter("login"),request.getParameter("name"));
    out.println("after create");
    }catch(Exception ex){
    ex.printStackTrace();
    public void destroy() {
    --------- end of servlet--------------
    I am using Weblogic 6.1. I have included the following in my web.xml filewhich
    is located atC:\bea\wlserver6.1\config\examples\applications\examplesWebApp\WEB-INF
    >
    >
    <servlet>
    <servlet-name>webServlet</servlet-name>
    <servlet-class>trialweblogic.webServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>webServlet</servlet-name>
    <url-pattern>/webServlet/*</url-pattern>
    </servlet-mapping>
    My Servlet is located atC:\bea\wlserver6.1\config\examples\applications\examplesWebApp\WEB-INF\class
    es\trialweblogic\
    folder. In this folder i also have the supporting files (home,remote &bean tooo).
    >
    >
    I call this servlet when te user submits the info from a JSP page.
    Hope this info helps in solving my problem. Do i have to mention theconnection
    Pool name anywhere in the xml descriptor or am i missing anything here. iguess
    Connection Pool name is not required since we are mentioning the JNDI namein
    the xml descriptor. Bye for now.Awaiting your reply.
    Cheers
    Ashish.
    "Anand Byrappagari" <[email protected]> wrote:
    It is unlikely that your xml descriptors can cause class cast exceptions.
    How did you install the servlet? Can you attach the servlet code that
    might
    help. Also complete stack trace of the exceptions would be helpful.
    -- Anand
    "Ashish Suvarna" <[email protected]> wrote in message
    news:[email protected]...
    Hi Anand,
    Thanks for quic reply.Hey i am using weblogic6.1. I am Not usinga WAR
    and
    ear file.I have created a jar file and deployed it.now i have createda
    servlet
    to access entity bean.Is a war file neccessary for accesing an entitybean
    through
    Servlet or JSP ???I am using sql server 7. The error that it givesis -----
    java.lang.ClassCastException: Cannot narrow remote object<br>
    "inside lookup method aaaaaaa" java.lang.NullPointerException. <br>
    Hope to get ur reply soon. in another entity bean i am getting thiserror ---
    java.lang.ClassCastException:
    weblogic.jdbc.common.internal.RmiDataSource
    .. I
    can't understand wots this error. I feel i am missing something inmy xml
    descriptor.
    Bye for now.
    Cheers
    Ashish.
    "Anand Byrappagari" <[email protected]> wrote:
    Can you attach the stack trace for the exception? Also please describe
    you
    environment - are the war and jar files installed separately? Are
    they
    composed into a ear? Also when are you getting a classcast exception?
    -- Anand
    "Ashish Suvarna" <[email protected]> wrote in message
    news:[email protected]...
    i am getting a classcast exception.My Stateless and stateful sessionbean
    works
    fine .. problem only with Entity bean. Please check these xml filesand
    let me
    know if i have missed anything.
    ejb-jar.xml
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD EnterpriseJavaBeans
    2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <ejb-name>stores</ejb-name>
    <home>Ejb.Stores.storesHome</home>
    <remote>Ejb.Stores.storesRemote</remote>
    <ejb-class>Ejb.Stores.storesBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.String</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>storesBean</abstract-schema-name>
    <cmp-field>
    <field-name>productId</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>descrip</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>price</field-name>
    </cmp-field>
    <primkey-field>productId</primkey-field>
    <query>
    <query-method>
    <method-name>findPriceGreaterThan</method-name>
    <method-params>
    <method-param>double</method-param>
    </method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(a) FROM storesBean AS a WHERE
    a.price> >> >>> >> >?1]>
    </ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>stores</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    ------------- end of ejb-ar.xml---------------------
    weblogic-jar.xml
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD
    WebLogic
    6.0.0 EJB//EN"
    "http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd" >
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>stores</ejb-name>
    <entity-descriptor>
    <persistence>
    <persistence-type>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-type>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    </persistence-use>
    </persistence>
    </entity-descriptor>
    <jndi-name>storesEntity</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    ------------- end of weblogic-jar.xml----------
    weblogic-cmp-rdbms-jar.xml
    <!DOCTYPE weblogic-rdbms-jar PUBLIC '-//BEA Systems, Inc.//DTD
    WebLogic
    6.0.0
    EJB RDBMS Persistence//EN'
    'http://www.bea.com/servers/wls600/dtd/weblogic-rdbms20-persistence-600.dt
    d
    <weblogic-rdbms-jar>
    <weblogic-rdbms-bean>
    <ejb-name>stores</ejb-name>
    <data-source-name>sqlTX</data-source-name>
    <table-name>ProductEJBTable</table-name>
    <field-map>
    <cmp-field>productId</cmp-field>
    <dbms-column>productId</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>descrip</cmp-field>
    <dbms-column>descrip</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>price</cmp-field>
    <dbms-column>price</dbms-column>
    </field-map>
    </weblogic-rdbms-bean>
    <create-default-dbms-tables>false</create-default-dbms-tables>
    </weblogic-rdbms-jar>
    ---------------- end of weblogic-cmp-rdbms-jar.xml----------
    Do i have to mention the connection Pool name anywhere .. My
    connection
    Pool name
    is sql7Pool and my datasource name which i have mentioned is sqlTx.I am
    using
    Sql server 7. I am deploying a jar file(not a war file) and accessngthe
    EJB through
    a Servlet. Please any help would definitely be appreciated.
    Cheers
    Ashish.

  • Deploytool not deleting fields in ejb-jar.xml and sun-cmp-mappings.xml

    Java(TM) 2 Platform, Enterprise Edition 1.4 SDK Developer Release deploytool
    This situation was found on a simple, but original application using CMP EJB's. The database is MySQL using numeric id's and foreign keys.
    I changed some fields in the database and went through the usual 14 attempts at getting deploytool to recognize a new schema without success. The one thing that is noticed is that when I tried to open the CMP display in the Entity selection the tool would not show any data, also it appears to lockup; however, if you select EJB in the choice box of the upper left you can get the view to close.
    In desperation (mind you decoding machine generated XML is NOT my favorite activity) I looked at the descriptor viewer and notice fields existed in the descriptor that were deleted in the database. The tool had read the schema because the new fields were also present.
    In sun-cmp-mappings.xml the old <cmp-field-mapping> definitions were still present. and in ejb-jar.xml the <query> and <cmp-field> were still present.
    After deleting them out -- happy, happy, happy, joy, joy, joy. Deploytool accepted the new schema (keeping all the proper old stuff correctly. yea!!!) and a simple create mapping process brought the beans and database into sync.
    I didn't want to report a bug, since I am actually new to EJB's so if anybody wishes to comment please do. I just wanted to provide a heads up in case this was something not noticed.
    BTW I'm a recent expert at EJB's anybody got a job? :-)

    Have you tried to unmap your fields and relationships?
    Go through all your enterprise beans in the CMP Database window and click Unmap All until the Persistent Field Mappings table is empty of mappings. Then click Create Database Mappings, select the new schema, and verify the fields and relationships were mapped. This should clear out any old field mappings.
    -Ian Evans

  • Application deployment order with weblogic-ejb-jar.xml and jndi-name

    I have two applicatation working on Weblogic server v. 10.3.6.
    First of them creating one ejb stateless bean and creates JNDI maping for it (in weblogic-ejb-jar.xml file):
    <weblogic-enterprise-bean>
         <ejb-name>ConfigMenegerBean</ejb-name>
         <stateless-session-descriptor>
         <stateless-session-descriptor>
              <business-interface-jndi-name-map>
              <business-remote>package.ConfigurationSessionRemote</business-remote>
              <jndi-name>ConfigMeneger</jndi-name>
              </business-interface-jndi-name-map>
         </stateless-session-descriptor>
         <enable-call-by-reference>true</enable-call-by-reference>
         <jndi-name>ConfigMeneger</jndi-name>
    </weblogic-enterprise-bean>
    Second appication have to refer for this bean by JNDI using spring been lookup :
    <jee:jndi-lookup id="configManager" jndi-name="ConfigMeneger"/>
    I changed deployment order parameter for both apllication(first=100 and second=500) in order to first app start first and share bean by jndi to another application. Unfortuantelly I got an error :
    javax.naming.NameNotFoundException: Unable to resolve 'ConfigMeneger'. Resolved ''; remaining name 'ConfigMeneger'
    How can I configure deployment order that first application make jndi mapping for bean, before the second application will use it ?

    Ok in a way I have solved my problem (even if I am not completely satisfied by the way on how to proceed...). So thanks to message "JBuilder7.0 and Weblogic6.1" on EJB sun forum :
    http://forum.java.sun.com/thread.jsp?thread=285735&forum=13&message=1255488
    I have tried the following actions (mentionned in the other forum messages):
    - To preserve changes to weblogic*.xml, the safest way is to change the ejb-borland.xml.
    (I am not sure that I have applied this advice correctly, because I suppose that syntax is not similar in weblogic file or borland file).
    And you can MANUALLY update the weblogic file in your JAR archive.
    1. Open the EJB JAR file in Winzip and extract the weblogic-ejb-jar.xml file, so that a copy exists in your
    project directory.
    2. Open this file (in Notepad), add the WebLogic specific information, and then save the file.
    3. Now, when you are finished with the build cycle and are ready to deploy, you may open the EJB jar file
    and swap in the weblogic-ejb-jar.xml file."
    Good Luck.

  • Storing ejb-jar.xml and weblogic-ejb-jar.xml

    We are using Weblogic Integration 9.2 on a 2 cluster system sharing the same domain directory.
    1) I am wondering if I can store these files somewhere in the domains directory instead of the EJB's archive - call it MyEjb.jar?
    2) Are there any benefits to storing these files outside of the MyEjb.jar file? I am thinking to make it easier to update the configurations such as number of MDB consumers and such to avoid having to recreate the MyEjb.jar with the new config and redeploy the application. A simple text edit and bounce could be fine if the files can be stored outside.
    2b) Can another application in the same domain read these files to find out the connection factory and queue information?
    3) Are there any disadvantages to storing those files outside of the jar file? One issue I can think of here is how to deal with them on a cluster environment.
    4) Any other feedback apprecaited.

    If you look at the contents of a deployment plan (Plan.xml) when you have it generated
    <deployment-plan ...>
      <module-override>
        <module-name>ejb.jar</module-name>
        <module-type>ejb</module-type>
        <module-descriptor external="true">
          <root-element>weblogic-ejb-jar</root-element>
          <uri>META-INF/weblogic-ejb-jar.xml</uri>
        </module-descriptor>
        <module-descriptor external="false">
          <root-element>ejb-jar</root-element>
          <uri>META-INF/ejb-jar.xml</uri>
        </module-descriptor>
        <module-descriptor external="true">
          <root-element>persistence-configuration</root-element>
          <uri>META-INF/persistence-configuration.xml</uri>
        </module-descriptor>
        <module-descriptor external="false">
          <root-element>persistence</root-element>
          <uri>META-INF/persistence.xml</uri>
        </module-descriptor>
      </module-override>
    </deployment-plan>You can see which files can be external and which can be not. The weblogic-ejb-jar.xml can be external
    but in this case you need a deployment plan to point weblogic to the file. The ejb-jar.xml cannot be
    external (see external=false)
    The benefit of storing the weblogic-ejb-jar.xml is that your administrator can fine tune certain
    configurations by using a deployment plan, instead of having to extract the contents from the jar file
    and then repackage it again.
    No need to worry about a clustered environment, you can place the jar and the deployment plan
    on the server where the admin server is located, when you deploy an application you deploy it to
    the cluster and everything is taken care off.
    More information on deployment plans can be found here: http://download.oracle.com/docs/cd/E11035_01/wls100/deployment/config.html

  • Using JMX to read ejb manifest jar and ejb-jar.xml in ejb jar inside ear

    Hello,
    I have an ear deployed on weblogic console. I need to check contents of manifest file and ejb-jar.xml of a jar that is present in the deployed ear.
    Currently I am using below code to access jar inside ear deployed :
    Hashtable env = new Hashtable(5);
    env.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL,
    url);
    env.put(Context.SECURITY_PRINCIPAL, user);
    env.put(Context.SECURITY_CREDENTIALS, password);
    Context ctx = new InitialContext(env);
    mBeanHome = (MBeanHome)ctx.lookup(MBeanHome.ADMIN_JNDI_NAME);
    String type = "EJBComponentRuntime";
    Set beans = mBeanHome.getMBeansByType(type);
    try{
    for(Iterator it=beans.iterator();it.hasNext();)
    EJBComponentRuntimeMBean rt = (EJBComponentRuntimeMBean)it.next();
    if(rt.getParent().getName().equals("xxx")){
    System.out.println(rt.getName());
    l.add(rt.getName());
    Here xxx is the ear. Now I need to get inside the jar (represented) by variable rt and access its manifest file,ejb-jar.xml
    Does anyone have an idea how to do this?
    regards
    Sameer

    Isn't it possible to put them there manually? :)

  • Sun-ejb-jar.xml  y ejb-jar.xml

    Hello
    I�m using SUn oNE Applciation Server and it request sun-ejb-jar.xml for this file when i deploy a ejb but i only have in the jar, generating by sun one studio , ejb-jar,xml , is it the same file?

    up

  • Ejb-jar.xml中的EJB QL和weblogic-cmp-rdbms-jar.xml中的WLQL

    我想问一下,在ejb-jar.xml文件中用EJB QL查询语言定义了相应的EJB QL查询语句后,在weblogic-cmp-rdbms-jar.xml文件中还需不需要用wlql语言来定义相应的查询语句呀?

    在Weblogic6.0中,如果你需要利用EJB2.0的EJBQL语言所不提供的
    ORDERBY排序功能,那么这时候可以在weblogic-cmp-rdbms-jar.xml中用WLQL覆盖它,一般情况下,在ejb-jar.xml中声明一个EJBQL方法就可以了,WLQL可有可无。

  • Weblogic-ejb-jar.xml generation and editing question with JEE5 / EJB3

    Since EJBGen only works with EJB 2.1, is there a way to auto-generate weblogic-ejb-jar.xml when using a JEE5 ejb module?
    In the tooling like OEPE 11g, an EJB3 project will generate an empty deployment descriptor weblogic-ejb-jar.xml file if you mark it that way in the wizard, but it doesn't populate it with any values.
    Is the weblogic-ejb-jar.xml file is created/edited by hand, do the settings like this example still work or even make sense given the changes in the spec between 2.1 and 3.0?
    <weblogic-enterprise-bean>
    <ejb-name>HelloUser</ejb-name>
    <stateless-session-descriptor>
    <pool>
    <max-beans-in-free-pool>50</max-beans-in-free-pool>
    <initial-beans-in-free-pool>10</initial-beans-in-free-pool>
    </pool>
    <stateless-clustering>
    <home-is-clusterable>True</home-is-clusterable>
    <home-load-algorithm>round-robin</home-load-algorithm>
    <stateless-bean-is-clusterable>True</stateless-bean-is-clusterable>
    <stateless-bean-load-algorithm>round-robin</stateless-bean-load-algorithm>
    </stateless-clustering>
    </stateless-session-descriptor>
    <enable-call-by-reference>true</enable-call-by-reference>
    </weblogic-enterprise-bean>
    ........

    Hi,
    For a JEE5 EJB module, rather than using EJBGen, you can use WLS specific annotations for configuring common settings. If you follow the link below, you can see a list of supported EJB annotations. Disregard the fact that the documentation section title is WebLogic Kodo Annotations. That is incorrect and I've filed a bug for it.
    http://edocs.bea.com/wls/docs103/ejb30/annotations.html#wp1438036.
    Unfortunately, we don't yet support setting all weblogic-ejb-jar.xml configuration values via annoations so in some cases a weblogic-ejb-jar.xml is still required.
    You can hand edit your weblogic-ejb-jar.xml and the example you posted below should work fine.
    - Matt

  • Tools for generating weblogic-cmp-rdbms-jar.xml files

    Hi All:
    I am using Weblogic 8.1 sp6 and MyEclipse 5.1.
    Does anybody knows if weblogic 8.1 provides a wizard or tool or some product that will help you generate the
    weblogic-cmp-rdbms-jar.xml and webloigc-ejb-jar.xml files if given the ejb-jar.xml, the home, remote and bean classes and the database server information.
    The reason, I am asking this is because if you're using Hibernate, there is a hibernate tool that will generate the hbm.xml and persistence classes given a particular database information.
    I was wondering if there is the same thing in ejb development with weblogic 8.1 sp6?
    Yours,
    Desperate

    I think u r some confusion with productID and SuppliedID . primary key of one column( productId ) can be a foreign key of other table colum( SuppliedID). but foreign key( SuppliedID) can not be a primary key of second table .u declared SuppliedId as primary key . so ur mapping is incorrect.

Maybe you are looking for