-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: @Tablegenerator throws unsupported exception
PostPosted: Tue Apr 06, 2010 9:11 am 
Newbie

Joined: Mon Mar 29, 2010 10:45 pm
Posts: 6
We have Hibernate 3.3.1 with Websphere 6.1 - EJB3 feature pack.
There are Stateless session beans injected with Entitymanager with Hibernate as the JPA provider. While using @Tablegenerator with GenerationType.TABLE strategy, Hibernate throws UnsupportedException - Cannot perform isolated work.

The transaction manager lookup class used id WebsphereExtendedJTATransactionLookup with CMTTransactionFactory. It appears that the Isolater.java tries to suspend the transaction while generating primary keys which is not supported by Websphere app server.

Has any one come across this scenario before ? Please provide your thoughts as we have been stuck with this issue for quite some time.


Top
 Profile  
 
 Post subject: Re: @Tablegenerator throws unsupported exception
PostPosted: Wed Apr 07, 2010 5:28 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
You mention that the the transaction is suspended.
How do you declare the @TransactionAttribute annotation (if at all) after the @Stateless annotation on the concerning Entity Bean?


Top
 Profile  
 
 Post subject: Re: @Tablegenerator throws unsupported exception
PostPosted: Sun Apr 11, 2010 11:32 pm 
Newbie

Joined: Mon Mar 29, 2010 10:45 pm
Posts: 6
Sorry for the late reply.
The @TransactionAttribute annotation for this specific bean method is - @TransactionAttribute(TransactionAttributeType.REQUIRED).

and for the Entity, here is how we have provided the table generator :

@Id
@Column(name="id")
@TableGenerator(
name="TEST_ID_GEN",//Name to be used in column annotation
table="ID_GEN",//Name of the table @ db used for id generation
pkColumnName = "TBL_ID_NM",//Column of ID_GEN table
valueColumnName = "TBL_ID_CUR_VAL",//Column to store the current value
pkColumnValue="id",//The column name for which is has to be generated
allocationSize=1
)
@GeneratedValue(generator="TEST_ID_GEN",strategy=GenerationType.TABLE)
private int id;


Top
 Profile  
 
 Post subject: Re: @Tablegenerator throws unsupported exception
PostPosted: Wed Apr 14, 2010 10:58 pm 
Newbie

Joined: Mon Mar 29, 2010 10:45 pm
Posts: 6
If any one has valuble clues on this please provide your comments.


Top
 Profile  
 
 Post subject: Re: @Tablegenerator throws unsupported exception
PostPosted: Fri Apr 23, 2010 4:15 am 
Newbie

Joined: Mon Mar 29, 2010 10:45 pm
Posts: 6
Should I repost this to some other forum :(. No response recieved as yet ...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.