Accessing collection field in container managed persistence bean

Hello!
How can i get 1:m relatioship, collection fields value?
What is the purpose of ejbSelect-method, in bean business class?

Please ask your EJB questions within the Enterprise JavaBeans section of this forum.
The ejbSelect Method is a query method (like the finder mehtod) but it is not directly exposed to the client in the home interfacce or component interface. Rather, ejbSelect() is used internally within an entity bean as a helper method to accesss a storage. ejbSelect() is useful when you have entity beans in relationships with external data, such as other entity beans.
look at http://www.theserverside.com/articles/content/ApplyingEJB/matena8.pdf for an example

Similar Messages

  • Container Managed Persistence entity bean relationship fields

    I want to ask something that until now still confuse. Did Relationship fields in Container Managed Persistence entity beans declare , inside Database table or only Persistence fields .
    If Relationship fields not declare inside database table ,how if SQL calls the relationship fields between related entity bean.
    did container handle this task.
    example: I have 2 entity bean with CMP(Container Managed Persistence)version 2.0
    call Player and Team. every entity bean have own relationship fields and persistence fields.
    player has playerId(primary key),name,position,age persistence fields and teams is relationship fields.
    team has teamId(primary key),name,city and players is relationship fields.
    I know that all persistence fields is declare in own database table but how about relationship fields.
    can you tellme, How SQL calls can access relationship fields if relatiosnship fields is not declare in database table.
    I use J2EE RI SDK version 1.3
    and deploytool .
    thank's .

    thank's for your reply .Now I have another problem
    I use J2EE RI from java.sun .I try to follow example in j2eetutorial about CMP Example call RosterApp.ear .
    I dont'change anything code inside RosterApp.ear but when I deploy and runclient command thereis syntax error :
    java.rmi.ServerException: Remote exception occured in server thread :nested exception is java.rmi.ServerException :exception thrown from bean :nested exception is : java.ejb.EJBException :nested exception is :java.sql.SQLException :syntax error or access violation ,message from server: "you have an error in SQL syntax near "
    "leagueBeanTable" WHERE "leagueId" = 'L1' at line 1
    in example ,RosterApp.ear use Cloudscape database ,but I try to use Mysql database for RosterApp.ear ,is there any different syntax SQL from Cloudscape to Mysql .
    if like that ,so I must edit first SQL calls from Cloudscape to MYSQL . I think because relationship fields is for entity beans only ,so how if mysql database want to access foreign key another table because foreign key isn't declare in databse table.
    example : I have 3 entity bean call player, team, league .
    1. PlayerEJB have persistence fields name, position, playerId(primary key), cmr fields is teams
    2. TeamEJB have persistence fields name, city, teamId (primary key) , cmr fields is players and leagues .
    3. LeagueEJB have persistence fields name ,sport, leagueId(primary key), cmr fields is teams
    so table is
    PlayerEJB <--->TeamEJB<--->LeagueEJB
    Player have some finder method call findBySport(String Sport) .
    because Sport is persistence fields for LeagueEJB
    so PlayerEJB must traverse TeamEJB first before LeagueEJB
    EJB QL : SELECT distinct object(p) FROM Player (p) IN (p.teams) AS t
    WHERE t.league.sport = ?1
    I know that Container will translates EJB QL to SQL calls ,but default is only for cloudscape database and I use for MYsql .
    so can you helpme how to query method findBySport(String sport) to Mysql calls .
    thereis no foreign key between table in database table there is only Relationship fields in entity bean.

  • Bean or Container Managed Persistence

    Hi,
    I've been reading up on the Sun J2EE tutorial. One of the topics there is bean or container managed persistence. It states that container managed is easier for developers and allows for more portability. The class codes are much smaller compared to bean managed and developers need not worry about database queries.
    Can anyone share their experiences on this? Any 'Real World' advantages and disadvantages? Is there a guideline I can follow when to use bean or container managed persistence?
    Thanks,
    -Ray

    That seems like an obvious flaw. So why was it even considered in the
    J2EE framework? I mean wouldn't the J2EE architects immediately realize
    that? Just doesn't make sense to me why there's even a tutorial or books
    for it. What does it suppose to solve then??I know what you mean... again, I think they thought it looked good on paper.
    And it gets worse...
    Before you use Entity Beans you must be absolutely sure that there will never be another app that accesses the underlying table that doesnt use the EntityBean to do it... For example a C++ App that accesses the tables directly... otherwise you have to set a flag in the App Server that states that basically every time a property on an EntityBean is read the Bean will have to RE-READ the beans state from the database!!
    Some things look really good, from an OO perspective, but dont work really well in reality. Sure Entity Beans look really good in the example program in the tutorial, but what happens when you multiply the number of entity beans by 1000, 100,000, or more? Just think of the CPU, and Memory overhead for instantiating all those objects!
    There are people out there who believe that using Stored Procedures is a no-no because in their minds it puts "Business Logic" on the database and not the App Server...To this I say... BUNK... Ive seen several instances where by simply moving a set of queries from the App Server to a stored procedure on the database, allowed for a 10-20 times performance gain because of the elimination of network IO. In one instance I saw a query go from 3 hours execution time on the App Server to under 10 minutes on the database... But stored procedures arent OO...
    So IMHO before you use EntityBeans at all... be absolutely sure you understand all of the ins-and-outs of doing so.

  • Bean-Managed vs. Container-Managed Persistence

    Hello,
    I would like the real world skinny on bean-managed persistence vs. container-managed persistence. I have heard the bean-managed offers higher scalability and performance, while container-managed offers simplicity but with a cost. Can someone give me some perspective?
    Thanks,
    Rob Miller

    Wrong forum, but I guess if you are new to java it could be argued that anything goes...
    General rule:
    use CMP if you don't have worries about speed or legacy systems.
    use BMP if you need to control the persistence and/or want to connect to legacy host systems. BMP allows you to set up caching and transaction handlers to handle the presistence in a manner more suited to your needs.

  • Container-managed persistence Entity bean

    WE use a container-managed persistence Entity bean. To handle the state synchronization between the object & the database, what must WE do?
    Thanks in Advance

    That's the container's job. You can use the commit option A/B/C to control how the DB and objects are synchronized.
    -Scott
    http://www.swiftradius.com

  • Container Managed Entity Beans and Client Identifier in Oracle

    Is it possible to use Container Managed Entity Beans (EJB with CMP)
    in a way that the Oracle database sessions still know the
    individual Client Identifiers of the actual users
    (not just the Identifier of the proxy user defined in the
    Connection Pool)?
    If Yes: How?
    If No: The consequence would be that the
    technologies EJB with CMP cannot be user together with
    Oracle Virtual Private Databases (VPN) because VPN requires
    some kind of Client Identifier.
    I am grateful for any hint.
    Regards,
    Martin Siepmann
    +49 (0)163 / 7765328

    Not quite an auto-incrementing PK, but it is managed by the container. the following is from the turorial
    Generating Primary Key Values
    For some entity beans, the value of a primary key has a meaning for the business entity. For example, in an entity bean that represents a phone call to a support center, the primary key might include a time stamp that indicates when the call was received. But for other beans, the key's value is arbitrary--provided that it's unique. With container-managed persistence, these key values can be generated automatically by the EJB container. To take advantage of this feature, an entity bean must meet these requirements:
    * In the deployment descriptor, the primary key class is defined as a java.lang.Object. The primary key field is not specified.
    * In the home interface, the argument of the findByPrimaryKey method must be a java.lang.Object.
    * In the entity bean class, the return type of the ejbCreate method must be a java.lang.Object.
    In these entity beans, the primary key values are in an internal field that only the EJB container can access. You cannot associate the primary key with a persistent field or any other instance variable. However, you can fetch the bean's primary key by invoking the getPrimaryKey method, and you can locate the bean by invoking its findByPrimaryKey method.
    Maybe that is good enough
    christina

  • Container-managed persistence application problem

    I worked out a container-manager persistence entity bean application. Everything is fine until I run the client. When I ran the client, I got the following exception from the server side when I turned on "j2ee -verbose":
    "Exception in thread "RequestProcessor[20]" org.omg.CORBA.BAD_PARAM: CourseBean_P
    M_EJBLocalObjectImpl minor code: 1330446342 completed: Maybe
    at com.sun.corba.ee.internal.orbutil.ORBUtility.throwNotSerializableForC
    orba(ORBUtility.java:660)
    at com.sun.corba.ee.internal.iiop.CDROutputStream_1_0.write_abstract_int
    erface(CDROutputStream_1_0.java:631)
    at com.sun.corba.ee.internal.iiop.CDROutputStream.write_abstract_interfa
    ce(CDROutputStream.java:281)
    at com.sun.corba.ee.internal.javax.rmi.CORBA.Util.writeAbstractObject(Ut
    il.java:145)
    at javax.rmi.CORBA.Util.writeAbstractObject(Util.java:128)
    at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectDelegate(IIO
    POutputStream.java:99)
    at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectOverride(IIO
    POutputStream.java:106)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:271)
    at java.util.ArrayList.writeObject(ArrayList.java:513)
    at com.sun.corba.se.internal.io.IIOPOutputStream.writeObject(Native Meth
    od)
    at com.sun.corba.se.internal.io.IIOPOutputStream.invokeObjectWriter(IIOP
    OutputStream.java:525)
    at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutput
    Stream.java:492)
    at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPO
    utputStream.java:125)
    at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(Valu
    eHandlerImpl.java:134)
    at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandler
    Impl.java:114)
    at com.sun.corba.ee.internal.iiop.CDROutputStream_1_0.write_value(CDROut
    putStream_1_0.java:1049)
    at com.sun.corba.ee.internal.iiop.CDROutputStream_1_0.write_value(CDROut
    putStream_1_0.java:638)
    at com.sun.corba.ee.internal.iiop.CDROutputStream.write_value(CDROutputS
    tream.java:268)
    at _RegisterBean_EJBObjectImpl_Tie._invoke(Unknown Source)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(Ge
    nericPOAServerSC.java:519)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(Gen
    ericPOAServerSC.java:204)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(GenericPOAS
    erverSC.java:112)
    at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:273)
    at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProces
    sor.java:84)
    at com.sun.corba.ee.internal.orbutil.ThreadPool$PooledThread.run(ThreadP
    ool.java:99)
    Anybody has any insight in this. I checked the appliation using the verification tool, it shows no problem at all. I am really out of idea!
    Thanks a lot!

    send me your contact info and i think i can help.
    my email is : [email protected]
    In addition I believe ssniazi is in violation of the conduct code of this website because ssniazi is requesting information which will be used by a business entity without telling the users that it will be used in that way. And I expect that Oracle itself would frown on such activities.
    2.3 You agree that You will not use the Website to:...(g) collect or store personal data about other users unless specifically authorized by such users.

  • Finder method in container-managed entity bean

    Finder method of a container entity bean is taking the primary key class object of another entity bean. How to map this in the xml descriptor file weblogic-cmp-rdbms.xml for this type of beans.
    I am trying to deploy the jasmine computer store of Mastering EJB by EdRoman.
    I couldn't write the deployment file weblogic-cmp-rdbms.xml for Order Entity bean which uses CustomerPK as an argument in its finder method.
    Please tell me how to write this. I am trying on weblogic 5.1
    Thanx in advance
    Srivatsa

    hello,
    in container managed persistence, you specify on your xml file the name of your table. so the primary key you want to use have to be a foreign key in your table. otherwise i don't think that you can use a container managed persistence.
    Najib.

  • Setting composite key in Container Managed Entity Bean

    In my database table i set primary key to two columns making them as composite key. how do i set that in my container managed entity bean home interface findByPrimaryKey() method and in deployment descriptor file.

    1. create another class (say CompositePK) that will embed the two fields keyA and keyB corresponding to the two pk of your table (declare them public) .
    2. in your Bean declare keyA and keyB public.
    3. in the dd declare your bean primary-key-class as CompositePK and the primary-key-field as keyA and keyB.
    this is the method i use (with BAS) even if the key is simple (such as Integer).

  • Can i user UserTransaction  in a Container-managed transaction Bean

    can i use UserTransaction to control transaction boundaries in a container-managed transaction bean method?
    below is the method:
    there is one-to-many between Employees and SalaryItem
    @TransactionAttribute(value = TransactionAttributeType.REQUIRED)
    private void initEmployeesSalary(Long salarySumId) {
    for(Employees employees: liEmployees){
    for (int i = 0; i < 20; i++) {                                                           
    SalaryItem item = new SalaryDetailItem();
    employees.addSalaryItem(item);
    when there are about 1000 employees,the method run very slow.
    What do you think I should do?
    null

    Hi again,
    The EJB specs say that a stateful Session Bean with CMT is NOT allowed to use the UserTransaction; see page 361 of the EJB2.0 specification. So combining them will not (or should not) work.
    I suggest CMT+SessionSynchronization combined with using a flag to indicate whether notify should be called or not. Otherwise, you could try splitting up the bean into two beans: one with CMT and another one without. The one without CMT could use the UserTransaction and notify.
    Also, you might want to check http://www.onjava.com/pub/a/onjava/2001/10/02/ejb.html
    Hope that helps a bit,
    Guy
    http://www.atomikos.com

  • Extreamly slow container managed persistence

    Hi.
    We perform the following procedure:
    1. We invoke a finder method on a container managed bean
    2. Then we traverse the enumeration of beans returned and invoke a getter
    method to get their properties.
    The finder finishes really fast, but then traversing the enumeration takes
    about 1 second per entity bean.
    Any suggestions?
    Giora Katz-Lichtenstein

    Hi,
    When you're iterating through your collection or enumeration of primary
    keys, each method call is going to the database to retrieve the row
    associated with that primary key. I'll bet the issue is with the calls to
    the db or whatever persistent store you're using.
    Steve...
    Giora <[email protected]> wrote in message
    news:82kolv$192$[email protected]..
    Hi.
    We perform the following procedure:
    1. We invoke a finder method on a container managed bean
    2. Then we traverse the enumeration of beans returned and invoke agetter
    method to get their properties.
    The finder finishes really fast, but then traversing the enumeration takes
    about 1 second per entity bean.
    Any suggestions?
    Giora Katz-Lichtenstein

  • 1-many CMP2.0 Container Managed Persistence

    Sorry for posting this again, but there did not seem to be any replies.
    I have noticed a very strange phenomena in 1-many container managed relationships in the J2EESDK1.3.
    In 1-many Container Managed Relationships, the J2SDKEE1.3 actually generates 3 tables rather than 2. The first table is the 1 side table. The second table is the many side table. The third table is a relation table joining the 1 side table and many side table. This relation table has 2 fields, one is the primary key of the many side table (this field becomes the primary key of the relation table) and the other field is the primary key of the one side table.
    This generation of a new table for 1-many relationships is giving me a headache because these tables now form a (0 or 1) - many relationship now.
    Is this defined as part of the EJB2.0 spec or is this a J2SDKEE1.3 dependant feature?

    I'm afraid I can't give you an exact answer to this question, but it seems to me that this is a work-around in order not to create the relationshis in the DB.
    I have noticed this behaviour as well, only I have found another problem with it. The relationship table doesn't seem to survive an undeploy or server restart. Do you have the same problem?
    I think that maybe a commercial application server with a database for which it has been optimized will not show this behaviour, but will define the relationship as meta-data in the DB.

  • Unable to call Container Managed Entity Bean

    Hi
    I am developing a JMS application using NetBeans 5.5.1 and Sun Java Application Server 9.0 and J2EE 1.4.When I run the application client it throws me following EXCEPTION:
    {color:#ff0000}Sep 9, 2010 1:43:43 PM com.sun.enterprise.appclient.MainWithModuleSupport <init>
    WARNING: ACC003: Application threw an exception.
    javax.naming.NameNotFoundException: No object bound to name java:comp/env/jms/MDBDestinationFactory
    at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:751)
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:156)
    at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:307)
    at javax.naming.InitialContext.lookup(InitialContext.java:392)
    at jmsdemo.Main.main(Main.java:30)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:232)
    at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:329)
    at com.sun.enterprise.appclient.Main.main(Main.java:180)
    Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:340)
    at com.sun.enterprise.appclient.Main.main(Main.java:180)
    Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:232)
    at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:329)
    ... 1 more
    Caused by: javax.naming.NameNotFoundException: No object bound to name java:comp/env/jms/MDBDestinationFactory
    at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:751)
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:156)
    at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:307)
    at javax.naming.InitialContext.lookup(InitialContext.java:392)
    at jmsdemo.Main.main(Main.java:30)
    ... 7 more
    {color}{color:#000000}Source Code for Message Driven Bean:
    package jmsdemo;
    import javax.ejb.*;*
    import javax.jms.Message;
    import javax.jms.MessageListener;
    import javax.jms.TextMessage;
    *public class MDBBean implements MessageDrivenBean, MessageListener {*
    private MessageDrivenContext context;
    *public void setMessageDrivenContext(MessageDrivenContext aContext) {context = aContext;}*
    public void ejbCreate() {}
    public void ejbRemove() {}
    *public void onMessage(Message aMessage) {*
    if(aMessage instanceof TextMessage)
    TextMessage t = (TextMessage)aMessage;
    try
    System.out.println("Received message : " + t.getText());
    *}catch(Exception e) {e.printStackTrace();}*
    Source code for JMS Client:
    package jmsdemo;*
    import javax.jms.;
    import javax.naming.*;*
    *public class Main {*
    *public Main() {*
    public static void main(String[] args) throws Exception
    *// TODO code application logic here*
    InitialContext ic = new InitialContext();
    ConnectionFactory cf = (ConnectionFactory)ic.lookup("java:comp/env/jms/MDBDestinationFactory");
    Destination dest = (Queue) ic.lookup("java:comp/env/jms/MDBBean");
    Connection con = cf.createConnection();
    Session session = con.createSession(false,Session.AUTO_ACKNOWLEDGE);
    MessageProducer mp = session.createProducer(dest);
    TextMessage tm = session.createTextMessage();
    tm.setText("Hello world .,.");
    System.out.println("Sending message ...");
    mp.send(tm);
    con.close();
    Generating code for ejb-jar.xml
    <?xmlversion="1.0"encoding="UTF-8"?>*
    *<ejb-jarversion="2.1"xmlns="[http://java.sun.com/xml/ns/j2ee%22xmlns:xsi=%22http://www.w3.org/2001/XMLSchema-instance%22xsi:schemaLocation=%22http://java.sun.com/xml/ns/j2eehttp://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd]">*
    *<display-name>JMSDemo-ejb</display-name>*
    *<enterprise-beans>*
    *<message-driven>*
    *<display-name>MDBMDB</display-name>*
    *<ejb-name>MDBBean</ejb-name>*
    *<ejb-class>jmsdemo.MDBBean</ejb-class>*
    *<transaction-type>Container</transaction-type>*
    *<message-destination-type>javax.jms.Queue</message-destination-type>*
    *<message-destination-link>MDBDestination</message-destination-link>*
    *<activation-config>*
    *<activation-config-property>*
    *<activation-config-property-name>acknowledgeMode</activation-config-property-name>*
    *<activation-config-property-value>Auto-acknowledge</activation-config-property-value>*
    *</activation-config-property>*
    *<activation-config-property>*
    *<activation-config-property-name>destinationType</activation-config-property-name>*
    *<activation-config-property-value>javax.jms.Queue</activation-config-property-value>*
    *</activation-config-property>*
    *</activation-config>*
    *</message-driven>*
    *</enterprise-beans>*
    *<assembly-descriptor>*
    *<container-transaction>*
    *<method>*
    *<ejb-name>MDBBean</ejb-name>*
    *<method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <message-destination>
    <display-name>DestinationforMDB</display-name>
    <message-destination-name>MDBDestination</message-destination-name>
    </message-destination>
    </assembly-descriptor>
    </ejb-jar>
    Please let me when I am going wrong.
    Thanks in advance
    Senthil{color}

    Hi
    I am using sun java application server 9.0 and netbeans 5.5.1. For your information the Netbeans 5.5.1 has created already Queue in the sun java application server 9.0 when I created Message driven bean and I am able to see the queue connection in the Sun application server admin console. Even then I getting the same exception displayed below:
    {color:#ff0000}Sep 11, 2010 11:45:17 AM com.sun.enterprise.appclient.MainWithModuleSupport <init>
    WARNING: ACC003: Application threw an exception.
    javax.naming.NameNotFoundException: No object bound to name java:comp/env/jms/MDBDestinationFactory
    at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:751)
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:156)
    at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:307)
    at javax.naming.InitialContext.lookup(InitialContext.java:392)
    at jmsdemo.Main.main(Main.java:30)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:232)
    at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:329)
    at com.sun.enterprise.appclient.Main.main(Main.java:180)
    Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:340)
    at com.sun.enterprise.appclient.Main.main(Main.java:180)
    Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:232)
    at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:329)
    ... 1 more
    Caused by: javax.naming.NameNotFoundException: No object bound to name java:comp/env/jms/MDBDestinationFactory
    at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:751)
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:156)
    at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:307)
    at javax.naming.InitialContext.lookup(InitialContext.java:392)
    at jmsdemo.Main.main(Main.java:30)
    ... 7 more
    Java Result: 1
    {color}
    The following connection properties {color:#0000ff}*jmsCF-jms_MDBBean.sun-resource_*{color} file:
    <?xml version="1.0" encoding="UTF-8"?>
    <resources>
    <connector-resource enabled="true" jndi-name="jms/MDBDestinationFactory" object-type="user" pool-name="jms/MDBDestinationFactory">
    <description/>
    </connector-resource>
    <connector-connection-pool connection-definition-name="javax.jms.QueueConnectionFactory" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" max-pool-size="32" max-wait-time-in-millis="60000" name="jms/MDBDestinationFactory" pool-resize-quantity="2" resource-adapter-name="jmsra" steady-pool-size="8"/>
    </resources>
    The following connection properties {color:#0000ff}_jms-jms_MDBBean.sun-resource_{color} file:
    <?xml version="1.0" encoding="UTF-8"?>
    <resources>
    <admin-object-resource enabled="true" jndi-name="jms/MDBBean" object-type="user" res-adapter="jmsra" res-type="javax.jms.Queue">
    <description/>
    <property name="Name" value="MDBBean"/>
    </admin-object-resource>
    </resources>
    Please help.
    Thanks in advance
    Senthil

  • Container managed persistence

    Hi!
    I'm trying to figure out how CMP works with IPlanet but haven't found any
    examples. I would need to know where to define the table names that my
    entity beans use?
    Sebastian

    Hi Seb,
    Please find the attached file .....will help u
    Ananthram
    "Sebastian Lofhjelm" wrote:
    Hi!
    I'm trying to figure out how CMP works with IPlanet but haven't found any
    examples. I would need to know where to define the table names that my
    entity beans use?
    Sebastian

  • How to add a finder method in the container manager Bean in the weblogic6.1

    in the environment jbuilder6 andweblogic6.1,use container manager entity Bean,it can automatic generate the findAll() method,I want to add a new method to find an element in the home interface,such as findByName(),name is a element of a table of the database.in the weblogic-cmp-rdbms-jar.xml,this is part of the fiile:
    <finder>
    <finder-name>findAll</finder-name>
    <finder-query><![CDATA[ (= 1 1) ]]></finder-query>
    </finder>
    <finder>
    <finder-name>findByName</finder-name>
    <finder-param>java.lang.String</finder-param>
    <finder-query><![CDATA[ (=name $name) ]]></finder-query>
    </finder>
    It can successfully compile the findAll(),but it is wrong when compile the findByName(),as follows
    "www.ejbgrpx": Method Name: findByName
    "www.ejbgrpx": Invalid specifications for a WebLogic RDBMS CMP EJB.
    "www.ejbgrpx": ERROR: Error from ejbc: weblogic.ejb20.cmp11.rdbms.finders.IllegalExpressionException:
    "www.ejbgrpx": While trying to process Finder
    "www.ejbgrpx": Parameter Types: (java.lang.String)
    "www.ejbgrpx": WebLogic Query: (= name $name)
    "www.ejbgrpx": Finder Expressions: ()
    "www.ejbgrpx": Could not parse WLQL expression: (= name $name) null
    "www.ejbgrpx": ERROR: ejbc found errors
    thank you

    The finder methods that you are referring to are only simple finder methods. If you would like to add specialized finder methods, you can make your entity bean with bean managed persistence and not container managed. If you are using EJB 2.0, your entity bean with container managed persistence can use EJB QL for finder methods. You can search for this topic and/or download the EJB 2.0 specifications
    Hope this helps

Maybe you are looking for

  • How can I develope a native mobile cross platform app that can access an SQL server.

    I would do it in html5 as a web app but I also need to access an SQL server and upload data(text) pictures from the camera and geolocation data etc. I've developed many web based applications, but this is this first attempt to integrate native device

  • When I plug my iPod in nothing pops up!

    You know when you plug an iPod in and that little window pops up and it let you import your photos? That won't pop up for my iPod touch 4th generation. I am plugging it in to the USB port on my computer and I want to import my photos and that little

  • Query on Lock object

    Hi, I need to lock the Custom table based on company code. I have an Internal table with list of company codes. Now I need to lock the table for All the company codes there in ITAB. I am doing like this. Before Save: LOOP AT it_lock INTO wa_t001.    

  • Forms Personalization - How to pass parameter to a Report

    Hi All, I am trying to run a report from a menu entry in the AP Invoice entry form. For this I have done the necessary steps of creating the menu entry and am assigning the values for the 2 parameters to a global variable and then launching SRS form.

  • Error when installing Lenovo solutions for small business [Screenie included]

    Hello everyone. Recently, I tried opening the pre-installed Lenovo solutions for Small Business software on my Lenovo e530 running Windows 7 Professional 64-bit version (Upgraded from Win 7 Home Prem 64-bit) but failed after getting a message for enc