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

Similar Messages

  • Ejb-ref-mapping in orion-ejb.jar missing location attribute after deployment

    I have noticed that on several of my entity beans that after deployment the <ebj-ref-mapping location="JNDIName" name="LocalName"/> is missing the location attribute. This causes any attempts to lookup the EJBHome for that EJB to fail because the path to the EJBHome in JNDI cannot be found (obviously!). The problem is that this causes me to manually edit the application-deployment/<app>/<ejb.jar>/orion-ejb.zml after each deployment via the admin.jar. This seems like a bug with OC4J and I am wondering if Oracle is aware/doing something to fix this?
    I have noticed that the same problem exists for session beans, however, for some strange reason the EJBHomes can still be resolved in JNDI. In all cases the location in JNDI is different then the <ejb-ref-name> I used in the client EJB.
    Example being I have an entity bean at com.foo.Foo and the session bean uses lookup("java:comp/env/ejb/Foo") it is still able to find the EJB even though the orion-ejb.xml looses the location attribute. If the case is an entity bean referencing another entity bean in the same fashion I get an error because the location attribute is missing.

    If the 'location' value is same as the 'name' value, then even though the location attribute is missing, it is ok and should work. If they are not the same, then you should have defined the ejb-link element in your ejb-jar.xml when defining this ejb-ref and that would make the location attribute appear in the generated orion-ejb-jar.xml.
    If the referenced bean is from a different application (EAR), then you should have used the -parent option when deploying the application.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Kris Trujillo ([email protected]):
    I have noticed that on several of my entity beans that after deployment the <ebj-ref-mapping location="JNDIName" name="LocalName"/> is missing the location attribute. This causes any attempts to lookup the EJBHome for that EJB to fail because the path to the EJBHome in JNDI cannot be found (obviously!). The problem is that this causes me to manually edit the application-deployment/<app>/<ejb.jar>/orion-ejb.zml after each deployment via the admin.jar. This seems like a bug with OC4J and I am wondering if Oracle is aware/doing something to fix this?
    I have noticed that the same problem exists for session beans, however, for some strange reason the EJBHomes can still be resolved in JNDI. In all cases the location in JNDI is different then the <ejb-ref-name> I used in the client EJB.
    Example being I have an entity bean at com.foo.Foo and the session bean uses lookup("java:comp/env/ejb/Foo") it is still able to find the EJB even though the orion-ejb.xml looses the location attribute. If the case is an entity bean referencing another entity bean in the same fashion I get an error because the location attribute is missing.<HR></BLOCKQUOTE>
    null

  • Bpel-config.xml and soa-infra-config.xml file location in SOA 11g Pre-built

    Hi frnds,
    I have downloaded and started Oracle SOA 11g Pre-built from http://www.oracle.com/technetwork/middleware/soasuite/learnmore/vmsoa-172279.html and trying to configure it according to my requirements to upgrade from SOA 10g to 11g. But I can't find bpel-config.xml and soa-infra-config.xml files in BPEL domain home (i.e. /oracle/fmwhome/user_projects/domains/domain1).
    Can you please help me?
    BR, Lisan

    None of those roles are intended to be granted to application users. Those are instead to limit various operational / support responsibilities. For instance, if you have "operators" for your production environment who are responsible for starting & stopping servers vs "Administrators" who are performing configuration changes, etc.
    The SOA* versions can be used to separate even further - an "Operator" ( with rights in the WL console ) can be distinct from a "SOAOperator" ( with rights in the SOA /em ), etc.
    http://download.oracle.com/docs/cd/E14571_01/integration.1111/e10226/appx_roles_privs.htm#insertedID2
    also, here is a bit more on soa-infra roles:
    http://download.oracle.com/docs/cd/E14571_01/integration.1111/e10226/appx_users.htm#insertedID4

  • Please enable REST support in WEB-INF/conf/axis2.xml and WEB-INF/web.xml

    Hi  All,
    we are not able to connect to Live office to our server . URL is  not authenticated in Excel and  if we place same url in browser ,we are getting below error message.
    "Please enable REST support in WEB-INF/conf/axis2.xml and WEB-INF/web.xml"
    we couldn't able to rest the same after changing settings in axis2 file also.
    Any solution where we can configure in CMC or any files
    Regards
    Mahesh

    Hi Mahesh,
    As mentioned by Abhilasha, this is the expected behavior.
    In order to validate you could place the following URL in the browser.
    http://servername:portno/dswsbobje. you would see Tomcats home page which will display the list of Services.
    As far as the Live office in Excel is concerned , If you are getting a yellow  exclamation mark stating (Web service not correct) next to Session URL, try changing the servername to IPaddress of the server.
    Eg: http://ipaddress:portno/dswsbobje/services/Session
    While inserting the Session URL in the Live Office settings confirm the URL as per above.
    If the issue still persists, you could configure the host file entry in you client machine.
    Let me know if the information is helpful.
    Regards,
    Noopur

  • Vendor-ejb-jar.xml to orion-ejb-jar.xml, finder methods

    Hello
    I want to convert a inprise based EJB 1.1 application from inprise to OC4J. The inprise based finder methods are quite different from the syntax of orion-ejb-jar.xml, regarding the finder methods. Does anyone know if this can be done more easily. Using JDev 903_pre does not help much. I dont have access to JBuilder either. It seems I have to write all the finder methods once more and it takes days.
    Any hints ?
    Ana Maria

    OC4J does not require all finder methods in the orion-ejb-jar.xml and it automatically generates all simple finder methods. The easiest thing to do is deploy the EJBs into OC4J and it will generate the finder methods in the $OC4J_HOME/j2ee/home/application-deployment/<application-name>/ejb-jar-name/ directory and then you can modify these per your requirement and package with your EJBs.
    hope this helps
    thanks
    Debu

  • 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

  • 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

  • Performance on  Schema based Xml and No Schema based XML

    Hai,
    We can insert two kind of xml like schema based xml document and non schema based xml document into XMLTYPE fields.I like to know which xml document will have good performance ( fast access ) compare to another.
    Even if we have any other approach than schema.It will be great.
    We do XPath query to get the values from xml document.Is there any way to get the fields faster than the XPath.I am using Oracle 10g R2.
    I need to access much fast the xml element from the table.Please help me!.
    Thanks,
    Saravanan.P

    HHave you read the FAQ or any of the XML DB whitepapers... If not I suggest that you do so before proceeding any further or asking any more questions. If you take the time to a do a little basic research you should be able to see that you have made the worst possible decision if performance is importantto you.
    If you invested a little bit of effort before posting you would soon understand that in 10gR2 you will need to use schema based storage to get high performance, and that it doesn't matter whether you use XPath or XQuery, what matters is whether or not the XPath or XQuery operations get re-written correctly so the database can optimize them.

  • 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

  • Creating an Order Processing System Using XML and JavaBean/EJB

    Hi,
    I'm looking to design a solution for the following problem:
    A distributor creates a purchase order from a home grown system. This purchase order is sent to the company as a flat text file. This file must then be validated for both syntax and data values and then processed by their ERP system running on an AS/400.
    The solution I would like to provide is to place the data from this text file into an XML file and then create a system composed of server side components (either Java Beans or Enterprise Java Beans) that would parse the information and call the back end ERP processes (using business methods from within the beans). I have already developed a web app that processes orders using JSP and Java Beans. In this case however, the order will never be seen by a human unless it fails validation. I figured using XML to do this would not only be good for this part but also improve the e-commerce side as well. My only question is how to submit an XML document to a bean for processing without user intervention. Any information you can give me on this or even to point me in the right direction would be greatly appreciated. Thank you for your time.

    Hello,
    Thank you for responding to my question. I have several books here on XML but have not gotten very far in them as of yet. I understand how to create an XML document and a DTD, but I guess I haven't gotten far enough to understand how "submit" per say an XML page like you would an HTML form and then proceed to retrieve the data from the request parameters. I will research this further.

  • OC4J9.0.4 generates orion-ejb-jar.xml instead of using mine !!!

    META-INF directory of my EJB module of the EAR archive contains two descriptors: ejb-jar.xml and orion-ejb-jar.xml. But when I deploy the application OC4J generates its own orion-ejb-jar.xml and replaces mine with it. How it could be ?

    Hi Avi,
    I assume you are talking about your development
    environment (as opposed to your production
    environment). You do know that if you edit the
    deployed "orion-ejb-jar.xml" file, OC4J will pick
    that up and automatically re-deploy, don't you? Or
    simply copy your new "orion-ejb-jar.xml" file to the
    same directory as the deployed one (thus overwriting
    it) -- same effect.This is exactly what I end up doing. Are you saying that
    (a) the production environment will not suffer from this problem? (if so, how?)
    (b) I will have to edit the deployed orion-ejb-jar.xml file every time I deploy to production (admittedly, not too frequently)?
    regards
    George

  • Orion-ejb-jar.xml for oc4j and xdoclet

    Does anybody try to use xdoclet to generate orion-ejb-jar.xml with ejb relation?
    Could somebody show me any example of definition relation for xdoclet and orion-ejb-jar.xml? (@orion:persistence...)
    thanks for any advice... :-)
    Zajo

    Hello,
    The warning message looks to be unrelated to the java.lang.IllegalArgumentException error. The warning states that optimistic locking cannot be migrated to the toplink-ejb-jar.xml file; this is stated in chapter 7 of the TopLink developer's guide at
    http://download-west.oracle.com/otn_hosted_doc/toplink/1013/MAIN/_pdf/b13593_v1_01.pdf
    The exception though seems to indicate that your orion-ejb-jar.xml contains EJBs mapped to the same table that are not related through EJB inheritance. I do it all the time with POJOs so this will work in TopLink, but you will need a support case to help get your project migrated if this is the case.
    Best Regards,
    Chris Delahunt

  • JDeveloper / OC4J rewriting my orion-ejb-jar.xml

    Hi All.
    Im having a play around with OC4J and CMP entity beans and struts at the moment learning some stuff for a new job, so ive started to write a little test app to get used to things.
    Ive created a CMP entity - CustomerEntityEJB, manually defined the tables etc wrote and built it using JDeveloper 10.
    Ive created all the necessary classes and descriptors in JDeveloper and the bean compiles and deploys fine, however no matter what i do, the table attribute of the <entity-deployment> elemnt is ALWAYS removed from the orion-ejb-jar.xml file before its deployed and i have no idea why.
    Here are some snippets form the xml config files im using....
    ejb-jar.xml :
    <entity>
    <description>Entity Bean ( CMP )</description>
    <display-name>CustomerEntityEJB</display-name>
    <ejb-name>CustomerEntityEJB</ejb-name>
    <local-home>com.gb.ejb.entity.customer.CustomerEntityEJBLocalHome</local-home>
    <local>com.gb.ejb.entity.customer.CustomerEntityEJBLocal</local>
    <ejb-class>com.gb.ejb.entity.customer.CustomerEntityEJBBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Long</prim-key-class>
    <reentrant>false</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>CustomerEntityEJB</abstract-schema-name>
    <cmp-field>
    <field-name>id</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>title</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>forename</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>surname</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>email</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>password</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>active</field-name>
    </cmp-field>
    <primkey-field>id</primkey-field>
    <query>
    <query-method>
    <method-name>findAll</method-name>
    <method-params/>
    </query-method>
    <ejb-ql>SELECT OBJECT(c) FROM CustomerEntityEJB c</ejb-ql>
    </query>
    </entity>
    orion-ejb-jar.xml as in JDeveloper:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <orion-ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-ejb-jar-10_0.xsd" schema-major-version="10" schema-minor-version="0">
    <enterprise-beans>
    <persistence-manager name="toplink"/>
    <session-deployment name="CustomerSessionEJB" local-location="CustomerSessionEJB" />
    <entity-deployment name="CustomerEntityEJB" data-source="jdbc/PostgresDS" table="Customer" local-location="CustomerEntityEJB">
    <primkey-mapping>
    <cmp-field-mapping name="id"/>
    </primkey-mapping>
    <cmp-field-mapping name="active"/>
    <cmp-field-mapping name="email"/>
    <cmp-field-mapping name="forename"/>
    <cmp-field-mapping name="id"/>
    <cmp-field-mapping name="password"/>
    <cmp-field-mapping name="surname"/>
    <cmp-field-mapping name="title"/>
    </entity-deployment>
    </enterprise-beans>
    </orion-ejb-jar>
    orion-ejb-jar.xml as viewed in the OC4J enterprise manager.     
    <?xml version="1.0" encoding="utf-8"?>
    <orion-ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-ejb-jar-10_0.xsd" deployment-version="10.1.3.3.0" deployment-time="1151415a0e3" schema-major-version="10" schema-minor-version="0" >
    <enterprise-beans>
    <persistence-manager name="toplink" class="oracle.toplink.internal.ejb.cmp.oc4j.Oc4jPersistenceManager" descriptor="toplink-ejb-jar.xml">
    </persistence-manager>
    <session-deployment name="CustomerSessionEJB" location="CustomerSessionEJB" local-location="CustomerSessionEJB" persistence-filename="CustomerSessionEJB">
    <ejb-ref-mapping name="ejb/local/CustomerEntityEJB" location="TWA-EJB_CustomerEntityEJBLocal" />
    </session-deployment>
    <entity-deployment name="CustomerEntityEJB" location="CustomerEntityEJB" local-location="CustomerEntityEJB" concrete-bean-class="CustomerEntityEJB_ConcreteSubClass3" data-source="jdbc/PostgresDS" local-wrapper="CustomerEntityEJBLocalHome_LocalEntityHomeWrapper5">
    </entity-deployment>
    </enterprise-beans>
    <assembly-descriptor>
    <default-method-access>
    <security-role-mapping name="<default-ejb-caller-role>" impliesAll="true" />
    </default-method-access>
    </assembly-descriptor>
    </orion-ejb-jar>
    As you can see, the orion-ejb-jar.xml that been deployed on the server has had extra attributes defined in it (like concrete-bean-class) which makessense - its adding in the bits i didnt to get th bean to deploy - however the table attribue is just removed, meaning my bean cant find the table - hence my app not working.
    i just dont know how to stop this and would be extremely grateful if someone could give me a clue how to get my bean up and working properly as this is driving me insane.
    Thanks in advance..
    Gareth.

    sorted - the <persistence-manager name="toplink"/> element was automatically generated by JDeveloper and put in my orion-ejb-jar.xml appears to be un necessary and seemed to be breaking eveything - as soon as i removed it, the bean seemed to deploy ok and pick up the table name =]
    as a bit of an aside does anyone know why it was automatically put there in the first place if it breaks things?

  • 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

  • Override JNDI names in persistence.xml and @resource annotation

    I have a Java EE 7 application that I am developing for use with both GlassFish and WildFly, but I have discovered that both application servers use a slightly different format for specifying JNDI names.
    In GlassFish the persistence.xml file references the data source jdbc/myDataSouce, but in WildFly the data source needs to be java:/jdbc/myDataSource.The same is also true for classes that are annotated with @Resource. In GlassFish the annotation for a class using JavaMail would be @Resource(name = "mail/myMailSession"), but to deploy onto WildFly this would need to be @Resource(name = "java:mail/myMailSession").
    The only solution I've got at present is using Maven to create two different releases of the EAR file, with one EAR file containing a persistence.xml file with the data source jdbc/myDataSouce for use with GlassFish, and the second EAR file containing a persistence.xml file with the data source java:/jdbc/myDataSource for use with WildFly. Unfortunately, I haven't found a solution for the @Resource annotation.
    I've taken a look at the documentation for glassfish-application.xml and glassfish-ejb-jar.xml and have tried using resource-ref to override the JNDI names but the application fails to deploy due to an error in the name.
    My question is does GlassFish provide any capability to override the JNDI names specified in the persistence.xml file and classes with the @resource annotation?
    Many Thanks
    Paul

    Have you been able to solve this? I'm attempting to understand what Web Server 7 can do with regard to Java Persistence and what elements of it require Glassfish.
    I've also spent great amounts of time in WS6.1 trying to figure out why a JNDI resource couldn't be found. The rules of thumb I've learned are:
    - Try dropping the *'java:/comp/env/* prefix; just use jdbc/pact part
    - Make sure all referrences (in web.xml and sun-web.xml) are identical with regard to that name.
    I'm hoping you're not still dealing with this (it's been two months!) but if anybody else stumbles on this, maybe it'll help them.
    Dave

Maybe you are looking for