Ryan Phelan

Greenhorn
+ Follow
since Dec 09, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Ryan Phelan

You are right. A begin transaction does exist. It is actually being called in the constructor of the DAO. Therefore, a beginTransaction is being called inside of the execute() method. According to hibernate, it is supposed to handle it transparently and use the other transaction that has started (The EJB transaction). I did try removing the commitTransaction and it actually removed the exception! , but then on subsequent calls I get another exception: Already marked for rollback TransactionImpl, which might mean that it has not been commited already, so I put hte commitTransaction in again and removes this new exception, but I get the old one again. . I will keep searching for a way
A worthy suggestion. I just tried setting the EJB transaction type to notSupported, but this yeiled the following exception

java.lang.IllegalStateException: No transaction.



Here is my command bean (at least the execute method of it anyway):



Hopefully we will be able to resolve this!
Thanks for the reply, yes, you are correct is it most assuredly some type of trouble with the Hibernate Transaction API and the JBoss EJB transaction manager. I am using CMT. What baffles me is the fact that Hibernate specifies that it is supposed to be working transparently with any App server's transaction. But it seems that it is in error? I am using the following configuration (This is taken from the Getting Started with JBoss 4.0 jboss documentation):

Getting Started with JBoss 4.0[

<server>
<mbean code="org.jboss.hibernate.jmx.Hibernate"
name="jboss.har:service=Hibernate">
<attribute name="DatasourceName">java:/DefaultDS</attribute>
<attribute name="Dialect">net.sf.hibernate.dialect.HSQLDialect</attribute>
<attribute name="SessionFactoryName">java:/hibernate/SessionFactory</attribute>
<attribute name="CacheProviderClass">
net.sf.hibernate.cache.HashtableCacheProvider
</attribute>

</mbean>
</server>

Notice that even though the JBossTransactionManagerLookup and JTATrasactionFactory, since it is running as a .har file specific to JBoss, they are loaded implicity. This can be see in JBoss's startup log. It gives INFO messages stating that these two properties have been initiated. Any idea as to how to solve this transaction exception?
I'm getting the following error in my JBoss 4.0.0 server:

java.lang.IllegalStateException: Transaction has terminated TransactionImpl:XidImpl

I am using Hibernate 2.17c with the JBOss 4.0.0 .har deployer service. I have followed all of the guidelines in King's Hibernate in Action book. I am using the command pattern with a session EJB as it is outlined in the book. The error is thrown right BEFORE the call to the EJB is to end. However, I notice that the data that was to placed in the DB has been persisted. Anyone seen this error or know how to get rid of it?

Thanks
Would anyone happen to know of a useful Java based mail merge tool? I would like the tool to be declaritive, in that I could compose the email message in an outside persistent store (file or DB) and then later merge that text together with dynamic values. I'm guessing that this would not be to hard to implement, but would like to make use of widely used apis (if any)
20 years ago