Stateful  bean handle in HttpSession

          Hi ,
          I have environment where i create a pool of stateful EJB's and I store the pool
          in the servlet context. For each requests I obtain the refernce to the ejbhandle
          from the pool and exceute the method on the stateful bean. I use this ejbhandle till
          the session is ended. Is there any problem with this sort of design in the clustering
          environment?
          As per the httpsession replication after the state of the object stored in the sesion
          is changed , setAttribute method has to be called for the replication. So is it the
          same for ejbhandle also?
          After I call some methos on the SFEJB (getting a reference via EJBHandle in the session),
          do I have to call set sttaribute and pass the ejb handle for the replication?
          Any amount of feed back is appreciated.
          Thanks,
          sri
          

The handle is serializable and portable. You can put it into the HTTP
          session. If you don't use setAttribute, the data won't get replicated. For
          example:
          Object[] ao = new Object[10];
          session.putAttribute("test", ao);
          // replication occurs
          ... later ...
          Object[] ao = (Object[]) session.getAttribute("test");
          ao[3]="hello world";
          // no replication occurs
          Peace,
          Cameron Purdy
          Tangosol, Inc.
          http://www.tangosol.com/coherence.jsp
          Tangosol Coherence: Clustered Replicated Cache for Weblogic
          "sri" <[email protected]> wrote in message
          news:[email protected]...
          >
          > Hi ,
          >
          > I have environment where i create a pool of stateful EJB's and I store
          the pool
          > in the servlet context. For each requests I obtain the refernce to the
          ejbhandle
          > from the pool and exceute the method on the stateful bean. I use this
          ejbhandle till
          > the session is ended. Is there any problem with this sort of design in
          the clustering
          > environment?
          >
          > As per the httpsession replication after the state of the object stored in
          the sesion
          > is changed , setAttribute method has to be called for the replication. So
          is it the
          > same for ejbhandle also?
          > After I call some methos on the SFEJB (getting a reference via EJBHandle
          in the session),
          > do I have to call set sttaribute and pass the ejb handle for the
          replication?
          >
          > Any amount of feed back is appreciated.
          >
          > Thanks,
          > sri
          >
          

Similar Messages

  • Handling disconnections in stateful beans

    i have a stateful bean with some resources that it has to close after closing. I programed a close () method, marked as +@Remove+, that clients call to close the resources; and a exiting () method, marked as @PreDestroy to finish the work.
    but, how can i handle unexpected disconnections, for clients frozen, cable network disconnected or the like, when the client () can't call the close method?
    It thought that +@PreDestroy+ method should replace finalize method's, but it doesn't.
    What can i do?

    Ok... Here it goes...
    You can do it in the following manner.
    As you said you have got 2 private methods doing d/b updates and these are called from a public method.
    Stateful session beans since associated with a client across methods, you can take advantage of it. Write your own user defined transaction.
    Begin the transaction scope in your public before calling the 1st private method. Call the 2 methods in a try block. Once you are done with these methods, you can commit and end the transaction. If you get any exception, rollback the transaction in the catch block. Otherwise if u get any exception in the 2nd method, you can rollback the transaction there itself.
    Stateful session beans lets u allow to spawn the bean managed transaction across methods. you can begin your transaction in one method and end it in a differnt method or you can end the transaction after calling the methods.
    The problem you are dealing with can typically very well handled by writing bean managed transaction.
    Hope this helps. If you need anymore clarity on my solution, please let me know.
    -amit

  • Help me in Stateless & Stateful Bean

    hi,
    I'm trying to understand to difference between the stateless and stateful bean. I had created an simple application to test it. But both the beans seems to work in the same way. Could some one explain me with an example the difference between the stateful and stateless bean ...
    I'm using J2EE Reference Implementation and Deploytool .
    Please help me .. Urgent ....
    Cheers !!!
    Prabs

    Thanks!!
    The State Session Bean tries to hold data , even after the client has finished execution. Moreover, the ejbCreate() get fired only once and not for different client.
    Is there anything that I should do to make it stateless.
    this is my code
    Session Bean
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import java.util.*;
    public class cartEJB implements SessionBean {
         private Map m;
         public cartEJB() { }
         public void ejbCreate() {
         m = new HashMap();
         System.out.println("ejbCreate()");
         public void ejbActivate() { }
         public void ejbPassivate() { }
         public void ejbRemove() { }     
         public void setSessionContext(SessionContext sc) { }
         public void addCart(String product, String price) {
         System.out.println("Its here Man 1");
         m.put(product, price);
         public void showCart() {
              System.out.println("Its here Man 2");
              Set s = m.entrySet();
              Iterator it = s.iterator();
              while(it.hasNext()) {
                   System.out.println(it.next());
    REMOTE
    import javax.ejb.EJBObject;
    import java.rmi.RemoteException;
    public interface cart extends EJBObject {
         public void addCart(String product , String price) throws RemoteException;
         public void showCart() throws RemoteException;
    HOME
    import javax.ejb.EJBHome;
    import java.rmi.RemoteException;
    import javax.ejb.CreateException;
    public interface cartHome extends EJBHome {
         public cart create() throws CreateException, RemoteException;
    client application is an web based application ..
    Client code. ... (jsp:useBean)
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    import javax.servlet.http.*;
    public class cartJSP implements HttpSessionBindingListener{
         String Product = new String();
         String Price = new String();
         HttpSession session;
         public cartJSP() {
         public void setProduct(String p){
              this.Product = p;
         public void setPrice(String price) {
              this.Price=price;
         public String getPrice() {
              return Price;
         public String getProduct() {
              return Product;
         public void addIt(String product , String price ) {
         try {
              System.out.println("Comes here");
              Context ic = new InitialContext();
              Object objref = (Object)ic.lookup("ejb/cartJNDI");
              cartHome home = (cartHome)PortableRemoteObject.narrow(objref, cartHome.class);
              cart remote = home.create();          
              remote.addCart(product, price);
              System.out.println("Comes here");
              remote.showCart();     
         catch(Exception e) {
              e.printStackTrace();
         public void showIt() {
         try {
              Context ic = new InitialContext();
              Object objref = (Object)ic.lookup("ejb/cartJNDI");
              cartHome home = (cartHome)PortableRemoteObject.narrow(objref, cartHome.class);
              cart remote = home.create();
              remote.showCart();          
              System.out.println("Comes here 1");
         catch(Exception e) {
              e.printStackTrace();
         public void valueBound(HttpSessionBindingEvent e) {
              session = e.getSession();
              session.setMaxInactiveInterval(60);
              System.out.println("Value Bound");
         public void valueUnbound(HttpSessionBindingEvent e) {
              System.out.println("Value UnBound");
    I'm using J2EE RI 1.3 and I'm deploying components using deploytool.
    Please help me,
    Check the code is wrong or is it a bug in the EJB container.
    regards
    prabu.

  • Stateful bean and cursor

    Is a stateful bean maintaining a reference to a ResultSet an acceptable design?
    The concern is that the resultset might need to be closed after each Stateful
    Bean access such that we don't hold on resources on the database.
    Stefan

    Thanks Bob,
    That's exactly what I was asking and it seems more clear now. Interesting if multiple
    ResultsSet kept around open could share same db connection in which case this
    could somehow scale. My concern was more directed towards number of Open Cursors
    in the database, but overall it does not look like a proper design ...
    Stefan
    "Bob Lee" <[email protected]> wrote:
    Not if the ResultSet will be kept open accross multiple web requests.
    The
    result set is most likely tied to a database connection. If too many
    are
    kept open, you database connection pool will get maxed out, and other
    users
    won't be able to access the site.
    You can handle the paging by running the query every time. You can also
    keep
    an index of the column you are sorting on and use this to pick out exact
    pages in your query. Memory is cheap.
    Bob
    "Stefan" <[email protected]> wrote in message
    news:3c7be741$[email protected]..
    Is a stateful bean maintaining a reference to a ResultSet an acceptabledesign?
    The concern is that the resultset might need to be closed after eachStateful
    Bean access such that we don't hold on resources on the database.
    Stefan

  • EJB 3.0 Stateful bean not saving state while Stateless bean is !!!

    My Stateless bean is as follow:
    package test;
    import javax.ejb.Stateless;
    @Stateless(mappedName = "StatelessBean")
    public class StatelessBean implements StatelessBeanRemote {
         int counter;
         public void increment(){
              System.out.println("Stateless counter value:"+counter);
              counter++;
    My Stateful bean is as follow:
    package test;
    import javax.ejb.Stateful;
    @Stateful(mappedName = "StateFulBean")
    public class StateFulBean implements StateFulBeanRemote {
         int counter;
         public void increment(){
              System.out.println("Stateful counter value:"+counter);
    Client is as follows:
    package test;
    import java.util.Hashtable;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    public class TestClient {
         public static void main(String[] args) {
              Hashtable hashtable = new Hashtable();
              hashtable.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
              hashtable.put(Context.PROVIDER_URL, "t3://localhost:7001");
              InitialContext ic;
              try {
                   ic = new InitialContext(hashtable);
                   StateFulBeanRemote stateFulBeanRemote = (StateFulBeanRemote)ic.lookup("StateFulBean#test.StateFulBeanRemote");
                   stateFulBeanRemote.increment();
                   StatelessBeanRemote statelessBeanRemote = (StatelessBeanRemote)ic.lookup("StatelessBean#test.StatelessBeanRemote");
                   statelessBeanRemote.increment();
              } catch (Exception e) {
                   e.printStackTrace();
    The output i am getting after running the client twice is as follows:
    //first time
    Stateful counter value:0
    Stateless counter value:0
    //second time
    Stateful counter value:0
    Stateless counter value:1
    Shouldn't the counter values be incremented in case of Stateful bean and remain the same for Stateless bean. But the output that I am getting is the complete opposite !!!
    Can anyone please explain this confusing behavior of stateless and stateful ejb 3.0 beans.

    868664 wrote:
    Can anyone please explain this confusing behavior of stateless and stateful ejb 3.0 beans.It is very simple: a stateless bean is ASSUMED to be stateless; you cannot keep state in a stateless bean as a contractual rule. That doesn't mean that you will fail to keep state in them at least for a little while, they are still only Java objects. Generally stateless EJBs are pooled, so you may get the same instance each time you use such an EJB, but you may just get another one. It is not dependable and the rules say don't do it - so don't do it.
    A stateful bean is tied to a single client, and so can be used by a client to keep state in it. Since You are running the client application twice you are operating with two different clients and so you will get a new stateful bean each time and your code will keep printing 0. However there is also a bug in your code:
    public void increment(){
    System.out.println("Stateful counter value:"+counter);
    }You are not incrementing anything.

  • Stateful bean not failing over

              I have a cluster of two servers and a Admin server. Both servers are running NT
              4 sp6 and WLS6 sp1.
              When I stop one of the servers, the client does n't automatically failover to
              the other server, instead it fails unable to contact server that has failed.
              My bean is configured to have its home clusterable and is a stateful bean. My
              client holds onto the remote interface, and makes calls through this. If Server
              B fails then it should automatically fail over to server A.
              I have tested my multicast address and all seems to be working fine between servers,
              my stateless bean work well, load balancing between servers nicely.
              Does anybody have any ideas, regarding what could be causing the stateful bean
              remote interface not to be providing failover info.
              Also is it true that you can have only one JMS destination queue/topic per cluster..The
              JMS cluster targeting doesn't work at the moment, so you need to deploy to individual
              servers?
              Thanks
              

    Did you enable stateful session bean replication in the
              weblogic-ejb-jar.xml?
              -- Rob
              Wayne Highland wrote:
              >
              > I have a cluster of two servers and a Admin server. Both servers are running NT
              > 4 sp6 and WLS6 sp1.
              > When I stop one of the servers, the client does n't automatically failover to
              > the other server, instead it fails unable to contact server that has failed.
              >
              > My bean is configured to have its home clusterable and is a stateful bean. My
              > client holds onto the remote interface, and makes calls through this. If Server
              > B fails then it should automatically fail over to server A.
              >
              > I have tested my multicast address and all seems to be working fine between servers,
              > my stateless bean work well, load balancing between servers nicely.
              >
              > Does anybody have any ideas, regarding what could be causing the stateful bean
              > remote interface not to be providing failover info.
              >
              > Also is it true that you can have only one JMS destination queue/topic per cluster..The
              > JMS cluster targeting doesn't work at the moment, so you need to deploy to individual
              > servers?
              >
              > Thanks
              Coming Soon: Building J2EE Applications & BEA WebLogic Server
              by Michael Girdley, Rob Woollen, and Sandra Emerson
              http://learnweblogic.com
              

  • Problem with Maintaining State with EJB3 Stateful Bean

    I'm a newbie in EJB3. I've wrote a Stateful bean together with JSF as the UI tier. Below is my Stateful bean.
    package com.dhydrated.business;
    import com.dhydrated.entity.User;
    import java.io.Serializable;
    import javax.ejb.Remove;
    import javax.ejb.Stateful;
    @Stateful
    public class LogonBean
            implements LogonRemote, Serializable {
        private User user;
        public void setUser(User user) {
            this.user = user;
        public User getUser() {
            return user;
    }In above code, I'm storing User object as the private variable. The problem is, whenever I set the User object in the 1st page, I'm unable to retrieve the same user object in the 2nd page. Seems like my Stateful bean does not saved the state or conversation of the bean.
    Appreciate if someone could tell me on how to save the state of above Stateful bean. Is there some other conf. that I might missed out?

    I was find good solution! =)
    *** JScript ***
    <script TYPE="text/javascript">
    <!--
    function popup(myform)
    if (! window.focus) return true;
    var d = new Date();
    windowname = d.getTime();
    window.open('', windowname, 'top=100,left=100,height=200,width=200,location=no,resizable=no,scrollbars=no,status=no');
    myform.target=windowname;
    return true;
    -->
    </script>
    *** JSF ***
    <h:form onsubmit="popup(this)">
    <h:commandButton value="Press Me" actionListener="#{sessionBean.resetCursor}" action="selectElemList" />
    </h:form>
    But it work only with <h:commandButton> tag. If you try to use <h:commandLink>, then 'onsubmit' attribute by <form> tag don't work.
    If you know how make necessary functional with <h:commandLink> tag, please let me know.

  • Stateful beans in cache doesn't seem to work

    I have a stateful bean that I have set max beans in cache to "1". When I deploy it, no errors reported or so, the Weblogic console still states "8" in the column "Cached Beans Current Count" when monitoring the bean.
    When I view the descriptor in the console it looks fine. What can be wrong here?
    Using Weblogic 8.1 SP4, here's the statueful descriptor:
    <weblogic-enterprise-bean>
    <ejb-name>MyStatefulBean</ejb-name>
    <stateful-session-descriptor>
    <stateful-session-cache>
    <max-beans-in-cache>1</max-beans-in-cache>
    </stateful-session-cache>
    <allow-concurrent-calls>True</allow-concurrent-calls>
    </stateful-session-descriptor>
    <reference-descriptor>
    </reference-descriptor>
    <enable-call-by-reference>True</enable-call-by-reference>
    <jndi-name>test.mystatefulbean/MyStatefulBean/Home</jndi-name>
    <local-jndi-name>test.mystatefulbean/MyStatefulBean/LocalHome</local-jndi-name>
    </weblogic-enterprise-bean>

    I agree with you about the host not being able to install (or at least don't want to install/upgrade) their servers to php5.4...  Unfortunately, I can't change that...  but by shutting them off took care of all the quotes (single & double) and any other characters which would basically function like an addslashes() command.  I'll paste the script below...  It's still pretty much the same as when you helped me out with the script...  Just minor adjustments:::  If you can show me (even though I fixed the problem) how I would integrate the stripslashes() function to the comment field it would be helpful to know for future reference.
    <?php // Script 1.0 - contactlist.php
    if (isset($_POST['submit']) && !empty($_POST['submit'])) // Test if submit button named submit was clicked and not empty
              if (!empty($_POST['first']) && !empty($_POST['last'])  && !empty($_POST['email']) && !empty($_POST['phone']) && !empty($_POST['comment'])) {
    $comment=stripslashes($_POST[comment]);
                        $body = "First Name: {$_POST['first']}\nLast Name: {$_POST['last']}\nEmail Address: {$_POST['email']}\nContact Phone Number: {$_POST['phone']}\nContact Preference: {$_POST['contactvia']}\n\nBest Time To Contact: {$_POST['timepref']}\n\nComments:\n {$_POST['comment']}";
                        $body = wordwrap($body, 70);
                        mail([email protected]', 'NEW Customer Inquiry Submission',$body, "From: {$_POST['email']}");
                        header('Location: index.html');  //Redirect to new url if form submitted
    ?>

  • Stateful bean clustering

    Hi,
              Does weblogic 5.1 support stateful bean clustering? If not how to achive this?
              Thanks in advance,
              vivek
              

    6.x supports stateful session beans clustering (replication and failover), but not 5.1.
              Vivek <[email protected]> wrote:
              > Hi,
              > Does weblogic 5.1 support stateful bean clustering? If not how to achive this?
              > Thanks in advance,
              > vivek
              Dimitri
              

  • Stateless and Stateful beans.

    Please tell me what are the important differences between stateless, and stateful beans.
    Thanks in advance.

    See this thread
    http://forum.java.sun.com/thread.jsp?forum=13&thread=529706&tstart=15&trange=15

  • WebLogic 6.1 SP2 stateful EJB handle serialization problem

    I try to serialize and later deserialize the handle of a stateful
    session bean in WebLogic 6.1 SP2. This works on the client, but not on
    the server. In WebLogic 6.1 SP1, it worked on both server and client.
    The test code:
    try {
    InitialContext context = new InitialContext();
    InfSessionHome sessionHome = (InfSessionHome)
    InfEJBUtil.getInfEJBHome
    (context, InfJNDINames.INFSESSION_EJBHOME,
    InfSessionHome.class);
    infSession1 = sessionHome.create();
    // serialize
    ObjectOutputStream objector = new ObjectOutputStream(byteStream);
    objector.writeObject(infSession1.getHandle());
    objector.flush();
    objector.close();
    byte[] ejbKeyBytes = byteStream.toByteArray();
    // deserialize
    ByteArrayInputStream byteInStream = new
    ByteArrayInputStream(ejbKeyBytes);
    ObjectInputStream objStream = new ObjectInputStream(byteInStream);
    Handle ejbHandle = (Handle) objStream.readObject();
    objStream.close();
    InfSession infSession2 = (InfSession) ejbHandle.getEJBObject();
    if (!infSession2.equals(infSession1)) {
    throw new IllegalStateException("not equal: " + infSession2);
    } catch (Exception e) {
    e.printStackTrace();
    I get the following stack trace in the readObject() call:
    java.io.InvalidClassException:
    weblogic.rmi.internal.LocalServerRefMissing no-arg constructor for
    class
    at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1221)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
    at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2263)
    at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:519)
    at weblogic.rmi.internal.StubInfo.readObject(StubInfo.java:73)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2214)
    at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1411)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
    at weblogic.ejb20.internal.HandleImpl.readExternal(HandleImpl.java:89)
    at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1212)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
    I suppose that WebLogic uses a different handle on the server
    (LocalServerRef class, handle local to it's EJB) than on the client.
    I took the routine from Apache SOAP 2.2 StatefulEJBProvider. So I
    suppose that more people are running into the same problem.
    Does anybody know of a workaround?
    Tom

    Just a small addition/clarification to what Cameron said on serialization.
    - The no argument constructor is required in the first non-serializable class in the object hierarchy for de-serialization process. If your class extends form Object class(which has a no arg constructor), you need not have a no-arg constructor. refere to http://64.49.216.133/faq/view.jsp?EID=251942 for more details.
    - Also I suggest using the api
    isIdentical(...)
    instead of equals method in the code if you are trying to establish whether the two objects represent the same EJBObject or not
    - Rajeev
    Cameron Purdy <[email protected]> wrote in message news:[email protected]...
    A no-argument constructor is required for a class to be deserialized. It
    sounds like a BEA bug from the stack trace, but make sure you don't have
    something extra that you are serializing on something of yours that should
    be transient. (It's hard to imagine how, but you never know ...)
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    Clustering Weblogic? You're either using Coherence, or you should be!
    Download a Tangosol Coherence eval today at http://www.tangosol.com/
    "Tom Gerber" <[email protected]> wrote in message
    news:[email protected]...
    I try to serialize and later deserialize the handle of a stateful
    session bean in WebLogic 6.1 SP2. This works on the client, but not on
    the server. In WebLogic 6.1 SP1, it worked on both server and client.
    The test code:
    try {
    InitialContext context = new InitialContext();
    InfSessionHome sessionHome = (InfSessionHome)
    InfEJBUtil.getInfEJBHome
    (context, InfJNDINames.INFSESSION_EJBHOME,
    InfSessionHome.class);
    infSession1 = sessionHome.create();
    // serialize
    ObjectOutputStream objector = new ObjectOutputStream(byteStream);
    objector.writeObject(infSession1.getHandle());
    objector.flush();
    objector.close();
    byte[] ejbKeyBytes = byteStream.toByteArray();
    // deserialize
    ByteArrayInputStream byteInStream = new
    ByteArrayInputStream(ejbKeyBytes);
    ObjectInputStream objStream = new ObjectInputStream(byteInStream);
    Handle ejbHandle = (Handle) objStream.readObject();
    objStream.close();
    InfSession infSession2 = (InfSession) ejbHandle.getEJBObject();
    if (!infSession2.equals(infSession1)) {
    throw new IllegalStateException("not equal: " + infSession2);
    } catch (Exception e) {
    e.printStackTrace();
    I get the following stack trace in the readObject() call:
    java.io.InvalidClassException:
    weblogic.rmi.internal.LocalServerRefMissing no-arg constructor for
    class
    atjava.io.ObjectInputStream.inputObject(ObjectInputStream.java:1221)
    atjava.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
    atjava.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2263)
    atjava.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:519)
    at weblogic.rmi.internal.StubInfo.readObject(StubInfo.java:73)
    at java.lang.reflect.Method.invoke(Native Method)
    atjava.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2214)
    atjava.io.ObjectInputStream.inputObject(ObjectInputStream.java:1411)
    atjava.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
    atjava.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
    atweblogic.ejb20.internal.HandleImpl.readExternal(HandleImpl.java:89)
    atjava.io.ObjectInputStream.inputObject(ObjectInputStream.java:1212)
    atjava.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
    atjava.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
    I suppose that WebLogic uses a different handle on the server
    (LocalServerRef class, handle local to it's EJB) than on the client.
    I took the routine from Apache SOAP 2.2 StatefulEJBProvider. So I
    suppose that more people are running into the same problem.
    Does anybody know of a workaround?
    Tom
    [att1.html]

  • WL 7.0 Fault-tolerant stateful beans. (Newbie)

    Hello,
    I was wondering if in WL 7.0 there is a way to make a stateful session
    bean automatically persist its state without having to be passivated
    as a whole.
    The bean that I need to build would persist its state to a DB each
    time a remote method call is executed in it. The purpose is to make
    this bean fault tolerant without having to serialize the whole object
    graph by using passivation.
    I heard that WL 7.0 has a new feature that can make this happen but I
    can't seem to find any info on this. Could anyone point me into the
    right search path?
    Thanks in advance.
    Mateo.

    I'm not aware of such feature in WLS 7.0 EJB container.
    Where did you heard about it? If at all there's a feature you should
    be able to locate at our online docs.
    Here's the link
    http://e-docs.bea.com/wls/docs70/ejb/index.html
    Kumar
    Mateo wrote:
    Hello,
    I was wondering if in WL 7.0 there is a way to make a stateful session
    bean automatically persist its state without having to be passivated
    as a whole.
    The bean that I need to build would persist its state to a DB each
    time a remote method call is executed in it. The purpose is to make
    this bean fault tolerant without having to serialize the whole object
    graph by using passivation.
    I heard that WL 7.0 has a new feature that can make this happen but I
    can't seem to find any info on this. Could anyone point me into the
    right search path?
    Thanks in advance.
    Mateo.

  • Question about operations allowed in methods of stateless and stateful bean

    Hello,
    Can anyone tell me why ejbRemove and ejbCreate are allowed entreprise beans and resource manager access in stateful session beans and not in stateless session beans?
    Thanks in advance,
    Julien Martin.

    Salut Julien,
    Can anyone tell me why ejbRemove and ejbCreate are
    allowed entreprise beans and resource manager access
    in stateful session beans and not in stateless session
    beans?I'm not sure I fully understand your question, but here is some information that may answer it.
    The user is the one who creates and removes a stateful session bean. The container is the one who creates and removes a stateless session bean. So the user can pass any parameters to the create of a SFSB because he theorically knows what to pass. The container doesn't, and doesn't want to. It just wants to create SLSB to pool them, but it doesn't pool SFSB.
    Maybe it doesn't answer your question. Can you reformulate?
    Kexkey

  • Stateful bean storing its state.

    how will a stateful session bean stores its state.?

    In stateful session beans we will store the state using the instance variables used in the bean. so, that instance variables can be used between methods.In stateless session beans also we will be using the instances variables but the state will not be available. since it is valid for the one method only.

  • Stateful Bean replication

    Hi,
              Is this possible to deploy some Stateful SessionBean on few different WL
              instances in cluster in such way that content of each bean will be the same
              in every time???
              I mean that, if anybody will update Stateful SessionBean on first instatnce
              of WL, replication will make the same copy of bean on each WL instances and
              hance the user who will connect to second instance of WL will get the same
              content of bean like in first instance.
              If it is possible, are there any special recommends to accomplish it?
              Best regards,
              Robert
              

    Our replication uses a primary-secondary scheme where all requests are always
              directed to the primary copy unless the server on which it is residing fails...
              "Robert Zaczyñski" wrote:
              > Hi,
              >
              > Is this possible to deploy some Stateful SessionBean on few different WL
              > instances in cluster in such way that content of each bean will be the same
              > in every time???
              >
              > I mean that, if anybody will update Stateful SessionBean on first instatnce
              > of WL, replication will make the same copy of bean on each WL instances and
              > hance the user who will connect to second instance of WL will get the same
              > content of bean like in first instance.
              >
              > If it is possible, are there any special recommends to accomplish it?
              >
              > Best regards,
              > Robert
              

Maybe you are looking for