Hi,
I am using WebSphere 3.5.2 eval and have just deployed the simple
entity bean Customer from the examples of the 'Enterprise Javabeans' book
from oreily.
I first used the Instant DB database for this example that comes with
Websphere.
I ran a simple client app to create a customer record. The create method
has
'Mandatory' transaction attribute. The code snippet that does this
is shown below.
//========= code that does this ===========//
obj = jndiContext.lookup("CustomerHome");
CustomerHome home3 = (CustomerHome)
javax.rmi.PortableRemoteObject.narrow(obj, CustomerHome.class);
// tran is obtained according to the websphere document correctly
tran.begin();
System.out.println("test1");
Customer customer_1 = home3.create(1, "Emerick", "Fernando", "phd");
System.out.println("test2");
tran.commit();
//====================================//
This works fine with InstantDB. But when I change the datasource to Oracle
8.1.6 with
classes12.zip thin driver, the above create method throws a
TransactionRollback exception.
The exception is given below:
javax.transaction.TransactionRolledbackException: CORBA
TRANSACTION_ROLLEDBACK 0 No; nested exception is:
org.omg.CORBA.TRANSACTION_ROLLEDBACK:
at java.lang.Throwable.<init>(Throwable.java:96)
at java.lang.Exception.<init>(Exception.java:44)
at java.lang.RuntimeException.<init>(RuntimeException.java:49)
at org.omg.CORBA.SystemException.<init>(SystemException.java:51)
at
org.omg.CORBA.TRANSACTION_ROLLEDBACK.<init>(TRANSACTION_ROLLEDBACK.java:71)
at
org.omg.CORBA.TRANSACTION_ROLLEDBACK.<init>(TRANSACTION_ROLLEDBACK.java:50)
at java.lang.reflect.Constructor.newInstance(Native Method)
at com.ibm.CORBA.iiop.ReplyMessage.getSystemException(Unknown Source)
at
com.ibm.rmi.iiop.ClientResponseImpl.getSystemException(ClientResponseImpl.j
ava:85)
at com.ibm.CORBA.iiop.ClientDelegate.invoke(Unknown Source)
at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:250)
at com.titan.customer._Customer_Stub.create(_Customer_Stub.java:232)
at com.titan.travelagent.Client_1.main(Client_1.java:57).
Further research revealed that this only occurs if I try to invoke any of
customer bean methods
from within a USERTRANSACTION block like above regardless of the
transaction attribute of the
entity bean methods.
I just cannot figure the problem out.
Although I know this is not a websphere mailing list, I hope somebody can
help me out.
This problem is really driving me nuts.
Thanks,
Magesh.
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".