I am creating java.sql.Connection  with Oracle in ejb create in Stateful Session Bean.
As
Connection  conn;

ejbCreate(){
      Context ctx = new InitialContext();
      Object obj = ctx.lookup(ÃÂjava:/OralceDSÃÂ);
      if (obj instanceof DataSource) {
        DataSource ds = (DataSource) obj;
        Conn =  (Connection) ds.getConnection();
} 

List getRestult(){
// ÃÂÃÂ.
 // Return   list
}

In client of Stateful session bean as soon as I  call the create method . Connection 
is being closed by server and  and following error message  is printed on jboss 
consoles 

[CachedConnectionManager] Closing a connection for you.  Please close them yourself: 
[EMAIL PROTECTED] java.lang.Exception: STACKTRACE at 
org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:282)
 at 
org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:506)
 
at 
org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:814)
 
at 
org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
 


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3838661#3838661

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3838661


-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to