Hi,

GV wrote:
I am trying to deploy a simple ojb application (simple
POJO, not EJB) in Jboss managed environment and
followed the configurations specified in the ojb
deployment document
(http://db.apache.org/ojb/docu/guides/deployment.html#Configure+OJB+for+managed+environments+considering+as+JBoss+example),
however I get the error
"java.lang.UnsupportedOperationException: In managed
environments only JTA transaction demarcation allowed", when I call PB APIs
pm.commitTransaction() or pb.abortTransaction().


Sorry, seems the exception message isn't clear. In managed environments,
more precisely when using JTA, it's not allowed to use OJB's
tx-demarcation (pb.commitTransaction(),...). The whole tx handling is
assigned to JTA, thus you only can use declarative or programmatic
JTA-tx demarcation.


1. Is there any sample code that I can refer to, on
how PB should be used with JTA?


http://db.apache.org/ojb/docu/guides/deployment.html#Example+Session+Beans

http://cvs.apache.org/viewcvs.cgi/db-ojb/src/ejb/org/apache/ojb/ejb/pb/PBSessionBean.java?only_with_tag=OJB_1_0_RELEASE&view=markup


2. Is there a way to hide the underlying transaction
system by using OJB's PB transaction APIs, similar to
how Hibernate does it
(http://www.hibernate.org/42.html#A6) or is it planned
to be supported in future OJB releases.

Currently it's not possible to start a JTA-UserTransaction by calling
OJB's tx demarcation method.
Think it would be possible to implement a similar behavior. If you need
this feature, please make a feature request in Jira.
http://issues.apache.org/jira/browse/OJB

regards,
Armin


I am looking
to see if there is a way to avoid direct dependency to
JTA in my code.

regards
GV


                
__________________________________ Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to