One CMP-EJB "UserBeanCMP" depends on the second CMP-EJB "AddressBeanCMP".
(they persist in two referenced tables )
And when the second EJB is trying to load its state from DB it hits the
following exception.
(With weblogic driver this never happened!)
java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Can't start a
cloned connection while in manual transaction mode.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.getImplConnection(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.setupImplConnection(Unknown
Source)
at com.microsoft.jdbc.base.BaseStatement.<init>(Unknown Source)
at com.microsoft.jdbc.base.BasePreparedStatement.<init>(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.prepareStatement(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.prepareStatement(Unknown Source)
at com.evermind[Orion/1.5.2 (build 10460)]._lo.prepareStatement(Unknown
Source)
at com.evermind[Orion/1.5.2 (build 10460)]._lo.prepareStatement(Unknown
Source)
at com.evermind[Orion/1.5.2 (build
10460)].server.ejb.DataSourceConnection.getCustomStatement(Unknown Source)
at
AddressRemote_EntityBeanWrapper11.loadState(AddressRemote_EntityBeanWrapper1
1.java:2954)
at
AddressHome_EntityHomeWrapper15.findExistingEntity(AddressHome_EntityHomeWra
pper15.java:34)
at
AddressHome_EntityHomeWrapper15.findByPrimaryKey(AddressHome_EntityHomeWrapp
er15.java:274)
at
ca.jvl.games.ejb.registration.UserBeanCMP.loadAddress(UserBeanCMP.java:66)
at ca.jvl.games.ejb.registration.UserBeanCMP.ejbLoad(UserBeanCMP.java:54)
at
UserHome_EntityHomeWrapper35.findByNickname(UserHome_EntityHomeWrapper35.jav
a:1650)
at
ca.jvl.games.ejb.registration.UserControllerBean.getUserDetails(UserControll
erBean.java:36)
at
UserController_StatelessSessionBeanWrapper31.getUserDetails(UserController_S
tatelessSessionBeanWrapper31.java:66)
at ca.jvl.games.web.UserManagerEJB.Load(UserManagerEJB.java:39)
at ca.jvl.games.web.UserManagerEJB.checkLogon(UserManagerEJB.java:101)
at ca.jvl.games.web.SigninAction.perform(SigninAction.java:51)
at
org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.ja
va:1786)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:211)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
at com.evermind[Orion/1.5.2 (build 10460)]._cxb._abe(Unknown Source)
at com.evermind[Orion/1.5.2 (build 10460)]._cxb._uec(Unknown Source)
at com.evermind[Orion/1.5.2 (build 10460)]._io._twc(Unknown Source)
at com.evermind[Orion/1.5.2 (build 10460)]._io._gc(Unknown Source)
at com.evermind[Orion/1.5.2 (build 10460)]._if.run(Unknown Source)
Use the following url style
url = "jdbc:microsoft:sqlserver://127.0.0.1:1433;SelectMethod=cursor"
Thanks,
Sridhar Paladugu
Microsoft Developer Support
JDBC Webdata
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order
your FREE Security Tool Kit, please visit
<http://www.microsoft.com/security>.
Andrei
"Sridhar Paladugu" <sr...@online.microsoft.com> wrote in message
news:2QkIOBsyBHA.1444@cpmsftngxa08...
The reason for this is;
When SelectMethod is set to direct, SQL Server does not support multiple active
statements on a single connection within a transaction; however, when
auto-commit mode is enabled (the default), the Microsoft SQL Server JDBC driver
provides the ability to have multiple JDBC statements open on a single JDBC
connection. This is done by cloning physical SQL Server connections as needed.
To avoid cloning physical SQL Server connections in this circumstance, you
should create only one Statement, PreparedStatement, CallableStatement, or
DatabaseMetaData object per JDBC Connection object. Be sure to invoke the
"close" methods on these objects when you are finished with them, that is,
before creating another object of the types described.