Destination-jndi-name problems

When I try to run my message-driven bean, the server complains that it
cannot resolve 'CheckoutQueue'. In the weblogic-ejb-jar.xml file, I have
specified the destination-jndi-name to be 'CheckoutQueue'. Is there
anything I have to do in the console to make it so that the server finds the
name?

Please do not crosspost.
Eric Lin wrote:
When I try to run my message-driven bean, the server complains that it
cannot resolve 'CheckoutQueue'. In the weblogic-ejb-jar.xml file, I have
specified the destination-jndi-name to be 'CheckoutQueue'. Is there
anything I have to do in the console to make it so that the server finds the
name?--
Rajesh Mirchandani
Developer Relations Engineer
BEA Support

Similar Messages

  • Accessing Distributed destination JNDI Names Web

    I am using WebLogic Full Client with Weblogic 10.3. I would like to obtain the JNDI names of the physical members of a Distributed Destination. Weblogic Documentation recommends doing:
    "you must look up the JNDI name or the member name using the weblogic.jms.extensions.JMSModuleHelper class uddMakeName and uddMemberJNDIName APIs"
    http://download.oracle.com/docs/cd/E11035_01/wls100/jms/dds.html#wp1314556
    When I attempt to do the same using the Weblogic full client, I get a class not found exception where a QueueBean class is not found.
    Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/j2ee/descriptor/wl/QueueBean
         at com.overstock.jms.weblogic.ConfigurationMBeanHelper.main(ConfigurationMBeanHelper.java:150)
    Caused by: java.lang.ClassNotFoundException: weblogic.j2ee.descriptor.wl.QueueBean
    What is the best way to obtain JNDI names of distributed destinations when using Weblogic Full Client? Any code snippets would be valuable.
    Thanks.

    I think there are a variety of ways to crack this nut. Here are a couple of ideas:
    One option would be to write a server side proxy that the client can invoke. For example, a simple EJB (stateless session bean). Another option would be write client-side JMX calls that query either the runtime mbeans or config mbeans to get a list of JMS servers and/or UDD members.
    All of these options may require that the domain's administrative server be up and running (not sure). The runtime mbean options would only yield active members.
    Tom

  • JNDI name for a JMB is not replicatet to other servers in the cluster

    Hi,
              wl6.1sp7, two server cluster
              When I look at the JNDI Tree for a server I can't find JNDI names of JMB's from the other server in the cluster.
              I get an exception when trying to send to a destinaton on the other server. (Unable to resolve 'xlink.jms.service.report.biztalk-lab.Report' Resolved: 'xlink.jms.service.report' Unresolved:'biztalk-lab')
              Setting are same as explained in this thread...
              http://forums.bea.com/bea/thread.jspa?threadID=600003492&tstart=0
              And JNDINameReplicated is set to true....
              Why is the JNDI names not replicated?
              <JMSQueue JNDIName="xlink.jms.service.report.biztalk-lab.Report"
              JNDINameReplicated="true" Name="Report" StoreEnabled="default"/>
              This is the DD of a JMB:
              <weblogic-ejb-jar>
              <weblogic-enterprise-bean>
              <ejb-name>xlink.jms.service.report.biztalk-lab.Report</ejb-name>
              <message-driven-descriptor>
              <pool>
              <max-beans-in-free-pool>3</max-beans-in-free-pool>
              <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
              </pool>
              <destination-jndi-name>xlink.jms.service.report.biztalk-lab.Report</destination-jndi-name>
              <connection-factory-jndi-name>xlink.jms.factory.commerceFactory</connection-factory-jndi-name>
              </message-driven-descriptor>
              <jndi-name>xlink.jms.service.report.biztalk-lab.Report</jndi-name>
              </weblogic-enterprise-bean>
              </weblogic-ejb-jar>
              ~b

    1. yes
              <JMSConnectionFactory AllowCloseInOnMessage="false"
              DefaultDeliveryMode="Persistent" DefaultPriority="4"
              DefaultTimeToLive="0"
              JNDIName="xlink.jms.factory.commerceFactory"
              MessagesMaximum="10" Name="xlink.jms.factory.commerceFactory"
              OverrunPolicy="KeepOld" Targets="bluej,biztalk-lab,devtestCluster"/>
              2. No I am just using the jndi name of the queue.
              This is an example of how I send a message:
                   Context ctx = new InitialContext();
              QueueConnectionFactory qconFactory;
              QueueConnection qcon;
              QueueSession qsession;
              QueueSender qsender;
              Queue queue;
              ObjectMessage msg;
              qconFactory = (QueueConnectionFactory) ctx.lookup("xlink.jms.factory.commerceFactory");
              qcon = qconFactory.createQueueConnection();
              qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
              queue = (Queue) ctx.lookup("xlink.jms.queue.biztalk-lab.OrdrspImport");
              qsender = qsession.createSender(queue);
              msg = qsession.createObjectMessage(reportExecutorContainer);
              qcon.start();
              qsender.send(msg);
              qsender.close();
              qsession.close();
              qcon.close();
              3. I don't know those setting (wl 6.1sp7)

  • Getting jndi name for jms queue via jmx?

    All,
    I'm trying to write a utility that will do a 9.2-style message export against 8.1 I think I have it all figured out except that I don't know how to get the jndi name of a queue or topic via jmx. I'm using jmx to find queues and subscriptions that have messages waiting, then trying to connect to them to siphon off the messages. I can't just browse jndi for any queue I find because I also want to access the durable subscriptions, for which I need the client and subscriptions ids. Is there a way to map from the jms destination runtime mbean to the jndi name? The getDestination() method isn't supported (throws an exception.)
    thanks

    Hi John,
    You can get destination JNDI names by looking up their value in the JMX configuration mbeans rather than the runtime mbeans. The client-id and subscription-name are available on the JMSDurableSubscriberRuntime mbean.
    Regards,
    Tom

  • Problem in setting up jndi name in servlet

    hi,
    I am using netbeans6.8, glassfishv3 with mysql5.1. I set up a new jdbc Resource & connection pool by using the glassifsh admin console, and associated the connection pool with jdbc resource
    when i ping the status of the connection pool , it is success.
    Following is the lines added from my config.xml file in glassfish domain
    <jdbc-resource pool-name="knockknock_poool" description="For connecting with knockknock for testing" jndi-name="jdbc/knockknock" />
    <jdbc-connection-pool datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" max-pool-size="250" res-type="javax.sql.DataSource" steady-pool-size="32" description="pool for contains connection to connect with knockknock" name="knockknock_poool" non-transactional-connections="true" ping="true">
    <property description="jdbcname" name="URL" value="jdbc:mysql://localhost:3306/knockknock" />
    <property description="knockknock" name="databaseName" value="knockknock" />
    <property description="knockknock" name="datasourceName" value="knockknock" />
    <property description="tcp" name="networkProtocol" value="tcp" />
    <property description="admin" name="password" value="admin" />
    <property description="3306" name="portNumber" value="3306" />
    <property description="localhost" name="serverName" value="192.168.2.36" />
    <property description="root" name="user" value="root" />
    </jdbc-connection-pool>
    My DB name is knockknock & jndi name of datasource is jdbc/knockknock and ping status is true
    when i try to make a datasource lookup from my servlet i am getting the following exception
    javax.naming.NamingException: Lookup failed for 'jdbc/knockknock' in SerialContext [Root exception is javax.naming.NameNotFoundException: knockknock not found]
    at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:442)
    at javax.naming.InitialContext.lookup(InitialContext.java:392)
    at javax.naming.InitialContext.lookup(InitialContext.java:392)
    at knockingvideopackage.NewRegistration.init(NewRegistration.java:50)
    at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1428)
    at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:1073)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:187)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
    at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: javax.naming.NameNotFoundException: knockknock not found
    at com.sun.enterprise.naming.impl.TransientContext.doLookup(TransientContext.java:197)
    at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:168)
    at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:172)
    at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:58)
    at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:101)
    at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:430)
    ... 28 more
    and my servlet code is
    @Override
    public void init(ServletConfig config)
    try {
    InitialContext ctx = new InitialContext();
    // ctx.bind("java:comp/env/jdbc/knockknock", ctx);
    if(ctx == null )
    try {
    throw new Exception("Boom - No Context");
    } catch (Exception ex) {
    Logger.getLogger(NewRegistration.class.getName()).log(Level.SEVERE, null, ex);
    DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/knockknock");
    try {
    con = ds.getConnection();
    } catch (SQLException ex) {
    Logger.getLogger(NewRegistration.class.getName()).log(Level.SEVERE, null, ex);
    } catch (NamingException ex) {
    Logger.getLogger(NewRegistration.class.getName()).log(Level.SEVERE, null, ex);
    i believe that what i am doing is correct from this document of mysql
    http://dev.mysql.com/doc/refman/5.1/en/connector-j-usagenotes-j2ee.html
    But i cannot understand what is the problem. any help is appreciated
    thanks

    Hello there.
    Here's the ServiceLocator and delegates I am using....
    // LoginDelegate.as
    package com.myproj.products.business {
         import com.myproj.products.vo.LoginVO;
         import mx.rpc.IResponder;
         import com.adobe.cairngorm.business.ServiceLocator;
         public class LoginDelegate {
              // anything that implements the IResponder interface can act as a responder
              private var responder:IResponder;
              private var service:Object;
              public function LoginDelegate(responder:IResponder) {
                   this.responder = responder;
                   this.service = ServiceLocator.getInstance().getRemoteObject("loginService");
              public function login(loginAttempt:LoginVO):void {
                   // Call the method of service that resides on server
                   var call:Object = service.login(loginAttempt);
                   // Send the response to responder
                   call.addResponder(responder);
    // com/myproj/products/business/Services.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <cairngorm:ServiceLocator
         xmlns:mx="http://www.adobe.com/2006/mxml"
            xmlns:cairngorm="com.adobe.cairngorm.business.*">
         <!-- Login Service -->
         <mx:RemoteObject
              id="loginService"
              destination="zend"
              source="LoginService"
              showBusyCursor="true">
              <mx:method name="doLogin" />
         </mx:RemoteObject>
    </cairngorm:ServiceLocator>
    With kind regards
    ShiVik

  • A problem determining the JNDI Name of a local EJB with WL 8.1

    Hi,
    I created a very simple local EJB and deployed it with Weblogic8.1. When I test
    it in the Weblogic server admin page, I got the following message:
    "The EJB MyLocal has not been tested successfully. There was a problem determining
    the JNDI Name of the given bean."
    Can anyone help figure out the problem?
    Thanks
    Henry

    Does the ejb have a target server specified?
    Does the Ejb have a Jndi binding as specified in the <local-jndi-name></local-jndi-name>
    element of weblogic-ejb-jar.xml?
    thanks,
    Deepak
    "Henry" <[email protected]> wrote:
    >
    >
    Hi,
    I created a very simple local EJB and deployed it with Weblogic8.1. When
    I test
    it in the Weblogic server admin page, I got the following message:
    "The EJB MyLocal has not been tested successfully. There was a problem
    determining
    the JNDI Name of the given bean."
    Can anyone help figure out the problem?
    Thanks
    Henry

  • Ejb transaction management jndi lookup name problem

    Hi everyone
    i want to use usertransaction object.
    &#304; called it with jndi name like UserTransaction tran = (UserTransaction) ctx.lookup("java:comp/UserTransaction");
    But there are many exception occur.
    Exception in thread "main" java.lang.NoClassDefFoundError: org/netbeans/modules/schema2beans/BaseBean
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
         at com.sun.enterprise.admin.event.AdminEventListenerRegistry.addEventListener(AdminEventListenerRegistry.java:262)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.<clinit>(J2EETransactionManagerImpl.java:1404)
         at com.sun.enterprise.distributedtx.UserTransactionImpl.init(UserTransactionImpl.java:119)
         at com.sun.enterprise.distributedtx.UserTransactionImpl.<init>(UserTransactionImpl.java:101)
         at com.sun.enterprise.distributedtx.UserTransactionImpl.<init>(UserTransactionImpl.java:92)
         at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:194)
         at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:407)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at org.columbus.teien.entities.Deneme.main(Deneme.java:42)
    Caused by: java.lang.ClassNotFoundException: org.netbeans.modules.schema2beans.BaseBean
         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    My session beans are stateless and i use container-managed transaction management(cmt)
    And my application server is glassfish 2.1
    How can i use this problem.
    Thanks for your reply.

    Do you have org.netbeans.modules.* classes referenced in your code?
    Those IDE classes are (correctly) not available on your container so you should consider not using them in your code.

  • Problem with Database JNDI Name

    I have written an entity bean & tring to deploy it with CMP 1.0
    I have already included classes12.jar in my classpath.
    (I am using Oracle database)
    I have specified driver & datasource as follows
    j2eeadmin -addJdbcDriver oracle.jdbc.driver.Driver
    j2eeadmin -addJdbcDataSource jdbc/Oracle jdbc:oracle:[email protected]:1521:listorcl
    When I tried Deployment Settings I have given following specs
    Database JNDI Name : jdbc/Oracle
    User : username
    Password : password
    When I click on Generate SQL Now or Generate Default SQL the following exception occurs .
    NameNotFoundException : Oracle__pm not found
    Note : The J2EE server & Database Server are running.
    Pl Help Me.
    Thanks In Advance

    mmm I will try to explain it better:
    1) long time ago I created my account SDN, in "kind of relationship with SAP option", I indicated "partner"  (i work for consulting company, SAP partner), and register in the form our S000... number.
    2) From there, I login SDN with my personal mail, and in my profile my data OK and like SAP partner.
    3) from a few months ago, when I try to login using my ma.il as usual, I get an error message:
    The email address does not exist.  and that I must enter you user S000 ....
    4) but when I login user our S000.. (such as SAP partner), "Ariela" data appears (who is my boss), because she is the comercial contact person with SAP, and she manage the S000 account 
    5) the history, posts, points and others are mine (Leandro Balboni);
    6) but I do not want is to change this profile, because in this way would be modifying the data responsible for the SAP account as a partner.
    7) I wonder if I can still loing SDN as before,  perhaps must not indicate "partner", but simply put the name of my company.
    8) how can I fix it?
    thanks in advance,
    best regards,
    Leandro
    Edited by: Ariela Mara Fefer on Aug 25, 2009 1:03 PM

  • Problem of JNDI name

    In JBuilder7,the default JNDI Name of a entity bean(Authors) is
    AuthorsRemote (in the webogic-ejb-jar.xml). I configed a Tx DATA source
    configuration using this JNDI name.When I deployed the entity bean , the
    WLS7.0 reported errors like this:
    unable to deploy EJB: Authors from mymod2.jar:
    weblogic.ejb20.WLDeploymentException: Unable to bind EJB Home Interface to
    the JNDI name: AuthorsRemote. The error was:
    javax.naming.NameAlreadyBoundException: AuthorsRemote is already bound;
    remaining name ''
    If I configed the Tx Data Source with a different JNDI name MyJNDI3 and
    deloyed ,I got errors like this:
    javax.naming.NameNotFoundException: Unable to resolve 'AuthorsRemote'
    Resolved: '' Unresolved:'AuthorsRemote' ; remaining name 'AuthorsRemote'
    at
    weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutboundRequest.
    java:109)
    at
    weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
    :262)
    at
    weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
    :229)-- Failed initializing bean access.

    Hi,
    If say, the EJB deploys without error with the jndi name 'AuthorsRemote'
    what do you expect when doing a ctx.lookup("AuthorsRemote")
    A ejb instance or a datasource instance??
    I think the above would validate the error that is thrown.
    Vimala
    paul wrote:
    In JBuilder7,the default JNDI Name of a entity bean(Authors) is
    AuthorsRemote (in the webogic-ejb-jar.xml). I configed a Tx DATA source
    configuration using this JNDI name.When I deployed the entity bean , the
    WLS7.0 reported errors like this:
    unable to deploy EJB: Authors from mymod2.jar:
    weblogic.ejb20.WLDeploymentException: Unable to bind EJB Home Interface to
    the JNDI name: AuthorsRemote. The error was:
    javax.naming.NameAlreadyBoundException: AuthorsRemote is already bound;
    remaining name ''
    If I configed the Tx Data Source with a different JNDI name MyJNDI3 and
    deloyed ,I got errors like this:
    javax.naming.NameNotFoundException: Unable to resolve 'AuthorsRemote'
    Resolved: '' Unresolved:'AuthorsRemote' ; remaining name 'AuthorsRemote'
    at
    weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutboundRequest.
    java:109)
    at
    weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
    :262)
    at
    weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
    :229)-- Failed initializing bean access.

  • New JNDI name created for each drag and drop of database table into table

    Hi All,
    I'm using Netbeans 5.5 with Visual Web Pack with Mysql as backend. Whenever I drag and drop a database table into table component it creates new JNDI (data source) name for each table. I want to use single JNDI name for all tables. If I change the JNDI name to default name then the design disappears and shows error . Is there any option to set the JNDI name unique for all tables?
    Thanks in advance.

    Hi again,
    Well I've tried using the MouseListener / MouseMotionListener approach but it doesn't quite seem to work, although it does get the events correctly. I think the reason is that it doesn't interact correctly with the Java DnD machinery which is something that V.V hinted at. It's something that I may need to look into if / when I have more time available.
    I have to say though that I haven't had any problems with scrollbars - we're making fairly heavy use of large tables and if you drag over a table with a scroll bar and move to the top or bottom then it scrolls as you would expect and allows you to drop the data where you like. For this situation I've used pretty much the same approach as for the toy example above except that I've implemented separate source and destination TransferHandlers (the source table is read-only, and it really doesn't make sense to allow people to drag from the destination table so I've essentially split the functionality of the example handler down the middle).
    I'm not actually particularly in favour of messing too much with the mechanics of DnD, more because of lack of time than anything else. Guess I'll just have to put up with this for the moment. Doesn't help that DnD is so poorly documented by Sun.
    Thanks for all your help.
    Bart

  • A prefix can be included in the EJB JNDI name dynamically?

    In the Stateless annotation, we can specify the mappedName attribute to the EJB JNDI name bind.
    Can we specify a prefix to the mappedName separately?
    For example: We have this:
    @Stateless(mappedName="myEJB")And don't want to do this:
    @Stateless(mappedName="prefix/myEJB")We want to include the prefix in another place in the code dynamically.
    Can we do that??

    jtahlborn wrote:
    eudesf wrote:
    Hello! Thanks for reply!
    As I can't configure programatically, there is any way to configure in an application descriptor, or in another place of the application server?
    The idea is to publish two applications that use the same EJB classes, but in different JNDI namespaces, because we don't want to share the resources. Otherwise, it will result in JNDI name conflicts. The applications works in different contexts and we want to reuse the existing EJB definitions.
    Any suggestion?yes you can do this. ejb 3.0 keeps the features from 2.1, namely all the xml based configuration (although it is now optional). and, the annotations are always overriden by the xml configuration. thus, you can create different deployments with different the same compiled class files. you just need to override the annotation configuration with xml configuration (via ejb-jar.xml or whatever).Yes, we can do that. I've tested here, and it works. But, can we do better?
    The configuration via XML implies maintenance, and it's not good, because we have so many EJBs to maintain.
    And there is another problem... The EJB classes are in JARs, and these JARs are shared across the applications.
    Pretend that you have to maintain two versions of each EJB JAR. One with XML configured and other without. If we change one, the another must be changed too. How can it be productive?
    I have seen some EJB implementations that are more flexible with JNDI naming.
    See:
    - [http://openejb.apache.org/jndi-names.html|http://openejb.apache.org/jndi-names.html]
    - [http://fixunix.com/weblogic/221782-dynamic-jndi-name-weblogic-ejb-jar-xml.html|http://fixunix.com/weblogic/221782-dynamic-jndi-name-weblogic-ejb-jar-xml.html]
    Does it have a better solution in Glassfish?

  • Dynamic jndi-name in weblogic-ejb-jar.xml

    Is there a way to create dynamic (i.e. runtime) jndi-names for EJBs instead of
    (or in addition to) "hard coding" them in the weblogic-ejb-jar.xml file? What
    I'm trying to do is have one WebLogic instance (JVM) host multiple environments
    (our Beta and Training environments) and I simply want to deploy the same .ear
    file twice but have each environment (application - .ear) reference a different
    database schema (jdbc connection pool). I have everything working just fine for
    this scenario except when I define jndi-names for our ejbs. The problem is that
    I am really deploying the same ejbs (jndi-names and actually code base) in each
    applicatoin instance and I get an exception when the WebLogic is trying to deploy
    the second application (.ear) because the jndi-names in it have already been deployed
    by the first application instance. I recieve a jndi error stating that the name
    is already deployed.
    Or is there a better path to go down for what I am trying to do to have one WebLogic
    instance support our beta and training environments? Usually (but not always)
    our code base is the for same for both of these environments, I simply need to
    have each environment use a different database schema.
    Thanks

    A little birdie tells me that BEA does this very thing. Looking at the
    descriptors for WebLogic Portal I see:
    <weblogic-enterprise-bean>
    <ejb-name>LoaderEJB</ejb-name>
    <enable-call-by-reference>True</enable-call-by-reference>
    <jndi-name>${APPNAME}.BEA_content.LoaderHome</jndi-name>
    </weblogic-enterprise-bean>
    Yes, the ${APPNAME} token really is expanded into the J2EE application
    name at deployment time!
    Sincerely,
    Daniel Selman
    Bryan Dixon wrote:
    Rewriting our build process isn't really much of an option for me. Our current
    build process is too complex and time consuming right now to convert to Ant (we
    eventually will do this but not for a while). So are there any other ideas that
    aren't build related?
    Thanks
    "Eric Ma" <[email protected]> wrote:
    You don't need run-time dynamism in JDNI names and it can't be done anyways.
    You
    need token substitution in XML configuration files when building the
    app. If
    you are using Ant for building, then it is a breeze. If not, first convert
    your
    build process to use Ant.
    Also, a single WLS instance hosting multiple environments sounds really
    INTRIGUING
    to me.
    Eric Ma
    "Bryan Dixon" <[email protected]> wrote:
    Is there a way to create dynamic (i.e. runtime) jndi-names for EJBsinstead
    of
    (or in addition to) "hard coding" them in the weblogic-ejb-jar.xml file?
    What
    I'm trying to do is have one WebLogic instance (JVM) host multiple environments
    (our Beta and Training environments) and I simply want to deploy the
    same .ear
    file twice but have each environment (application - .ear) referencea
    different
    database schema (jdbc connection pool). I have everything working just
    fine for
    this scenario except when I define jndi-names for our ejbs. The problem
    is that
    I am really deploying the same ejbs (jndi-names and actually code base)
    in each
    applicatoin instance and I get an exception when the WebLogic is trying
    to deploy
    the second application (.ear) because the jndi-names in it have already
    been deployed
    by the first application instance. I recieve a jndi error stating that
    the name
    is already deployed.
    Or is there a better path to go down for what I am trying to do to have
    one WebLogic
    instance support our beta and training environments? Usually (but not
    always)
    our code base is the for same for both of these environments, I simply
    need to
    have each environment use a different database schema.
    Thanks

  • JNDI Naming Problem accessing Session Bean from Message Driven Bean

    Hi,
         I am facing a very strange problem in JNDI look up accessing a Session Bean from a Message Driven Bean. I have a session fa�ade bean(Remote Bean) which is being called from Struts Action class getting the home reference from the ServiceLocator (I have implemented ServiceLocator pattern to obtain JNDI reference for all EJBs). When I am calling the session fa�ade EJB from the Struts Action class everything is working fine.
         But when I am trying to call the same EJB from my Message Driven Bean, I am getting a JNDI exception (NameNotFoundException - No Object bound to name �java:comp/env/ejb/EJBJNDIName�). I am trying to get the remote reference from the same ServiceLocator which is successfully providing me a reference while calling from the struts action class. But the same ServiceLocator is not able to provide me a reference while calling from the Message Driven Bean. If I use the JNDI name directly like �EJBJNDIName� in the lookup it is working fine. The lookup for the name is working fine and I am able to call the Session Fa�ade bean with that reference.
         I am really not sure what exactly the problem is. If I have any problem in the ServiceLocator, it should have given me the same error while calling from Struts Action class. But it is working fine with the full name �java:comp/env/ejb/EJBJNDIName� calling from the struts action class. I am not sure whether Message Driven Bean has something to do with it. Why I am not able to get a reference of the EJB with the full name? Please Help.
    Thanks
    Amit

    Hi Bhagya,
    Thanks for your response. I think from EJB container we can call Local EJBs with the full JNDI name. The session facade bean which is being called is a remote bean. From the session facade bean I am calling a local stateless session bean for database access. I am getting the reference of the local EJB from my session facade bean with full JNDI name "java:comp/env/ejb/EJBJNDIName". It is working fine with out any problem. My servicelocator is able to provide me the reference of the local EJB from the session facade remote bean with Full JNDI name. I am only having this problem calling from the MDB. I am really not sure whether what is causing it?
    Thanks
    Amit

  • JNDI lookup problem in WAS 5.1

    Hello all,
    I have generated an EAR using XDoclet and MyEclipse. When I deploy this EAR on WAS 5.1, I get the following exception:
    javax.naming.NameNotFoundException: Context: WarHog/nodes/WarHog/servers/server1, name: ejb/TEDIObjectManagerLocal: First component in name TEDIObjectManagerLocal not found.  Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
         at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoundHelper.java:85)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
         at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
         at com.ibm.rmi.iiop.CDRInputStream.readBoxedIDLEntity(CDRInputStream.java:2112)
         at com.ibm.rmi.iiop.CDRInputStream.readIDLValue(CDRInputStream.java:2177)
         at com.ibm.rmi.iiop.CDRInputStream.fast_read_value(CDRInputStream.java:1734)
         at com.ibm.rmi.io.IIOPInputStream.readValueType(IIOPInputStream.java:2085)
         at com.ibm.rmi.io.IIOPInputStream.readObjectField(IIOPInputStream.java:2057)
         at com.ibm.rmi.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:1765)
         at com.ibm.rmi.io.IIOPInputStream.inputObjectUsingClassDesc(IIOPInputStream.java:1348)
         at com.ibm.rmi.io.IIOPInputStream.continueSimpleReadObject(IIOPInputStream.java:420)
         at com.ibm.rmi.io.IIOPInputStream.simpleReadObjectLoop(IIOPInputStream.java:404)
         at com.ibm.rmi.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:347)
         at com.ibm.rmi.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:200)
         at com.ibm.rmi.iiop.CDRInputStream.read_value(CDRInputStream.java:1367)
         at com.ibm.rmi.util.ProxyUtil.copyObject(ProxyUtil.java:450)
         at com.ibm.CORBA.iiop.UtilDelegateImpl.copyObject(UtilDelegateImpl.java:789)
         at javax.rmi.CORBA.Util.copyObject(Util.java:333)
         at com.wdc.tedi.interfaces._TransformationEngine_Stub.transform(_TransformationEngine_Stub.java:268)
         at com.wdc.tedi.web.TestHarnessBean.translate(TestHarnessBean.java:42)
         at com.wdc.tedi.web.TestHarnessBean.setDataBlob(TestHarnessBean.java:80)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)First of all, I don't really understand what the error means. Is it that the JNDI lookup failed when one of my beans tried to do a lookup on 'ejb/TEDIObjectManagerLocal'? I believe there's some configuration that went wrong (EJB reference binding or something) when I deployed the EAR. The reason I don't think it's a faulty code is because the EAR runs like a charm when I deploy it on Oracle 10g and Weblogic.
    I am really stuck on this problem and shall appreciate any help that I can get. I can send the code, xdoclet tags and configuration if that might assist someone.
    Thanks
    -ybh6336

    Hello all,
    I'm still stuck on this issue. Following are the entries related to my
    application when I do a 'dumpNameSpace':
       28 (top)/nodes/WarHog/servers/server1/ejb/tedi/TEDIObjectManager
       28
    com.wdc.tedi.interfaces._TEDIObjectManagerHome_Stub
       29 (top)/nodes/WarHog/servers/server1/ejb/tedi/DSValueLookup
       29
    com.wdc.tedi.interfaces._DSValueLookupHome_Stub
       30 (top)/nodes/WarHog/servers/server1/ejb/tedi/TransformationEngine
       30
    com.wdc.tedi.interfaces._TransformationEngineHome_StubObservations:
    - I only see the namespace entries for my Session beans. There's one
    entity bean also which does not show up.
    - I don't see anything for the Local Home interfaces, it shows only the
    Home interfaces.
    As additional information, I'm looking up 'TEDIObjectManagerLocal'
    using 'ejb/TEDIObjectManagerLocal'. I also tried using 'local:ejb/ejb/TEDIObjectManagerLocal' (as Karthyk suggested) and
    'java:comp/env/ejb/TEDIObjectManagerLocal', but that does not work
    either.
    Also, the XDoclet tags that I use to generate the interfaces for
    TEDIObjectManager bean are as follows:
    /* @ejb.bean name="TEDIObjectManager"
    *           display-name="TEDIObjectManager"
    *           description="TEDIObjectManager"
    *           jndi-name="ejb/tedi/TEDIObjectManager"
    *           local-jndi-name="ejb/TEDIObjectManagerLocal"
    *           type="Stateless"
    *           view-type="both"
    * @ejb.util generate="physical"
    * @ejb.ejb-ref ejb-name="TEDIObject"
    * view-type = "local"
    * ref-name = "ejb/TEDIObjectLocal"
    * @oc4j.bean jndi-name="ejb/tedi/TEDIObjectManager"
    */My ejb-jar.xml looks like following for that bean:
    <session >
             <description><![CDATA[TEDIObjectManager]]></description>
             <display-name>TEDIObjectManager</display-name>
             <ejb-name>TEDIObjectManager</ejb-name>
             <home>com.wdc.tedi.interfaces.TEDIObjectManagerHome</home>
             <remote>com.wdc.tedi.interfaces.TEDIObjectManager</remote>
    <local-home>com.wdc.tedi.interfaces.TEDIObjectManagerLocalHome</local-home>
             <local>com.wdc.tedi.interfaces.TEDIObjectManagerLocal</local>
    <ejb-class>com.wdc.tedi.ejb.TEDIObjectManagerSession</ejb-class>
             <session-type>Stateless</session-type>
             <transaction-type>Container</transaction-type>
             <ejb-local-ref >
                <ejb-ref-name>ejb/TEDIObjectLocal</ejb-ref-name>
                <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>com.wdc.tedi.interfaces.TEDIObjectLocalHome</local-home>
                <local>com.wdc.tedi.interfaces.TEDIObjectLocal</local>
                <ejb-link>TEDIObject</ejb-link>
             </ejb-local-ref>
          </session>AND following for the bean that is referencing it:
    <session >
             <description><![CDATA[TransformationEngine]]></description>
             <display-name>TransformationEngine</display-name>
             <ejb-name>TransformationEngine</ejb-name>
             <home>com.wdc.tedi.interfaces.TransformationEngineHome</home>
             <remote>com.wdc.tedi.interfaces.TransformationEngine</remote>
    <local-home>com.wdc.tedi.interfaces.TransformationEngineLocalHome</local-home>
    <local>com.wdc.tedi.interfaces.TransformationEngineLocal</local>
    <ejb-class>com.wdc.tedi.ejb.TransformationEngineSession</ejb-class>
             <session-type>Stateless</session-type>
             <transaction-type>Container</transaction-type>
             <ejb-local-ref >
                <ejb-ref-name>ejb/TEDIObjectManagerLocal</ejb-ref-name>
                <ejb-ref-type>Session</ejb-ref-type>
    <local-home>com.wdc.tedi.interfaces.TEDIObjectManagerLocalHome</local-home>
    <local>com.wdc.tedi.interfaces.TEDIObjectManagerLocal</local>
                <ejb-link>TEDIObjectManager</ejb-link>
             </ejb-local-ref>
          </session>The entries in ibm-ejb-jar-bnd.xmi (generated using MyEclipse) are as
    follows for the two beans:
    <ejbBindings
             xmi:id="Session_bnd_1"
             jndiName="ejb/tedi/TransformationEngine">
             <ejbRefBindings xmi:id="EJBRefBnd_1"
    jndiName="ejb/TEDIObjectManagerLocal">
        <bindingEjbRef href="META-INF/ejb-jar.xml#EJBLocalRef_1"/>
             </ejbRefBindings>
             <enterpriseBean
                xmi:type="ejb:Session"
    href="META-INF/ejb-jar.xml#Session_TransformationEngine" />
          </ejbBindings>
    <ejbBindings
             xmi:id="Session_bnd_3"
             jndiName="ejb/tedi/TEDIObjectManager">
             <ejbRefBindings xmi:id="EJBRefBnd_2"
    jndiName="ejb/TEDIObjectLocal">
        <bindingEjbRef href="META-INF/ejb-jar.xml#EJBLocalRef_2"/>
             </ejbRefBindings>
             <enterpriseBean
                xmi:type="ejb:Session"
    href="META-INF/ejb-jar.xml#Session_TEDIObjectManager" />
          </ejbBindings>I know I'm swamping the post with code, but please let me know if anyone finds something unusual.
    NOTE: When deploying on WAS, in the 'Map EJB references to beans' step, I'm giving the following values for 'TransformationEngine' bean:
    Reference binding: ejb/TEDIObjectManagerLocal
    JNDI Name: ejb/tedi/TEDIObjectManager
    There's one other similar binding that works for 'TEDIObjectManager'
    bean:
    Reference binding: ejb/TEDIObjectLocal
    JNDI Name: ejb/TEDIObject
    Everything in ejb-jar and ibm-ejb-jar-bnd.xmi look similar for this working bean, there is one difference though, I do the lookup on this one using 'java:comp/env/ejb/TEDIObjectLocal', but I've already tried that for the other one.
    Really appreciate your time.
    Thanks
    -yogesh

  • The DataSource with the JNDI name: MyDataSource could not be located.

    hi,
    I created a connection pool myconnectionpool and i create a data source MyDataSource with jndi name as mydsn.
    in my weblogic-cmp-rdbms-jar.xml i gave
    <data-source-name>MyDataSource</data-source-name> and
    When i deploy the bean i am getting following exception.
    Unable to deploy EJB: containerManaged from cmp7.jar:
    weblogic.ejb20.WLDeploymentException: The DataSource with the JNDI name: MyDataSource could not be located. Please ensure that the DataSource has been deployed successfully and that the JNDI name in your EJB Deployment descriptor is correct.
         at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.setup(RDBMSPersistenceManager.java:128)
         at weblogic.ejb20.manager.BaseEntityManager.setupPM(BaseEntityManager.java:213)
         at weblogic.ejb20.manager.BaseEntityManager.setup(BaseEntityManager.java:185)
         at weblogic.ejb20.manager.DBManager.setup(DBManager.java:160)
         at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.deploy(ClientDrivenBeanInfoImpl.java:928)
         at weblogic.ejb20.deployer.EJBDeployer.activate(EJBDeployer.java:1216)
         at weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:850)
         at weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:70)
         at weblogic.j2ee.Application.addComponent(Application.java:253)
         at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:144)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:364)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:301)
         at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:255)
         at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:206)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:716)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:698)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:380)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:902)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:480)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:208)
         at $Proxy34.updateDeployments(Unknown Source)
         at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:3724)
         at weblogic.management.deploy.slave.SlaveDeployer.updateServerDeployments(SlaveDeployer.java:1584)
         at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.java:337)
         at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resume(DeploymentManagerServerLifeCycleImpl.java:233)
         at weblogic.t3.srvr.ServerLifeCycleList.resume(ServerLifeCycleList.java:61)
         at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:852)
         at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:273)
         at weblogic.Server.main(Server.java:33)
    Where i went wrong?
    Thanks in advance
    phani

    Hi ,
    I have the same problem .when i look into JNDI tree view the jndi name is listed. but it saying error below listed.
    my
    ejb-name:=containerManaged
    datasourcename=EX_DataSource
    jndi-name=EX_JNDI
    <Feb 14, 2005 3:10:08 PM IST> <Error> <Deployer> <149231> <The slave deployer was unable to set the activatio
    true for the application EX_Container
    weblogic.management.ApplicationException: activate failed forEX_Container
    Module Name: EX_Container, Error: Exception activating module: EJBModule(EX_Container,status=PREPARED)
    Unable to deploy EJB: containerManaged from EX_Container.jar:
    The DataSource with the JNDI name: EX_DataSource could not be located. Please ensure that the DataSource has
    ed successfully and that the JNDI name in your EJB Deployment descriptor is correct.
    TargetException:
    Unable to deploy EJB: containerManaged from EX_Container.jar:
    The DataSource with the JNDI name: EX_DataSource could not be located. Please ensure that the DataSource has
    ed successfully and that the JNDI name in your EJB Deployment descriptor is correct.
    at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:1093)
    at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:1022)
    at weblogic.management.deploy.slave.SlaveDeployer.setActivationStateForAllApplications(SlaveDeployer.
    at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.java:376)
    at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resume(DeploymentManagerServerLife
    ava:235)
    at weblogic.t3.srvr.ServerLifeCycleList.resume(ServerLifeCycleList.java:65)
    at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:832)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:300)
    at weblogic.Server.main(Server.java:32)
    my weblogic-ejb-jar.xml
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC
    '-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN'
    'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>containerManaged</ejb-name>
    <entity-descriptor>
    <persistence>
         <persistence-use>
         <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
         <type-version>7.0</type-version>
         <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
         </persistence-use>
    </persistence>
    </entity-descriptor>
    <jndi-name>EX_JNDI</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-rdbms-jar PUBLIC
    '-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB RDBMS Persistence//EN'
    'http://www.bea.com/servers/wls700/dtd/weblogic-rdbms20-persistence-700.dtd'>
    weblogic-cmp-rdbms-jar.xml file
    <weblogic-rdbms-jar>
    <weblogic-rdbms-bean>
    <ejb-name>containerManaged</ejb-name>
    <data-source-name>EX_DataSource</data-source-name>
    <table-map>
    <table-name>ejbAccounts</table-name>
    <field-map>
    <cmp-field>accountId</cmp-field>
    <dbms-column>id</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>balance</cmp-field>
    <dbms-column>bal</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>accountType</cmp-field>
    <dbms-column>type</dbms-column>
    </field-map>
    </table-map>
    </weblogic-rdbms-bean>
    <create-default-dbms-tables>DropAndCreateAlways</create-default-dbms-tables>
    </weblogic-rdbms-jar>
    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>containerManaged</ejb-name>
    <home>containerBN.EX.AccountHome</home>
    <remote>containerBN.EX.Account</remote>
    <ejb-class>containerBN.EX.AccountBean</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>AccountBean</abstract-schema-name>
    <cmp-field>
    <field-name>accountId</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>balance</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>accountType</field-name>
    </cmp-field>
    <primkey-field>accountId</primkey-field>
    <query>
    <query-method>
    <method-name>findBigAccounts</method-name>
    <method-params>
    <method-param>double</method-param>
    </method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(a) FROM AccountBean AS a WHERE a.balance > ?1]]>
    </ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findAccount</method-name>
    <method-params>
    <method-param>double</method-param>
    </method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(a) FROM AccountBean AS a WHERE a.balance = ?1]]>
    </ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findNullAccounts</method-name>
    <method-params>
    </method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(a) FROM AccountBean AS a WHERE a.accountType IS NULL]]>
    </ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>containerManaged</ejb-name>
         <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    <ejb-client-jar>EX_Container.jar</ejb-client-jar>
    </ejb-jar>
    pls lhelp me .
    my email id: [email protected]
    thanks in advance.
    Sudhakar.M

Maybe you are looking for