About item 2, it could be that the exception raised by the method does not set the transaction to rollback. In EJB 2.0 spec (Chapter 18), a transaction will be marked for rollback if an system exception (e.g. EJBException) is thrown. An application exception will not mark the transaction for rollback.
Robson. ----- Original Message ----- From: "Camus Chan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 15, 2002 6:32 AM Subject: [JBoss-user] Transaction and connection problems in JBoss 3.0.3 > Hi, > > I have a couple of problems when running JBoss 3.0.3 (actually starting from > JBoss 3.0.0) for a long time. Please give some hints, directions: > > System Information: > OS: Solaris 2.7 > JBoss: 3.0.3 > Tomcat: 4.1.12 > Database: Oracle8i > JDK: 1.3 / 1.4 > >>> JBoss and Tomcat are started successfully and the connection pool is set > as well, jars can be deployed successfully. > > Problems: > 1. Everytime I call an CMP bean, a new connection is generated, and seems > not being moved back to the pool nor reused. From v$session, I can see that > the connection keeps increased but not shrinked. Eventually the max. no of > connection allowed (set in init.ora) is reached and running out and jboss > raises exception. I read some 2.4.X manual, there is some parameters > control, like gcenabled, gcidletimeout, ...etc. which can control the > behaviour of connections getting from the pool, but I cannot set them in > oracle-service.xml as no such attributes are allowed to be set. Are they > obsolete in JBoos3.X ? Or any other methods / procedures to do the same > thing ? > > 2. I cannot write any workable transaction sample. The scenario is that: > I have a (stateless) session bean which looks up two CMP beans, each of the > CMP beans insert a record (into two different tables). However, I notice > that whatever the result of the 2nd insert (e.g. Oracle raises errors), the > 1st insert get committed automatically (this is accomplished by placing a > sleep between the two inserts and select from the Oracle table in SQLPlus). > I have tried using user-transaction and container-managed transactions mode, > but no luck. > I am using oracle-service.xml and the trans-type in the ejb-jar.xml is set > to required. I cannot switch to use oracle-xa-service.xml as jboss errors > raised (javax.ejb.FinderException: Find failed: > java.lang.IllegalArgumentException: null xaRes) when calling the CMP beans > ( I have appiled the changes to jboss-service.xml as stated in the > oracle-xa-service.xml but not to transaction-service.xml as I cannot find > that files any where in the downloaded package). I do think JBoss should be > tested with transaction before released, but what's the problem with my > cases, configurations or beans or ... ? > > 3. Can you tell me what are the differences between oracle-service.xml and > oracle-xa-service.xml ? Should I use oracle-xa-service.xml ? How to make it > works to use oracle-xa-service.xml ? > > 4. The shutdown.sh doesn't work in JBoss 3.0.3 (but it works in JBoss3.0.0) > and the jboss doesn't have any response to it. > > 5. When redeploying an existing jar, the classcastexception occurs if using > JDK1.4 but not with JDK1.3. However, after restarting JBoss, it works again. > > > Sorry, for my long paragraphs. I have asked these questions from the JBoss > forums but not much responses and solutions. Attached please also find my > configuration files FYR. Please help. > > Many Thanks, > Camus > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
