I'm using it from within an ejb. Its the ejb container that is starting and stopping transactions. I would imagine that if you are running within a servlet, nobody is starting the transaction. You'd probably have to start it yourself
-----Original Message----- From: Colin Canfield [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 1:17 AM To: [EMAIL PROTECTED] Subject: Re: [castor-dev] help with jboss transaction interaction with castor.. I have been trying this with no success. The transaction manager just doesn't seem to be launching... If I do what you describe I get a no transaction is active error. 15:08:23,044 ERROR [Goals] Persistence exception : No transaction in progress for the current thread On stepping through the JDO code it appears that get transaction manager call the getDatabase method is returning null.. The closest I have been able to get is using the setTransactionManager as you have below, and with wrapping the getDatabase calls in UserTransactions... It is still not there though, when I do this it thinks rollbacks have occured... 15:16:53,739 ERROR [Goals] Rollback exception in commit : Unable to commit, tx=X idImpl [FormatId=257, GlobalId=Cupid//0, BranchQual=] status=STATUS_ROLLEDBACK Are you doing the queries from a servlet or from a bean ? Also what transaction manager have you set up in your datasource, I'm beggining to wonder if there is a miss match there ? I've included the applicable parts from mine to see if anything jumps out... Thanks in advance.. Colin <?xml version="1.0" encoding="UTF-8"?> <server> <mbean code="org.jboss.resource.connectionmanager.XATxConnectionManager" name="jboss.jca:service=XATxCM,name=MSSQLDS"> <!--make the rar deploy! hack till better deployment--> <depends>jboss.jca:service=RARDeployer</depends> <depends optional-attribute-name="ManagedConnectionFactoryName"> <!--embedded mbean--> <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=XATxDS,name=exercisesDS"> <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,n ame=Minerva JDBC XATransaction ResourceAdapter</depends> <attribute name="JndiName">jdbc/exercisesDS</attribute> <attribute name="ManagedConnectionFactoryProperties"> <properties> <!-- config-property name="ConnectionURL" type="java.lang.String">jdbc:JTurbo://psweb2:1433/exercises</config-property --> <config-property name="XADataSourceClass" type="java.lang.String">com.newatlanta.jturbo.driver.JTXADataSource</config- property> <config-property name="XADataSourceProperties" type="java.lang.String">Description=exercises;PortNumber=1433;DatabaseName=e xercises;ServerName=psweb2</config-property> <config-property name="UserName" type="java.lang.String">THEUSER</config-property> <config-property name="Password" type="java.lang.String">THEPWD</config-property> </properties> </attribute> </mbean> </depends> <depends optional-attribute-name="ManagedConnectionPool"> <!--embedded mbean--> <mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=XATxPool,name=exercisesDS"> <attribute name="MinSize">0</attribute> <attribute name="MaxSize">50</attribute> <attribute name="BlockingTimeoutMillis">5000</attribute> <attribute name="IdleTimeoutMinutes">15</attribute> <attribute name="Criteria">ByContainer</attribute> </mbean> </depends> <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedCo nnectionManager</depends> <!-- depends optional-attribute-name="JaasSecurityManagerService">jboss.security:name=Jaa sSecurityManager</depends--> <attribute name="TransactionManager">java:/TransactionManager</attribute> <!--make the rar deploy! hack till better deployment--> <depends>jboss.jca:service=RARDeployer</depends> </mbean> </server> ----- Original Message ----- From: "Bruce Snyder" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, May 18, 2002 2:07 AM Subject: Re: [castor-dev] help with jboss transaction interaction with castor.. > This one time, at band camp, Gray Jones said: > > See inline comments. > > GJ>Here's something I did to connect castor to jBoss. In my case I want jBoss > GJ>to control the transactions so I don't call begin() and commit() when using > GJ>the jta transaction manager. So its jboss that is starting and stopping the > GJ>transactions. I'm not sure if this applies in your case or not > GJ> > GJ>jdo.setTransactionManager( "java:/TransactionManager" ); > > This is also what I've done with JBoss and I highly recommend it. > It just alleviates one more thing that you don't need to worry about > because JBoss will handle it for you. > > GJ> -----Original Message----- > GJ> From: Colin Canfield [mailto:[EMAIL PROTECTED]] > GJ> Sent: Friday, May 17, 2002 11:05 AM > GJ> To: [EMAIL PROTECTED] > GJ> Subject: Re: [castor-dev] help with jboss transaction interaction with > GJ>castor.. > GJ> > GJ> > GJ> Sorry I forgot to include that one... it gives a Persistence exception: no > GJ>transaction in progress for the current thread (I'm asuming the ut.commit > GJ>should be after the db.close ... > > This is incorrect. If the db object is closed before the transaction > is committed, this will surely throw an exception. db.commit() must > come before db.close(). > > Bruce > -- > > perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");' > > ----------------------------------------------------------- > If you wish to unsubscribe from this mailing, send mail to > [EMAIL PROTECTED] with a subject of: > unsubscribe castor-dev > ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
