-
1. Re: Commit problem in session bean using CMT
frito Jan 17, 2003 2:36 AM (in response to iramesh)Hi,
some code would be nice:
- how do you obtain the DB connection?
- ejb-jar.xml and perhaps jboss.xml
If you really want to use oracle XA with JBoss, you have to use at least JBoss 3.2 .
Regards,
Frito -
2. Re: Commit problem in session bean using CMT
iramesh Jan 17, 2003 9:53 AM (in response to iramesh)Hi Frito,
Thanks for getting back to me. The XA Connection is obtained by using JNDI lookup on a data source. Then insert is done using JDBC calls.
Here is the code to get connection object:
---
InitialContext ic = new InitialContext();
DataSource ds = (DataSource)ic.lookup(jndiName);
con = ds.getConnection();
-----
I have also pasted below, portions of oracle-xa-service.xml file.
<!--hack-->
<depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RA
RDeployment,name=Minerva JDBC XATransaction ResourceAdapter
<!--real attributes-->
<config-property name="XADataSourceProperties"
type="java.lang.String">URL=jdbc:oracle:thin:@m2.a1books.com:152
1:a1b</config-property>
<config-property name="XADataSourceClass"
type="java.lang.String">oracle.jdbc.xa.client.OracleXADataSource
</config-property>
<!--set these only if you want only default logins, not through JAAS
-->
<config-property name="UserName"
type="java.lang.String">a1e</config-property>
<config-property name="Password"
type="java.lang.String">a1e</config-property>
<!--
Do not try to set transaction isolation level here or you'll get
java.sql.SQLException: ORA-01453: SET TRANSACTION must be first s
tatement of transaction
Read committed is a default isolation level for Oracle, so there
is not real need to set it here. I'll take a look into it later .
..maybe.
<config-property name="TransactionIsolation"
type="java.lang.String">TRANSACTION_READ_COMMITTED</config-prope
rty>
-->
DefaultDS
Please let me know if you find anything wrong with the xml file or code.
Thanks
Ramesh -
3. Re: Commit problem in session bean using CMT
frito Jan 21, 2003 2:51 AM (in response to iramesh)Is your ejb-jar.xml ok? (The assembly descriptor describing the container transaction)
Frito