EJB persistence question...

Hi experts,
I need to do the following operations over a table:
1. Delete all data table.
for example by using SQL: delete from table2. Update several rows at the same time.
for example by using SQL: update MY_TABLE set MY_FIELD = 'New value for the column field'3. Insert several rows at the same time.
for example by using SQL: insert into MY_TABLE select * from MY_TABLE2easiest by using SQL, but using EJBs......!!!
I know that a EJB entity maps one row at the same time and the basic methods of the bean life cycle (create, store, remove, etc) only applies for the row mapped.
How can I do this operations over several rows in a table using EJBs ??
The only manner that I know is to do a loop for to iterate over each entity bean by making a findByPrimaryKey, sets bean attributes and then to wait for the ejbStore, ejbRemove, etc.
is there another way or pattern for manage a table (several rows) in order to avoid this loop...?
thanks in advance

I know that a EJB entity maps one row at the same
time and the basic methods of the bean life cycle
(create, store, remove, etc) only applies for the row
mapped.Exactly !
How can I do this operations over several rows in a
table using EJBs ?? It's not possible.
The only manner that I know is to do a loop for to
iterate over each entity bean by making a
findByPrimaryKey, sets bean attributes and then to
wait for the ejbStore, ejbRemove, etc.
is there another way or pattern for manage a table
(several rows) in order to avoid this loop...?No. Therefore I would advice to use SQL for those operations.
EJB's won't work well, because of performance problems.

Similar Messages

  • Ejb-ref questions:

    1.if an entity-A is referece to entity-B , and entity-B
    is referece to entity-C (and that is
    declared in entity-B 'ejb-jar.xml' !) , when adding
    'ejb-local-ref' to entity-A ,beside of adding
    entity-B,should entity-C be added too ,or a one can
    assume that the EJB container will use the already define
    reference between entity-B and entity-C.
    This is a simple situation , what about a whole graph
    of references ? should one keep track on the whole graph
    or let the container do that for him ?!
    2.I got several entity beans.
    I wrapped the session beans in a java class as a manager.(through the local interfaces) - and now i created a session bean that uses the data managers layer - I defined an ejb ref to all related entity beans (in the seiion bean ejb - jar file) ....when i run the sesiion functions i get EJBException - not bound (refering the entity bean local home) ?????
    Thanks,
    Liat

    In jboss xml the entity is defined like this:
    <entity>
             <ejb-name>User</ejb-name>
             <local-jndi-name>ejb/persistence.UserLocal</local-jndi-name>
             <jndi-name>ejb/persistence.User</jndi-name>
          </entity>and in the ejb jar the local ref is:
    <ejb-local-ref>
                    <ejb-ref-name>Permission</ejb-ref-name>
                    <ejb-ref-type>Entity</ejb-ref-type>
                    <local-home>persistence.PermissionLocalHome</local-home>
                    <local>persistence.PermissionLocal</local>
                    <ejb-link>Permission</ejb-link>
                </ejb-local-ref>I am looking for the object - in the data manager (which used by the session bean) this way:
    permissionLocalHome = (PermissionLocalHome) locator.getEjbLocalHome("java:comp/env/ejb/persistence.PermissionLocal");thanks for the help

  • EJB persistence

    Are within ejb persistence created some xml mapping files ( so one xml mapping file for one persistence class, like it's e.g. within hibernate) or all we do is adding some annotations inside persistence class definition? and I'm not talking about persistence.xml file

    u mean to say Hibernate is the best. How do you think Hibernate is better than TOPLink? Because some of the people i know are telling TOPLink is the best. So i would like to know your opinion on TOPLink.

  • EJB interview question

    dear friends
    if any body is having a real time ejb interview question , pl. send me a link for that.
    Thanks
    Gopal

    http://forum.java.sun.com/thread.jsp?thread=333894&forum=13&message=1363968

  • To EJB or Not to EJB (Design Question)

    Hello,
    New to EJB i am devlepoing a simple test App. Your suggestions will be very valuable.
    Test App..
    - Authenticate process
    - Search for Orders
    Our compnay policy forces that We must validate the sessionID (created internally) on every page call. Expected Client maybe Web srvices/servlet/JSP. Multiple users and heavy traffic expected.
    My Design...
    - Make Stateless Session EJBs for Authentication
    - Make Stateless Session EJBs for Orders search. Number of functions will be exposed for searching.
    Questions
    - Does it make sense to wrap all the SQL select calls in SESSION EJB? or should i call from JSP directly
    - IS SEESION EJB for authentication is the right choice
    - which is the best place for using Entity EJBs
    Regards
    H

    A good app. design would be as follows:
    Use three "Application Layers"
    1. PRESENTATION LAYER: this layer includes
    -JSP (only for view purposes!!!)
    -FrontController (Pattern usally implemented as Servlet for handling authentication/authorisation AND session handling!!!!!!)
    -ServiceDispatcher (Pattern for dispatching ;-))
    -BusinessDelegate (for encapsulation from the BUSINESS LAYER)
    2. BUSINESS LAYER: this layer includes
    -SessionFacade (usally Stateless Session Beans for your needs for example order!!!)
    3. PERSISTENCE LAYER: this layer includes
    -EntityBeans (CMP or BMP you must decide wich is better for your needs....I prefer BMP, it is more coding, but you are not dependent on app. server provider....CMP runs faster!!!!)
    -DataAccessObject (DAO--> here are your sql-statements and db-connections)
    For all Patterns here look at this side for more information
    http://java.sun.com/blueprints/corej2eepatterns/Patterns/
    TIP: Use the Session API for your session handling!!!!!!!!!!!!
    Regards
    howmad23

  • EJB Persistence using cron job

    We have a EJB based bean managed persistence classes that run on the app server. I want to use same classes using cron job.
    How do I do that???
    Tried to execute these classes thru following steps...
    In side stand alone java class - main method create instance of the pmf and get persistence manager.
    Start a tread and call JDO object using persistence manager.
    getting whole bunch or errors like system-server-config.xml file not found. I am not able to create InitialContext outside app server.
    Please give your suggestions. TIA

    Why don't you use a J2EE based scheduler?
    http://java-source.net/open-source/job-schedulers/quartz
    http://java-source.net/open-source/job-schedulers/jcrontab

  • Re: EJB Design Question

    Hi All,
    I am developing an application based on MVC design pattern in which the servlets
    is the main controller . I am planning to use session beans to access the database
    rather than making direct JDBC calls from the servlet.
    The Session bean would use a connection from a pool and return it back when its
    done with it.
    My question is if there are multiple users accessing the servlet then would there
    be different connection objects and each client would start a new thread/
    Also is there any problem with the above design ?
    Thanks...Kevin

    View - JSP Or Servlet
    Controller - Servlet
    Model - Java Bean
    Session Bean - Facade for Workflow
    Entity Bean - Persistence and Business Logic
    Also look at
    www.theserverside.com
    My question is if there are multiple users accessing the servlet then would
    there
    be different connection objects and each client would start a new thread.
    -Servlets are multithreaded (unless you are using the single threaded
    model). For example you might get a call on doGet() while another is being
    processed on the servlet instance. If you make sure that all you resources
    (session beans, connections etc) are created and destroyed within the
    lifecycle of the doGet() you are safe. All shared data (like session data)
    should be made thread safe.
    "Kevin" <[email protected]> wrote in message
    news:3cb59182$[email protected]..
    >
    Hi All,
    I am developing an application based on MVC design pattern in which theservlets
    is the main controller . I am planning to use session beans to access thedatabase
    rather than making direct JDBC calls from the servlet.
    The Session bean would use a connection from a pool and return it backwhen its
    done with it.
    My question is if there are multiple users accessing the servlet thenwould there
    be different connection objects and each client would start a new thread/
    Also is there any problem with the above design ?
    Thanks...Kevin

  • EJB Doubts/Questions - HELP

    Hi All,
    I am new to EJB technology and i am learning EJB without training canter. I am just going through Java EE tutorials available on www.oracle.com .
    My knowledge of EJB Session bean say:
    1.     Stateful Session Bean     : Maintains the client state.
    2.     Stateless Session Bean     : Does not maintain the client state.
    Now I am developing Shopping Cart Example using EJB, Servlet, JSP and HTML pages.
    My Project contains following pages:
    1.     login.html
    2.     AuthenticateServlet.java
    3.     User.jsp
    4.     PurchaseServlet
    5.     PurchaseSuccessful.jsp
    6.     AuthenticateBean – Stateful Session Bean
    7.     AutheticateBeanRemote – Remote Interface of Authenticate Bean
    8.     PurchaseBean – StatefulSession Bean
    9.     PurchaseBeanRemote -- Remote Interface of PurchaseBean
    Session Bean with its remote interface is maintained in the ejb package.
    Login.html contains;
    1.     textbox named “txtUser”
    2.     Password textbox named “txtPass”
    3.     Submit Button
    On submitting the credentials, it will check for the authentication in the AuthenticateServlet.
    AuthenticateBean contains
    public boolean authenticate(String user, String pwd)
         if(anylogic)
    return true;
         else
              return false;
    The above method is exposed in AuthenticateBeanRemote Interface.
    2. AuthenticateServlet contains
    I have done lookup of AuthenticateBeanRemote and have created abr. Below some important code of AuthenticateServlet;
    String user = request.getParamter("txtUser") ;
    String pwd = request.getParamter("txtPassr") ;
    boolean flag = abr.authenticate(user,pwd);
    if(flag)
         // then it will direct the control to User Page
    else
    out.println("Failure");
    User.jsp page will show me the UserID and some task that the authenticated user can do.
    My question: is while redirecting the page to User.jsp from AuthenticateServlet, do I need to do URLRewritting to maintain the session or do I need to create separate HTTPSession Object or does the Stateful session bean will take care of session management on its own. i.e. no need to do anything, just transfer or redirect to User.jsp page .
    User.jsp has purchase catalog of which the user will select products and click on purchase. On clicking purchase, it will take us to PurchaseServlet.
    My question Now in the PurchaseServlet if I have written the code to access the methods in PurchaseBean, Whether it will be a guarantee that the authernticated and currently logged in user is accessing the methods so that only that person’s purchased items are visible and no mishap will occur regarding the user integrity.
    PurchaseBean only contains the method to add the amount.
    My Question: if at the same time 2-3 users are logging in the application, then whether by using the statefulsession bean, user integrity is maintained. OR do I need to use some other approach.
    Please help me... I know these questions are silly but that’s the way the technology can be learned.

    user8687589 wrote:
    Please help me... I know these questions are silly but that’s the way the technology can be learned.You are SO wrong. You learn it by:
    a) reading and studying
    b) really understanding not only the technology but also the theory behind the technology
    c) learning how it works, why it works, when it works and when you should or shouldn't use it
    A common denominator here is that you apply thought, reason and intelligence to get not only the basics but the big picture. Don't learn how to use it: UNDERSTAND it. That does not include just demanding all the answers in a forum and expect to have the answers spoon-fed to you. First read and study, then we'll talk.

  • Read-mostly pattern & EJB-QL question when using Weblogic 8.1

    I want to use the same implementation of an CMP entity bean for the
    read-mostly pattern in BEA Weblogic 8.1 (means for the reader and the
    writer class).
    Therefore my ejb-jar.xml contains the following statements:
    <ejb-name>MyBeanReadOnly</ejb-name>
    <local-home>mypackage.MyBeanLocalHome</local-home>
    <ejb-name>MyBean</ejb-name>
    <local-home>mypackage.MyBeanLocalHome</local-home>
    The weblogic-ejb-jar.xml and weblogic-cmp-rdbms-jar.xml have the proper
    changes.
    I can deploy this bean & for the corresponding session bean binding
    and calling methods works for the (virtual) read-only and read-write
    entity beans.
    When we are using Xdoclet and ejb.finder methods e.g.
    @ejb.finder
    signature="java.util.Collection findAllValid(java.util.Date date)"
    result-type-mapping="Local"
    query="SELECT DISTINCT OBJECT(u) FROM MYTABLE AS u
    WHERE (?1 >= u.validFrom) AND ((u.validUntil IS NULL)
    OR (?1 <= u.validUntil))"
    the compilation and packaging runs well (as usual).
    During the deploy to Weblogic 8.1 we get errors, because the
    implementation of MyBeanReadOnly's findAllValid(...) should return
    objects of type MyBeanReadOnly instead of MyBean.
    Is there a way to solve this problem
    - and not write seperate reader and writer classes like
    the Weblogic 5.1 sample implementation?
    - and not use the CMP optimistic locking?
    Thanks for any further information.
    Wolfgang

    surya jeedigunta wrote:
    We are using Weblogic 8.1 SP2 and our Oracle Database is of version 9.2.0.5.
    I created user ID 'testa' in the database which owns all the objects.
    I created another userID 'testb' which has privileges to read, modify and delete data from tables owned by testa.
    I created public synonyms for all the objects owned by testa.
    I set the userid 'testb' and password in weblogic administrator window and set the same in reg.xml file also.
    Now when I tried to install the application, I got the following errors:
    BEGINNING INSTALLATION
    START INSTALLING FORMS SECTION
    Installing Form ./dataform/EventHistory.xml...<ErrorStack>
    <Error>
    <Code>FORM_045</Code>
    <Msg><![CDATA[ Form "Form" schema lacks some required columns:
    Field=ID column=ID does not exist in table=QSTForm
    Field=Name column=Name does not exist in table=QSTForm
    Field=Version column=Version does not exist in table=QSTForm
    Field=Content column=Content does not exist in table=QSTForm
    Field=LastModified column=LastModified does not exist in table=QSTForm ]]></Msg>
    </Error>
    <Error>
    <Code>FORM_7</Code>
    <Msg><![CDATA[ Failed to bind FDT columns, exception com.quovadx
    .bpms.core.CWException: (FORM_045) Form "Form" schema lacks some required column
    s:
    Field=ID column=ID does not exist in table=QSTForm
    Field=Name column=Name does not exist in table=QSTForm
    Field=Version column=Version does not exist in table=QSTForm
    Field=Content column=Content does not exist in table=QSTForm
    Field=LastModified column=LastModified does not exist in table=QSTForm ]]></Msg>
    </Error>
    My question is :
    does weblogic 8.1 works when I use public synonyms and user id other than the schema owner ID?
    I would appreciate if somebody could help me with this.
    Thank YouHi. I wish I could help you more, but so far, from what symptoms you've shown us,
    this is a purely internal Oracle issue to do with what your second user sees or
    can access. The fact that the user is logging in via JDBC or through WebLogic is
    irrelevant.
    Joe

  • EJB Classpath Question

    Hi,
    I have a burning question regarding EJBs and classpaths.
    Here is my situation:
    - My application uses EJBs, Servlets and JSP pages
    - My EJB remote interfaces and implementation classes extend common,
    abstract base classes
    - My EJB implementation classes use several utility classes, which are
    also used by my servlets.
    - Each EJB is deployed in a separate JAR file
    The question I have is which classes should be included in the EJB JAR
    files.
    I'd like to put just the EJB implementation class in the EJB JAR, and
    put everything else in a common JAR that is placed in my WEB-INF/lib
    folder and shared by the rest of the application. However, if I do
    that, Weblogic won't load the EJBs because it tries to do so before it
    deploys my web app, and hence before it adds the JARs in the
    WEB-INF/lib folder to its classpath.
    I can explicitly add my jar to the Weblogic classpath on the
    commandline (weblogic.class.path property). Now my EJBs load. However,
    my servlets become unable to load any classes from any jar in
    WEB-INF/lib. I read something about it being a bad idea to include a
    jar from WEB-INF/lib in the classpath, so I'm probably seeing that
    problem.
    The third option is to include all the dependent classes in my EJB
    jars themselves, in addition to deploying them in WEB-INF/lib. This
    works, but it bothers me that there are multiple copies of the same
    class files lying around.
    I'm sure I'm not the first developer who's written an EJB that shares
    classes with a servlet or JSP page. What's the proper way to do this?
    Thanks.

    Use a ClassPath entry in your EJB jar module MANIFEST.MF file
    Mark Cordobal
    [email protected] (Frank LaRosa) wrote:
    Hi,
    I have a burning question regarding EJBs and classpaths.
    Here is my situation:
    - My application uses EJBs, Servlets and JSP pages
    - My EJB remote interfaces and implementation classes extend common,
    abstract base classes
    - My EJB implementation classes use several utility classes, which are
    also used by my servlets.
    - Each EJB is deployed in a separate JAR file
    The question I have is which classes should be included in the EJB JAR
    files.
    I'd like to put just the EJB implementation class in the EJB JAR, and
    put everything else in a common JAR that is placed in my WEB-INF/lib
    folder and shared by the rest of the application. However, if I do
    that, Weblogic won't load the EJBs because it tries to do so before it
    deploys my web app, and hence before it adds the JARs in the
    WEB-INF/lib folder to its classpath.
    I can explicitly add my jar to the Weblogic classpath on the
    commandline (weblogic.class.path property). Now my EJBs load. However,
    my servlets become unable to load any classes from any jar in
    WEB-INF/lib. I read something about it being a bad idea to include a
    jar from WEB-INF/lib in the classpath, so I'm probably seeing that
    problem.
    The third option is to include all the dependent classes in my EJB
    jars themselves, in addition to deploying them in WEB-INF/lib. This
    works, but it bothers me that there are multiple copies of the same
    class files lying around.
    I'm sure I'm not the first developer who's written an EJB that shares
    classes with a servlet or JSP page. What's the proper way to do this?
    Thanks.

  • Weblogic 6.1 JMS/EJB Design Question

    Any thoughts from gurus or those who have skinned their knees on similar
    issues would be GREATLY appreciated!
    Environment:
    Weblogic 6.1 sp3/Oracle 8.1.7 on Solaris
    I've got a webservice that invokes the webservice ejb and then delegates
    down to business layer ejb that delegates down to data layer dao classes
    that store off on average 150 records which include a clob field containing
    about 4k of data. (All in one JTA transaction) (I'll refer to this as
    operation 1)
    There is a logically independent process (parsing the clob data elements)
    that I'd like to kick off after all 150 records have been stored. (Needs
    access to the committed data) (I'll refer to this as operation 2)
    Questions:
    1. Can a stateless session ejb running under a single phase JTS transaction
    safely post a message to a JMS topic or queue running on the same weblogic
    instance?
    2. If so, are there any guidelines as to whether the transaction for
    operation 1 will complete before the sender receives notification? (the
    concern being that operation 2 will be notified but the data it is
    interested in will not be visible yet) If no guarantees, would configuring
    a JMS message delivery delay help?
    3. This operation will get invoked perhaps a thousand times a day, and I'm
    fearful of falling into the message redelivery trap from transaction
    rollbacks which possibly could occur from operation 2. Above all else, I
    care about NOT having the queue get clogged up with resends. Given that
    bias, should I use NOTSUPPORTED then have the session bean that the MDB
    delegates to start a transaction or would using BMT from the MDB be more
    correct?
    4. Any other thoughts?
    Thanks!

    Alan May wrote:
    Any thoughts from gurus or those who have skinned their knees on similar
    issues would be GREATLY appreciated!
    Environment:
    Weblogic 6.1 sp3/Oracle 8.1.7 on Solaris
    I've got a webservice that invokes the webservice ejb and then delegates
    down to business layer ejb that delegates down to data layer dao classes
    that store off on average 150 records which include a clob field containing
    about 4k of data. (All in one JTA transaction) (I'll refer to this as
    operation 1)
    There is a logically independent process (parsing the clob data elements)
    that I'd like to kick off after all 150 records have been stored. (Needs
    access to the committed data) (I'll refer to this as operation 2)
    Questions:
    1. Can a stateless session ejb running under a single phase JTS transaction
    safely post a message to a JMS topic or queue running on the same weblogic
    instance?So is the first transaction going to be writing 150 records to the
    database and the publishing a JMS message? Yes, this can all be one in
    one transaction in WLS, but it will be a XA/2PC transaction. I'm
    curious why you specified single-phase?
    >
    2. If so, are there any guidelines as to whether the transaction for
    operation 1 will complete before the sender receives notification? (the
    concern being that operation 2 will be notified but the data it is
    interested in will not be visible yet) I'm not sure I follow you here. If the message publish is part of the
    transaction then no consumer will receive the message before the publish
    transaction commits.
    If no guarantees, would configuring a JMS message delivery delay help?
    3. This operation will get invoked perhaps a thousand times a day, and I'm
    fearful of falling into the message redelivery trap from transaction
    rollbacks which possibly could occur from operation 2. There's 2 important WLS JMS features I would suggest you look into:
    1) Message redelivery delay & limits
    2) Error destinations
    Take a look at
    http://e-docs.bea.com/wls/docs81/jms/implement.html#1255066
    Above all else, I
    care about NOT having the queue get clogged up with resends. Given that
    bias, should I use NOTSUPPORTED then have the session bean that the MDB
    delegates to start a transaction or would using BMT from the MDB be more
    correct?I think you'd be better off using redelivery limits and delay than
    trying to do the JMS acknowledgement and transaction management yourself.
    -- Rob
    >
    4. Any other thoughts?
    Thanks!

  • EJB QL question

    I have the following EJB QL query:
    SELECT object(ep) FROM Endpoint ep WHERE ep.sipAddress = :sipAddressWhen this was written sipAddress was a String ( with getter & setter) attribute within Endpoint.
    Now we have added a new Table called Address (since an endpoint can have more than one address). Endpoint class contains:
    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
    private Collection<Address> addresses = new ArrayList<Address>();
    public Collection<Address> getAddresses() {
              return addresses;
    }In my Address entity we have a boolean 'defaultValue' to determine if address is default.
    Question:
    How will my ejb ql change?
    //mike

    eraonel wrote:
    Question:
    How will my ejb ql change? that depends. what exactly do you want the query to do? find the endpoint with any matching address? find the endpoint with a "default" matching address?
    assuming you want the endpoint with any matching address, i'd go with the WHERE clause:
    :sipAddress MEMBER OF ep.sipAddress

  • EJB Architecture Question

    Hi everybody!
    As I am a newbie to EJB, but have to do a project with this technology, I have a basic question, that might seem very simple to the pros among you.
    I have to realise a system with an login at the beginning, but I am very unsure about how to realise this.
    I started by creating a table, holding the username and the password.
    Now I thaught about creating an enity bean, that checks if the user with the given password exists. Here is my first problem, entity beans only allow findbyPrimary() but i want to find a person by name and password. Is this possible? how?
    If the person exists in the DB i thaught about creating a new instance of an session bean, for the further transactions and pass the reference on to the user?
    Is this good?
    Please help!
    Thx in Advance!
    Stef

    You can certainly find a user via the name/password options. You need to implement a new finder for your entity bean - like findByUsernameAndPassword that accepts the 2 parms. The implementation is a little specific to the application server vendor, but it should be pretty easy to do regardless of the proprietary descriptors. Also, depending on the caching you're using on the enttity tier - using direct JDBC for along with entitiy beans can cause some issues. For example, you may have a specific instance of an entity bean that's cached in memory on the application server - they you change this using JDBC. The application server now has a stale version of the data - but it doesn't know that it's stale. Just some issues to consider.
    Cheers

  • EJB Design Question

    Hi All,
    I have 2 tables in the DB, namely Product and Inventory. And I have create a Product Bean, which is related to the Product Table. Now I am wondering should I create an Inventory Bean to reflect the Inventory Table? or just to add some operation in the Product Bean to insert/delete/update the Inventory Table?
    Which one is a better choice?

    Greetings,
    Hi All,
    I have 2 tables in the DB, namely Product and
    Inventory. And I have create a Product Bean, which is
    related to the Product Table. Now I am wondering
    should I create an Inventory Bean to reflect the
    Inventory Table? or just to add some operation in the
    Product Bean to insert/delete/update the Inventory
    Table?
    Which one is a better choice?Your question is fundamental to understanding the nature and role of Entity Beans. Entity Beans have a direct association with the 'entities' they represent. An 'entity' is one piece/record of enterprise data like A database tuple (in it's simplest form a table row) - though EBs can represent data from any accessible source (such as naming/directory services, message queues, URLs, legacy systems, object databases, other distributed components, etc...). Through their design contract, EBs provide an object-oriented view of the data they represent (you might think of them as being 'proxies' or 'agents' for a particular piece of information) - and this is absolutely important to understand: EBs map to ENTITIES, NOT to data sources (if you want a data source interface use a Session Bean)! With this in mind:
    * An EB should be written for every entity (specific piece of information) that needs OO representation in your application where appropriate (simply accessing a database does not automatically warrant EBs as the design choice - there are many times/situations where a Session Bean, JavaBean, client-direct-access, etc. is more appropriate)
    * While finders ("SELECT" statements) can map to multiple entities ('multi-row finders' - a finder's ONLY purpose is to return keys for located entities), an EBs ejbCreate ("INSERT"), ejbStore ("UPDATE"), ejbLoad (non-finder "SELECT"), and ejbRemove ("DELETE"), methods should all handle one-and-only-one - as identified by it's primary key - entity/record/row/... (and yes, such a record may be represented throughout multiple tables by way of joins, cascading foreign keys, manual mapping [*not* recomended], etc.).
    * Persistence Management model (BMP vs. CMP) relates only to the locality of the data source access code. All EB state-synchronizatoin (the real 'persistence' in 'persistence management'), management is always at the discretion of the container. A BMP bean coder simply provides the access code for the container to do it's job.
    I hope this is helpful.
    Regards,
    Tony "Vee Schade" Cook

  • EJB Sample Question

    Hi there,
    My questions here referred to WebLogic server 6.1 examples.ejb20.basic.statelessSession
    and I m yet not attended any J2EE classes yet.
    1. What does the method ejbPassivate() and setSessionContext(SessionContext ctx)
    invoked inside TraderBean class does? Since I can't find any codes called the setSessionContext
    that needs a input parameter?
    2. Under ejbCreate(), the line statd Integer tl = (Integer) ic.lookup("java:/comp/env/tradeLimit");,
    where do i get java:/comp/env/tradeLimit? Is that stated inside the ejb-jar.xml under
    the entry <env-entry>?
    3. Can explain what are the steps invoked inside the build.xml after compiling the
    class files?
    4. What does the weblogic-ejb-jar.xml does?
    Thanks
    Neo

    For 1 & 2 You need to read a EJB Book. There is a free one available at
    www.theserverside.com.
    for 4, look at
    http://e-docs.bea.com/wls/docs61/ejb/index.html
    "Neo Gigs" <[email protected]> wrote in message
    news:3cbe4ab1$[email protected]..
    >
    Hi there,
    My questions here referred to WebLogic server 6.1examples.ejb20.basic.statelessSession
    and I m yet not attended any J2EE classes yet.
    1. What does the method ejbPassivate() andsetSessionContext(SessionContext ctx)
    invoked inside TraderBean class does? Since I can't find any codes calledthe setSessionContext
    that needs a input parameter?
    2. Under ejbCreate(), the line statd Integer tl = (Integer)ic.lookup("java:/comp/env/tradeLimit");,
    where do i get java:/comp/env/tradeLimit? Is that stated inside theejb-jar.xml under
    the entry <env-entry>?
    3. Can explain what are the steps invoked inside the build.xml aftercompiling the
    class files?
    4. What does the weblogic-ejb-jar.xml does?
    Thanks
    Neo

Maybe you are looking for

  • Pictures not displaying in non-thumbnail sizes

    One of my clients has an iMac G5 running 10.4.11 and iPhoto 5.0.4. He's got about 3200 pictures in his iPhoto library which is about 12GB in size (they are all very large pictures). He's been using iPhoto without problem for years then suddenly he no

  • Version 9.0 does not recognise my links created in Writer 6

    Help!! I have created a pdf file in Adobe Writer Version 6.0 Standard with bookmarks and a comprehensive contents page with links. If then viewed in any version of Adobe Reader other than 9.0 works fine. Can anyone tell me if this is a known issue an

  • Weblogic Server trial license limitations

    Hi, I would like to know which are the limitations of the free trial license of weblogic server 8.1. Thanks in advance.

  • No internet after installing E3000

    I'm trying to replace an old wrt54g with and e3000 linksys but after configuring all the IP info from the old router into the new one I can get a LAN established but can't access WAN. This is a T1 with static IP and I've even tried configuring a Win

  • Foreach syntax + generics, Possible compiler bug?

    I'm encountering an odd problem trying to use generics and the foreach (colon) syntax. The code in question: for (Iterator<String> it = col.getParameterNames().iterator(); it.hasNext();) {} for (String paramName : col.getParameterNames()) {}col is an