Can objects be bound to a name in a JNDI tree that contains active
connections and sessions to a JMS message provider(JMS). Do all objects that
are bound to a name in the JNDI tree have to be serializable and therefore
cannot contain non-serializable objects ??.
If not how do I store object that contain connections. My problem is as
follows.I have stateful EJB's that has connections to a JMS provider. The
bean then creates a temporary queue. Clients of the bean call business
methods that check to see if a message is delivered to the
temporary queue.
However during bean passivation(serialization), the connections are lost.
That is not a problem as I can reconnect in ejbActivate but I lose the
temporary queue. I wanted store the connection object(that encapsulates all
the JMS stuff) in a JNDI tree during ejbPassivate and then get a refrence
back to it during ejbActivate. All this works well in Weblogic but I wanted
to know if there is anything in the JNDI spec that would make my code
non-portable. That is when I bind my object to a name in ejbPassivate what
happens the object...are they seriaized and stored on disk or are they kept
'in memory'
Any ideas??
public class AnyStatefulBean{
String objectName;
MyJMSConnection con;
{
ejbCreate()
{
this.con = new MyJMSConnection();
}
ejbPassivate()
{
this.objectName = this.con.toString();
context.bind(this.name, this.con);
con=null;
}
ejbActivate()
{
this.con = (MyConnection)context.lookup(this.name);
}
}
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".