-
1. Re: Closing a statement you left open
jonlee Oct 6, 2003 10:50 PM (in response to berni)It depends on what you are doing between method calls. However, it would appear that you are not using the same session. It is difficult to guess because we don't have enough understanding of what you are doing between the calls.
-
2. Re: Closing a statement you left open
jonlee Oct 6, 2003 10:51 PM (in response to berni)Also, have you verified that it is a statefull session bean? Check the logs just to make sure as the only other reason you are having the problem is that the EJB is not stateful but stateless.
-
3. Re: Closing a statement you left open
berni Oct 7, 2003 3:05 AM (in response to berni)In my ejb-jar.xml I have this two lines :
<session-type>Stateful</session-type>
<transaction-type>Container</transaction-type>
(and the dtd is : <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>)
In the log, there are this lines :
09:25:56,796 INFO [EjbModule] Starting
09:25:56,796 INFO [StatefulSessionContainer] Starting
09:25:56,812 INFO [StatefulSessionInstancePool] Starting
09:25:56,812 INFO [StatefulSessionInstancePool] Started
09:25:56,812 INFO [StatefulSessionFilePersistenceManager] Starting
09:25:56,828 INFO [StatefulSessionFilePersistenceManager] Started
09:25:56,828 INFO [StatefulSessionContainer] Started
09:25:56,828 INFO [EjbModule] Started
09:25:56,828 INFO [EJBDeployer] Deployed: file:/C:/JBoss/jboss-3.2.1_tomcat-4.1
.24/server/default/tmp/deploy/server/default/deploy/services_jboss.ear/40.
services_jboss.ear-contents/tools_SourceData.jar
And in the jmx-console, the session bean appears in a "StatefulSessionContainer".
In the java code, between the two calls (executeQuery() in the first one and resultset.next() in the second one),
I just check a boolean parameter for using differently the resultset.
As I said in my first message, in this case, it would be possible to change the code to execute the
executeQuery() and the resultset.next() int the same call, but the application is working well under another J2EE server, so why not under JBoss ?