oracle xa datasource cannot commit twice

2009-12-25 Thread xuhongbo
Hi:
I am using oracle xa and bean managed transaction in my
applicationgeronimo 2.1.4 & oracle 9i;

In my test ejb, just update a table in a bean-managed user-transaction; 
The first time , my test ejb works, but if I execute the ejb twice, the
oracle-xa-transaction will failed;
In the attachment , I list my test ejb's program and oracle-xa-datasource's
plan; and also a simple simulate-program which  doesn't use Geronimo
AppServer, but using Geronim-Transaction-Manager, and direct try oracle's XA
transaction;

The occured exception is :
2009-12-25 19:39:00,500 WARN  [Transaction] Unable to enlist XAResource
org.apache.geronimo.transaction.manager.wrappernamedxaresou...@1e7dc51,
errorCode: -3
oracle.jdbc.xa.OracleXAException
at
oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1157)
at
oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:295)
at
org.apache.geronimo.transaction.manager.WrapperNamedXAResource.start(Wrapper
NamedXAResource.java:86)
at
org.apache.geronimo.transaction.manager.TransactionImpl.enlistResource(Trans
actionImpl.java:209)
at
org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor.getCo
nnection(TransactionEnlistingInterceptor.java:54)
at
org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.getConn
ection(TransactionCachingInterceptor.java:87)
at
org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.getConnec
tion(ConnectionHandleInterceptor.java:43)
...
at java.lang.Thread.run(Unknown Source)
javax.transaction.RollbackException: Unable to commit: transaction marked
for rollback
at
org.apache.geronimo.transaction.manager.TransactionImpl.rollbackResourcesDur
ingCommit(TransactionImpl.java:671)
at
org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionIm
pl.java:270)
at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(Transa
ctionManagerImpl.java:250)
at
org.apache.openejb.core.CoreUserTransaction.commit(CoreUserTransaction.java:
62)
at
org.apache.openejb.core.BaseContext$UserTransactionWrapper.commit(BaseContex
t.java:194)
at
sampleear.MyStatelessSessionBean.sayHello(MyStatelessSessionBean.java:40)
..
at java.lang.Thread.run(Unknown Source)

-
While I havn't find the real-reason caused the exception ; but I noticed the
follow things:
1: when execute the test ejb first-time, although I have called the
userTransaction.commit(), but the oracle 's  xa-transaction doesn't
real-complete.
2: I have write the program to simulate the critical-work which
Geronimo have done. In the simulate program , I direct use
Geronimo-transaction-manager and direct call the oracle-xa interface. And it
work's well;The simulator program also list in the attachment as
SimulateGeronimoTransaction.java
So I wondering if I have mis-used something in Geronimo, cause the
User-Transaction finished, but the oracle's real-xa-transaction doesn't
release.

Thanks for any suggest  
I configed oracle-xa-datasource's plan is:


http://geronimo.apache.org/xml/ns/j2ee/connector-1.2";>
http://geronimo.apache.org/xml/ns/deployment-1.2";>

console.dbpool
oraclexatest1
1.0
rar



oracle
oracle
1.0
jar







javax.sql.DataSource

oraclexatest1
tcp
1521


OracleXADataSource
thin
changjun
168.1.100.30



ora9i30
changjun





10
0









MyStatelessSessionBean.java
Description: Binary data


SimulateGeronimoTransaction.java
Description: Binary data


Re: Configure Oracle XA Datasource with Oracle XE (10g Express) in console dialog

2009-06-03 Thread Kevan Miller


On Jun 3, 2009, at 3:53 PM, rbaumhof wrote:



We found out the following settings for Oracle XA Datasource. These  
settings

have been tested with:
Java 1.5, Geronimo 2.1.3,2.1.4 and Oracle 10g Express (XE), 11g  
Express and

11 Production.
The jar File for connect was in all cases the appropriate 10g  
Express thin
jar file that is provided on oracle download site (version for java  
1.4 and

higher).

Settings:
User Name:  oracleuser(schema name)
Service Name:   xe
Password:   XXX
Confirm Password:   XXX
Port:   1521
Data Source Name:   oracle.jdbc.xa.client.OracleXADataSource
Network Protocol:   TCP
Database Name:  xe
TNS Entry Name: (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(Host =
localhost)(Port = 1521))(CONNECT_DATA = (SID = xe)))
Driver Type:thin
Server Name:localhost

The appropriate value for Data Source Name is the name of the  
datasource

class in the jdbc driver jar file. The value for TNS Entry Name is the
appropriate entry in the tnsnames.ora file.

With geronimo 2.1.4 an error is reported when deploying the  
datasource and
also on every server startup. But this error can be ignored. The  
datasource
works as desired. Rollbacks are performed correctly and no erronous  
data

remains in the database in case of unchecked execptions.


Thanks for documenting this. What is the "error" that you're seeing on  
2.1.4? Would like to see it "fixed", if possible...


--kevan


Re: Configure Oracle XA Datasource with Oracle XE (10g Express) in console dialog

2009-06-03 Thread rbaumhof

We found out the following settings for Oracle XA Datasource. These settings
have been tested with:
Java 1.5, Geronimo 2.1.3,2.1.4 and Oracle 10g Express (XE), 11g Express and
11 Production. 
The jar File for connect was in all cases the appropriate 10g Express thin
jar file that is provided on oracle download site (version for java 1.4 and
higher).

Settings:
User Name:  oracleuser(schema name)
Service Name:   xe
Password:   XXX
Confirm Password:   XXX
Port:   1521
Data Source Name:   oracle.jdbc.xa.client.OracleXADataSource
Network Protocol:   TCP
Database Name:  xe
TNS Entry Name: (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(Host =
localhost)(Port = 1521))(CONNECT_DATA = (SID = xe)))
Driver Type:thin
Server Name:localhost

The appropriate value for Data Source Name is the name of the datasource
class in the jdbc driver jar file. The value for TNS Entry Name is the
appropriate entry in the tnsnames.ora file.

With geronimo 2.1.4 an error is reported when deploying the datasource and
also on every server startup. But this error can be ignored. The datasource
works as desired. Rollbacks are performed correctly and no erronous data
remains in the database in case of unchecked execptions. 




rbaumhof wrote:
> 
> Console dialog displays the following Info on editing the database pool
> settings:
> 
> Pool Type:
>   TranQL XA Resource Adapter for Oracle
>   A resource adaptor that provides access to an Oracle database with XA
> transaction support. 
> 
> This is the plan:
> 
> http://geronimo.apache.org/xml/ns/j2ee/connector-1.2";>
>  xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2";>
> 
> console.dbpool
> oracle.dsa
> 1.0
> rar
> 
> 
> 
> oracle
> oracle
> jdbc14
> jar
> 
> 
> 
> 
> 
> 
>
> javax.sql.DataSource
> 
> oracle.erbreg.withplan
>  name="NetworkProtocol">tcp
>  name="PortNumber">1521
> 
> 
>  name="DataSourceName">OracleXADatasourceWithTranql
>  name="DriverType">thin
>  name="Password">xxx
>  name="ServerName">localhost
> 
> 
> 
>  name="ServiceName">XE
>  name="UserName">xxx
> 
> 
> 
> 
> 
> 10
> 0
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Yes you'r right, i also want to use the datasource within login module.
> But so far i did not try access by program. I only used the test mode when
> configuring the security realm. This should work - it worked without
> problems when configuring the postgresql database.
> 
> Error on Deployment:
> Caused by: java.sql.SQLException: I/O Exception: Connect identifier was
> empty.
> at
> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
> :112)
> at
> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
> :146)
> at
> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
> :255)
> at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
> at
> oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:
> 441)
> at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:165)
> at
> oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtensio
> n.java:35)
> at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
> at
> oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSou
> rce.java:297)
> at
> oracle.jdbc.xa.client.OracleXADataSource.getPooledConnection(OracleXA
> DataSource.java:472)
> at
> oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXAData
> Source.java:159)
> at
> oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXAData
> Source.java:133)
> at
> org.tranql.connector.jdbc.AbstractXADataSourceMCF.g

Re: Configure Oracle XA Datasource with Oracle XE (10g Express) in console dialog

2009-05-26 Thread rbaumhof

Console dialog displays the following Info on editing the database pool
settings:

Pool Type:
TranQL XA Resource Adapter for Oracle
A resource adaptor that provides access to an Oracle database with XA
transaction support. 

This is the plan:

http://geronimo.apache.org/xml/ns/j2ee/connector-1.2";>
http://geronimo.apache.org/xml/ns/deployment-1.2";>

console.dbpool
oracle.dsa
1.0
rar



oracle
oracle
jdbc14
jar






   
javax.sql.DataSource

oracle.erbreg.withplan
tcp
1521


OracleXADatasourceWithTranql
thin
xxx
localhost



XE
xxx





10
0










Yes you'r right, i also want to use the datasource within login module. But
so far i did not try access by program. I only used the test mode when
configuring the security realm. This should work - it worked without
problems when configuring the postgresql database.

thanks for your help,
Ralf



djencks wrote:
> 
> Could you please show the plan for the datasource  (fine to remove  
> username/pw, but knowing the dependencies could be useful) and which  
> tranql wrapper you are using?
> 
> Am I correct in thinking that you are using this datasource in an sql  
> login module in your security realm?
> 
> thanks
> david jencks
> 
> On May 25, 2009, at 9:55 AM, rbaumhof wrote:
> 
>>
>> Hallo, we have got the following problem.
>>
>> Our application is nearly ready developed with a PostgreSQL Database  
>> server.
>> All works fine. Now the customer want's to migrate to Oracle database
>> server. We use EJB 5 standards with managed datasources. Now we have
>> problems to configure a XA datasource in geronimo. Access with  
>> oracle local
>> or oracle thin seemed to work partly, but no commits have been made.  
>> This
>> problem was earlier reported from other people in the forum (search  
>> for
>> oracle XA). Does anybody know how to configure an oracle datasource  
>> with
>> geronimo console dialog?
>>
>> Our settings are:
>> user / password:   don't matter but ok
>> Service Name:  xe
>> Port Number:1521
>> Data Source name: (??)
>> Network Protocol:  tcp (??)
>> Database Name:   (??)
>> Driver Type: thin (??)
>> Servername:127.0.0.1 (server run's on localhost)
>>
>> What could be good values for Data Source Name, Network Protocol,  
>> Database
>> Name and Driver Type.
>>
>> The error i get on configuring an Security Realm is:
>>at java.lang.Thread.run(Thread.java:595)
>> Caused by: java.sql.SQLException: E/A-Exception: Connect identifier  
>> is empty
>>at oracle.jdbc.driver.DatabaseError.throwSqlException(Databa
>> :111)
>>at oracle.jdbc.driver.DatabaseError.throwSqlException(Databa
>> :145)
>>at oracle.jdbc.driver.DatabaseError.throwSqlException(Databa
>> :254)
>>at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java
>>at oracle.jdbc.driver.PhysicalConnection.(PhysicalConn
>> 413)
>>at oracle.jdbc.driver.T4CConnection.(T4CConnection.jav
>>at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDr
>> n.java:34)
>>
>>
>> By the way:
>> Some years ago i wrote a little java query manager console. With this
>> program i can connect to the XE server and the program uses the  
>> original
>> jdbc driver from oracle corporation. This driver i have also used for
>> connection from geronimo. In this little program i followed the  
>> instructions
>> from oracle and wrote my jdbc url as "oracle:thin". That's the  
>> reason why i
>> tried "thin" as driver type. So because this simple java program can
>> establish a connect this should be basically possible - even for  
>> geronimo.
>>
>> much thanks in advance,
>> Ralf
>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Configure-Oracle-XA-Datasource-with-Oracle-XE-%2810g-Express%29-in-console-dialog-tp23707396s134p23707396.html
>> Sent from the Apache Geronimo - Users mailing list archive at  
>> Nabble.com.
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Configure-Oracle-XA-Datasource-with-Oracle-XE-%2810g-Express%29-in-console-dialog-tp23707396s134p23718127.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.



Re: Configure Oracle XA Datasource with Oracle XE (10g Express) in console dialog

2009-05-25 Thread David Jencks
Could you please show the plan for the datasource  (fine to remove  
username/pw, but knowing the dependencies could be useful) and which  
tranql wrapper you are using?


Am I correct in thinking that you are using this datasource in an sql  
login module in your security realm?


thanks
david jencks

On May 25, 2009, at 9:55 AM, rbaumhof wrote:



Hallo, we have got the following problem.

Our application is nearly ready developed with a PostgreSQL Database  
server.

All works fine. Now the customer want's to migrate to Oracle database
server. We use EJB 5 standards with managed datasources. Now we have
problems to configure a XA datasource in geronimo. Access with  
oracle local
or oracle thin seemed to work partly, but no commits have been made.  
This
problem was earlier reported from other people in the forum (search  
for
oracle XA). Does anybody know how to configure an oracle datasource  
with

geronimo console dialog?

Our settings are:
user / password:   don't matter but ok
Service Name:  xe
Port Number:1521
Data Source name: (??)
Network Protocol:  tcp (??)
Database Name:   (??)
Driver Type: thin (??)
Servername:127.0.0.1 (server run's on localhost)

What could be good values for Data Source Name, Network Protocol,  
Database

Name and Driver Type.

The error i get on configuring an Security Realm is:
   at java.lang.Thread.run(Thread.java:595)
Caused by: java.sql.SQLException: E/A-Exception: Connect identifier  
is empty

   at oracle.jdbc.driver.DatabaseError.throwSqlException(Databa
:111)
   at oracle.jdbc.driver.DatabaseError.throwSqlException(Databa
:145)
   at oracle.jdbc.driver.DatabaseError.throwSqlException(Databa
:254)
   at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java
   at oracle.jdbc.driver.PhysicalConnection.(PhysicalConn
413)
   at oracle.jdbc.driver.T4CConnection.(T4CConnection.jav
   at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDr
n.java:34)


By the way:
Some years ago i wrote a little java query manager console. With this
program i can connect to the XE server and the program uses the  
original

jdbc driver from oracle corporation. This driver i have also used for
connection from geronimo. In this little program i followed the  
instructions
from oracle and wrote my jdbc url as "oracle:thin". That's the  
reason why i

tried "thin" as driver type. So because this simple java program can
establish a connect this should be basically possible - even for  
geronimo.


much thanks in advance,
Ralf


--
View this message in context: 
http://www.nabble.com/Configure-Oracle-XA-Datasource-with-Oracle-XE-%2810g-Express%29-in-console-dialog-tp23707396s134p23707396.html
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.




Configure Oracle XA Datasource with Oracle XE (10g Express) in console dialog

2009-05-25 Thread rbaumhof

Hallo, we have got the following problem. 

Our application is nearly ready developed with a PostgreSQL Database server.
All works fine. Now the customer want's to migrate to Oracle database
server. We use EJB 5 standards with managed datasources. Now we have
problems to configure a XA datasource in geronimo. Access with oracle local
or oracle thin seemed to work partly, but no commits have been made. This
problem was earlier reported from other people in the forum (search for
oracle XA). Does anybody know how to configure an oracle datasource with
geronimo console dialog?

Our settings are:
user / password:   don't matter but ok
Service Name:  xe
Port Number:1521
Data Source name: (??)
Network Protocol:  tcp (??)
Database Name:   (??)
Driver Type: thin (??)
Servername:127.0.0.1 (server run's on localhost)

What could be good values for Data Source Name, Network Protocol, Database
Name and Driver Type. 

The error i get on configuring an Security Realm is:
at java.lang.Thread.run(Thread.java:595)
Caused by: java.sql.SQLException: E/A-Exception: Connect identifier is empty
at oracle.jdbc.driver.DatabaseError.throwSqlException(Databa
:111)
at oracle.jdbc.driver.DatabaseError.throwSqlException(Databa
:145)
at oracle.jdbc.driver.DatabaseError.throwSqlException(Databa
:254)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java
at oracle.jdbc.driver.PhysicalConnection.(PhysicalConn
413)
at oracle.jdbc.driver.T4CConnection.(T4CConnection.jav
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDr
n.java:34)


By the way:
Some years ago i wrote a little java query manager console. With this
program i can connect to the XE server and the program uses the original
jdbc driver from oracle corporation. This driver i have also used for
connection from geronimo. In this little program i followed the instructions
from oracle and wrote my jdbc url as "oracle:thin". That's the reason why i
tried "thin" as driver type. So because this simple java program can
establish a connect this should be basically possible - even for geronimo.

much thanks in advance,
Ralf


-- 
View this message in context: 
http://www.nabble.com/Configure-Oracle-XA-Datasource-with-Oracle-XE-%2810g-Express%29-in-console-dialog-tp23707396s134p23707396.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.



Re: Trying to configure Oracle XA

2008-12-04 Thread ericp56

Thanks for the reference.  The examples are always helpful.

If I used the same information you did in your jdbc/TradeDataSource data
source, I believe the GBean deployment will fail.  I submitted this to JIRA: 
https://issues.apache.org/jira/browse/GERONIMO-
https://issues.apache.org/jira/browse/GERONIMO- 

I got it working as mentioned above, and the Exception noted above doesn't
seem to affect the application or database resources.  I was able to use all
of my defined web services without a hitch.

Eric
-- 
View this message in context: 
http://www.nabble.com/Trying-to-configure-Oracle-XA-tp20822347s134p20838290.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.



Re: Trying to configure Oracle XA

2008-12-04 Thread Donald Woods

Have you looked at the DayTrader sample plan for Oracle XA under -
https://svn.apache.org/repos/asf/geronimo/daytrader/trunk/README
https://svn.apache.org/repos/asf/geronimo/daytrader/trunk/plans/dayTrader-oracle-XA-plan.xml

The last time I deployed DayTrader with the Oracle 10 XA RAR, it was 
back in 2.0 days using the above plan (not the Console), but it worked 
without problems



-Donald


ericp56 wrote:

Hello,

I'm trying to configure an Oracle XA database pool in Geronimo.

I've tried various ways to fill out the information, but I haven't
succeeded.  I'm currently getting a "java.sql.SQLException: Io exception:
Unknown host specified" exception. 

When I tried to follow some other posts, I couldn't even deploy the pool. 
GBean deployment fails because of an invalid string operation (CharAt on an

empty string).  I'll open a JIRA ticket for this with the steps to
reproduce, exception output, etc.

Is there any documenation for org.tranql.connector.oracle.XAMCF?  I'm
stabbing blindly on how to configure the database pool - not fun;)

Eric


Re: Trying to configure Oracle XA

2008-12-04 Thread ericp56
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:342)
at sun.reflect.GeneratedMethodAccessor151.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
at
org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
at
com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
at 
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
at
javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1410)
at
javax.management.remote.rmi.RMIConnectionImpl.access$100(RMIConnectionImpl.java:81)
at
javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1247)
at java.security.AccessController.doPrivileged(Native Method)
at
javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1350)
at
javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:784)
at sun.reflect.GeneratedMethodAccessor140.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at 
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
at java.lang.Thread.run(Thread.java:595)
10:33:25,504 ERROR [RecoveryController] javax.transaction.xa.XAException

-- 
View this message in context: 
http://www.nabble.com/Trying-to-configure-Oracle-XA-tp20822347s134p20835877.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.



Re: Trying to configure Oracle XA

2008-12-03 Thread David Jencks
Is there any other info or a stack trace from that?  If the pool is  
otherwise working I wouldn't automatically this is a configuration  
problem but I could easily be wrong.


thanks
david jencks

On Dec 3, 2008, at 7:06 PM, ericp56 wrote:



Success!

I entered the "TNS Entry Name" as follows:
(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(Host =  
oracleserver.abc.com)(Port

= 1521))(CONNECT_DATA = (SID = DEVDB)))

I basically took the definition from my TNSNAMES.ORA file.

I'm still getting an error when deploying the DB pool:
22:01:30,211 ERROR [RecoveryController]  
javax.transaction.xa.XAException


I'll have to try removing info from the other fields to make it go  
away.



--
View this message in context: 
http://www.nabble.com/Trying-to-configure-Oracle-XA-tp20822347s134p20826419.html
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: Trying to configure Oracle XA

2008-12-03 Thread ericp56

Success!

I entered the "TNS Entry Name" as follows:
(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(Host = oracleserver.abc.com)(Port
= 1521))(CONNECT_DATA = (SID = DEVDB)))

I basically took the definition from my TNSNAMES.ORA file.  

I'm still getting an error when deploying the DB pool:
22:01:30,211 ERROR [RecoveryController] javax.transaction.xa.XAException

I'll have to try removing info from the other fields to make it go away.


-- 
View this message in context: 
http://www.nabble.com/Trying-to-configure-Oracle-XA-tp20822347s134p20826419.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.



Trying to configure Oracle XA

2008-12-03 Thread ericp56

Hello,

I'm trying to configure an Oracle XA database pool in Geronimo.

I've tried various ways to fill out the information, but I haven't
succeeded.  I'm currently getting a "java.sql.SQLException: Io exception:
Unknown host specified" exception. 

When I tried to follow some other posts, I couldn't even deploy the pool. 
GBean deployment fails because of an invalid string operation (CharAt on an
empty string).  I'll open a JIRA ticket for this with the steps to
reproduce, exception output, etc.

Is there any documenation for org.tranql.connector.oracle.XAMCF?  I'm
stabbing blindly on how to configure the database pool - not fun;)

Eric
-- 
View this message in context: 
http://www.nabble.com/Trying-to-configure-Oracle-XA-tp20822347s134p20822347.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.



Re: not a NamedXAResource while ack a JMS Message, Oracle XA Plugin?

2007-10-17 Thread Manu George
Hi David,
 I had attached a patch for this very issue in 2.0 in AMQ
and OpenEJB. Some comments from you would be appreciated .

https://issues.apache.org/activemq/browse/AMQ-1438
https://issues.apache.org/jira/browse/OPENEJB-702
https://issues.apache.org/jira/browse/GERONIMO-3354

Even if I pass as name for the NamedXAResource in OpenEJB a hang
occurs in AMQ. With this hack I am able to get rid of the error that
Geronimo throws as well as the hang. All the tests pass in Openejb as
well. I know it needs a bit of cleanup but I need confirmation if this
is the right approach.  Also what should be the name passed for the
XAResource? Is xaResource.toString() ok?

Thanks
Manu


On 10/15/07, David Jencks <[EMAIL PROTECTED]> wrote:
> There's a tranql oracle xa wrapper that's included in geronimo 2.0.2
> (under vote) or available from maven repos but the problem here is in
> openejb: the mdb handling doesn't register properly with the geronimo
> transaction manager.
>
> thanks
> david jencks
>
> On Oct 15, 2007, at 7:16 AM, Jochen Zink wrote:
>
> > Hello,
> >
> > I'm using Geronimo 2.0.1 with a Oracle 9.2 Database. A MDB make
> > some DB-Operations with Container Managed Transaction. After the
> > MDB is complete, and the Container acknoledges the Message, the
> > follwoing Exception is thrown. I read something about a Oracle XA
> > Plugin, but I only found one for Geronimo 1.1.1. Is there already a
> > plugin for Geronimo 2.0.1, which I have not found?
> >
> > Thanks a lot
> > Regards
> > Jochen
> >
> >
> > 12:03:09,312 ERROR [Transaction] Please correct the integration and
> > supply a NamedXAResource
> > java.lang.IllegalStateException: Cannot log transactions as
> > [EMAIL PROTECTED] is not a
> > NamedXAResource.
> > at
> > org.apache.geronimo.transaction.manager.TransactionImpl
> > $TransactionBranch.getResourceName(TransactionImpl.java:697)
> > at
> > org.apache.geronimo.transaction.log.HOWLLog.prepare(HOWLLog.java:254)
> > at
> > org.apache.geronimo.transaction.log.HOWLLog$$FastClassByCGLIB$
> > $7315be2e.invoke()
> > at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
> > at
> > org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke
> > (FastMethodInvoker.java:38)
> > at
> > org.apache.geronimo.gbean.runtime.GBeanOperation.invoke
> > (GBeanOperation.java:124)
> > at
> > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke
> > (GBeanInstance.java:830)
> > at
> > org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:
> > 57)
> > at
> > org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke
> > (RawOperationInvoker.java:35)
> > at
> > org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept
> > (ProxyMethodInterceptor.java:96)
> > at
> > org.apache.geronimo.transaction.manager.TransactionLog$
> > $EnhancerByCGLIB$$528ed9c4.prepare()
> > at
> > org.apache.geronimo.transaction.manager.TransactionImpl.internalPrepar
> > e(TransactionImpl.java:444)
> > at
> > org.apache.geronimo.transaction.manager.TransactionImpl.commit
> > (TransactionImpl.java:316)
> > at
> > org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(
> > TransactionManagerImpl.java:238)
> > at
> > org.apache.openejb.core.transaction.TransactionPolicy.commitTransactio
> > n(TransactionPolicy.java:139)
> > at
> > org.apache.openejb.core.transaction.TxRequired.afterInvoke
> > (TxRequired.java:75)
> > at
> > org.apache.openejb.core.mdb.MdbContainer.afterDelivery
> > (MdbContainer.java:375)
> > at
> > org.apache.openejb.core.mdb.EndpointHandler.afterDelivery
> > (EndpointHandler.java:274)
> > at
> > org.apache.openejb.core.mdb.EndpointHandler.invoke
> > (EndpointHandler.java:164)
> > at $Proxy39.afterDelivery(Unknown Source)
> > at
> > org.apache.activemq.ra.MessageEndpointProxy
> > $MessageEndpointAlive.afterDelivery(MessageEndpointProxy.java:126)
> > at
> > org.apache.activemq.ra.MessageEndpointProxy.afterDelivery
> > (MessageEndpointProxy.java:65)
> > at
> > org.apache.activemq.ra.ServerSessionImpl.afterDelivery
> > (ServerSessionImpl.java:216)
> > at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:751)
> > at
> > org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:
> > 165)
> > at
> > org.apache.geronimo.connector.work.WorkerContext.run
> > (WorkerContext.java:290)
> > at
> > org.apache.geronimo.connector.work.pool.NamedRunnable.run
> > (Name

Re: not a NamedXAResource while ack a JMS Message, Oracle XA Plugin?

2007-10-15 Thread David Jencks
There's a tranql oracle xa wrapper that's included in geronimo 2.0.2  
(under vote) or available from maven repos but the problem here is in  
openejb: the mdb handling doesn't register properly with the geronimo  
transaction manager.


thanks
david jencks

On Oct 15, 2007, at 7:16 AM, Jochen Zink wrote:


Hello,

I'm using Geronimo 2.0.1 with a Oracle 9.2 Database. A MDB make  
some DB-Operations with Container Managed Transaction. After the  
MDB is complete, and the Container acknoledges the Message, the  
follwoing Exception is thrown. I read something about a Oracle XA  
Plugin, but I only found one for Geronimo 1.1.1. Is there already a  
plugin for Geronimo 2.0.1, which I have not found?


Thanks a lot
Regards
Jochen


12:03:09,312 ERROR [Transaction] Please correct the integration and  
supply a NamedXAResource

java.lang.IllegalStateException: Cannot log transactions as
[EMAIL PROTECTED] is not a  
NamedXAResource.

at
org.apache.geronimo.transaction.manager.TransactionImpl 
$TransactionBranch.getResourceName(TransactionImpl.java:697)

at
org.apache.geronimo.transaction.log.HOWLLog.prepare(HOWLLog.java:254)
at
org.apache.geronimo.transaction.log.HOWLLog$$FastClassByCGLIB$ 
$7315be2e.invoke()

at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
(FastMethodInvoker.java:38)

at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
(GBeanOperation.java:124)

at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
(GBeanInstance.java:830)

at
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java: 
57)

at
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke 
(RawOperationInvoker.java:35)

at
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept 
(ProxyMethodInterceptor.java:96)

at
org.apache.geronimo.transaction.manager.TransactionLog$ 
$EnhancerByCGLIB$$528ed9c4.prepare()

at
org.apache.geronimo.transaction.manager.TransactionImpl.internalPrepar 
e(TransactionImpl.java:444)

at
org.apache.geronimo.transaction.manager.TransactionImpl.commit 
(TransactionImpl.java:316)

at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit( 
TransactionManagerImpl.java:238)

at
org.apache.openejb.core.transaction.TransactionPolicy.commitTransactio 
n(TransactionPolicy.java:139)

at
org.apache.openejb.core.transaction.TxRequired.afterInvoke 
(TxRequired.java:75)

at
org.apache.openejb.core.mdb.MdbContainer.afterDelivery 
(MdbContainer.java:375)

at
org.apache.openejb.core.mdb.EndpointHandler.afterDelivery 
(EndpointHandler.java:274)

at
org.apache.openejb.core.mdb.EndpointHandler.invoke 
(EndpointHandler.java:164)

at $Proxy39.afterDelivery(Unknown Source)
at
org.apache.activemq.ra.MessageEndpointProxy 
$MessageEndpointAlive.afterDelivery(MessageEndpointProxy.java:126)

at
org.apache.activemq.ra.MessageEndpointProxy.afterDelivery 
(MessageEndpointProxy.java:65)

at
org.apache.activemq.ra.ServerSessionImpl.afterDelivery 
(ServerSessionImpl.java:216)

at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:751)
at
org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java: 
165)

at
org.apache.geronimo.connector.work.WorkerContext.run 
(WorkerContext.java:290)

at
org.apache.geronimo.connector.work.pool.NamedRunnable.run 
(NamedRunnable.java:32)

at org.apache.geronimo.pool.ThreadPool$1.run(ThreadPool.java:201)
at
org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run 
(ThreadPool.java:331)

at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask 
(ThreadPoolExecutor.java:885)

at
java.util.concurrent.ThreadPoolExecutor$Worker.run 
(ThreadPoolExecutor.java:907)

at java.lang.Thread.run(Thread.java:619)

__ 
_

Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 3 Monate
kostenlos testen. http://www.pc-sicherheit.web.de/startseite/? 
mc=00






not a NamedXAResource while ack a JMS Message, Oracle XA Plugin?

2007-10-15 Thread Jochen Zink
Hello,

I'm using Geronimo 2.0.1 with a Oracle 9.2 Database. A MDB make some 
DB-Operations with Container Managed Transaction. After the MDB is complete, 
and the Container acknoledges the Message, the follwoing Exception is thrown. I 
read something about a Oracle XA Plugin, but I only found one for Geronimo 
1.1.1. Is there already a plugin for Geronimo 2.0.1, which I have not found?

Thanks a lot
Regards
Jochen


12:03:09,312 ERROR [Transaction] Please correct the integration and supply a 
NamedXAResource
java.lang.IllegalStateException: Cannot log transactions as
[EMAIL PROTECTED] is not a NamedXAResource.
at
org.apache.geronimo.transaction.manager.TransactionImpl$TransactionBranch.getResourceName(TransactionImpl.java:697)
at
org.apache.geronimo.transaction.log.HOWLLog.prepare(HOWLLog.java:254)
at
org.apache.geronimo.transaction.log.HOWLLog$$FastClassByCGLIB$$7315be2e.invoke()
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:830)
at
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
at
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
at
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
at
org.apache.geronimo.transaction.manager.TransactionLog$$EnhancerByCGLIB$$528ed9c4.prepare()
at
org.apache.geronimo.transaction.manager.TransactionImpl.internalPrepare(TransactionImpl.java:444)
at
org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:316)
at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:238)
at
org.apache.openejb.core.transaction.TransactionPolicy.commitTransaction(TransactionPolicy.java:139)
at
org.apache.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:75)
at
org.apache.openejb.core.mdb.MdbContainer.afterDelivery(MdbContainer.java:375)
at
org.apache.openejb.core.mdb.EndpointHandler.afterDelivery(EndpointHandler.java:274)
at
org.apache.openejb.core.mdb.EndpointHandler.invoke(EndpointHandler.java:164)
at $Proxy39.afterDelivery(Unknown Source)
at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.afterDelivery(MessageEndpointProxy.java:126)
at
org.apache.activemq.ra.MessageEndpointProxy.afterDelivery(MessageEndpointProxy.java:65)
at
org.apache.activemq.ra.ServerSessionImpl.afterDelivery(ServerSessionImpl.java:216)
at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:751)
at
org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:165)
at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:290)
at
org.apache.geronimo.connector.work.pool.NamedRunnable.run(NamedRunnable.java:32)
at org.apache.geronimo.pool.ThreadPool$1.run(ThreadPool.java:201)
at
org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run(ThreadPool.java:331)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)

___
Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 3 Monate
kostenlos testen. http://www.pc-sicherheit.web.de/startseite/?mc=00



RE: Oracle XA

2007-01-24 Thread Lin Sun
Hi there,

I was able to get Oracle XA driver with daytrader working in the past
(Geronimo 1.1.1 timeframe).   I don't remember if I was ever able to get it
working from the console.Here are some changes I did to the
daytrader-plan:

Put this in the dependency section:

  
oracle
classes12
10g
jar
  

Use the following as my TradeDataSource:


TradeDataSource
tranql/tranql-connector-oracle-xa/1.1/rar
http://geronimo.apache.org/xml/ns/j2ee/connector-1.1";>
  

  
 
javax.sql.DataSource

  jdbc/TradeDataSource
  trade
  trade
  tradedb
  TradeDataSource
  OracleServerName
  1521
  thin
  

  


  10
  0
 
5000
  30
  

  

  

  

  

I also had to use the GERONIMO-2188 patch to get oracle-xa working.

HTH, Lin


From: leonard flournoy [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 24, 2007 12:14 PM
To: user@geronimo.apache.org
Subject: Oracle XA


I am trying to set up oracle to make use of the XA drivers but I have been
unsuccessful. I am using the web console to create the pool and I've
selected Oracle XA. Does anyone have an example of an Oracle XA deployment
plan that works or if you have a link to a page that would guide me through
a detailed install including a glossary of required fields, would you please
point me to it. Part of the problem is that we have no dba here so we
probably aren't providing the correct values. Please provide any assistance
that you can! 

Thanks in advance!
-- 



Oracle XA

2007-01-24 Thread leonard flournoy

I am trying to set up oracle to make use of the XA drivers but I have been
unsuccessful. I am using the web console to create the pool and I've
selected Oracle XA. Does anyone have an example of an Oracle XA deployment
plan that works or if you have a link to a page that would guide me through
a detailed install including a glossary of required fields, would you please
point me to it. Part of the problem is that we have no dba here so we
probably aren't providing the correct values. Please provide any assistance
that you can!

Thanks in advance!
--


RE: daytrader with Tranql Oracle XA resource adapter

2006-07-17 Thread Lin Sun
Hi,

Sorry to get back to you late... got busy on other stuff.

Yes with the generic tranql wrapper, setting the commitBeforeAutocommit to
true would force the commit happen right away.

However this commitBeforeAutocommit isn't available for tranql XA oracle
wrapper.  For Oracle wrapper's LocalMCF, I can just change:

super(new OracleDataSource(), new OracleExceptionSorter(), false);

to

super(new OracleDataSource(), new OracleExceptionSorter(), true);

However, for Oracle wrapper's XAMCF class, the parent class
AbstractXADataSourceMCF's contructor only takes the first 2 parms. Here are
two options I can think of:  

1st option: add the "boolean commitBeforeAutocommit" parm into the
AbstractXADataSourceMCF's contructor, which will also require changes to the
localTransactionCommit method in ManagedXAConnection.   Also all the other
vendor wrappers (db2, derby, mysql) will have to be updated.

2nd option: create the OracleManagedXAConnection class that extends
AbstractManagedConnection.

I would vote for 1st option as we have a quite big number of buggy database
vendors.   What do you think?

Lin

-Original Message-
From: David Jencks [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 07, 2006 12:39 PM
To: user@geronimo.apache.org
Subject: Re: daytrader with Tranql Oracle XA resource adapter

Can you (or have you already) try using the generic tranql wrapper  
with the oracle Driver class and set the commitBeforeAutocommit  
property to true?  This definitely _ought_ to make the commit happen  
immediately: if it does, the oracle driver has a bug and we need to  
modify the oracle wrapper to work around it.

thanks
david jencks

On Jul 7, 2006, at 8:25 AM, Lin Sun wrote:

> Hi there,
>
> Thanks for the pointer!  IIUC, if the application uses  
> connection.commit,
> tranql will translate that as setautocommit(true) when the
> commitBeforeAutoCommit is set to false.   I believe this is what I  
> have in
> my environment.
>
> However, I still don't understand why it makes such a big  
> difference for
> Oracle.  I have loaded daytrader on another J2EE application server
> (WebSphere Application Server) and found out the same order  
> committed to the
> oracle database right away.  With that, I would not categorize it  
> as one of
> the problematic drivers you mentioned before.
>
> Since derby and db2 XA adapter don't have this "delayed committing"  
> problem
> at all, I compared the two Tranql vendors' code with the Oracle  
> vendor code.
> Basically the vendor code contains the vendor specific MCF class  
> that is
> created based on the datasource from the vendor (for example,
> OracleXADataSource).  The MCF also sets/gets the datasource's  
> different
> properties (like databasename, username, password, servername,  
> etc.).  I
> still don't get much clue as to why Oracle is special with Tranql.
>
> I think what I'll do is to come up with a simple application that  
> can be
> loaded into Eclipse and step into the connection.commit() code from  
> Eclipse.
> Too bad that I haven't figured out how to get daytrader running from
> Eclipse.:-(
>
> Time to study the new plugin Sachin puts out.:-)
>
> Lin
>
>
>
>
>
> -Original Message-
> From: Mario Rübsam [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 06, 2006 2:37 PM
> To: user@geronimo.apache.org
> Subject: Re: daytrader with Tranql Oracle XA resource adapter
>
> Lin Sun wrote:
>> Hi there,
>>
>> Do you know how to log the commits on the oracle side?  I 'll be  
>> happy to
>> check that out if I know how to do it.
>
> I don't have a clue about the Oracle tools. But there must be some  
> admin
> tool to show the stats of the server, the connections, threads, ...
> There is normally a transaction counter in these tools. Another way  
> to find
> it out is to look into the driver itself and figure out what is  
> going on
> in the setAutoCommit() method. But this is not legal in every  
> country for
> closed source interfaces.
>
>>
>> I posted another note yesterday.   The application was not using
> AutoCommit.
>> Instead connection.commit() is being used.
>
> That is correct, but to commit the local transaction TranQL use the
> setAutoCommit(true); method, so if the JDBC driver is spec  
> compliant the
> transaction must be commited ... so far the theory, in the real world
> some of the drivers don't do it for performance or whatever reasons.
>
> There was already a discussion about this problem here:
> http://www.mail-archive.com/user@geronimo.apache.org/msg03450.html
>
> Thanks,
> Mario
>
>
>
>>
>> Lin
>>
>> -Orig

Re: daytrader with Tranql Oracle XA resource adapter

2006-07-07 Thread David Jencks
Can you (or have you already) try using the generic tranql wrapper  
with the oracle Driver class and set the commitBeforeAutocommit  
property to true?  This definitely _ought_ to make the commit happen  
immediately: if it does, the oracle driver has a bug and we need to  
modify the oracle wrapper to work around it.


thanks
david jencks

On Jul 7, 2006, at 8:25 AM, Lin Sun wrote:


Hi there,

Thanks for the pointer!  IIUC, if the application uses  
connection.commit,

tranql will translate that as setautocommit(true) when the
commitBeforeAutoCommit is set to false.   I believe this is what I  
have in

my environment.

However, I still don't understand why it makes such a big  
difference for

Oracle.  I have loaded daytrader on another J2EE application server
(WebSphere Application Server) and found out the same order  
committed to the
oracle database right away.  With that, I would not categorize it  
as one of

the problematic drivers you mentioned before.

Since derby and db2 XA adapter don't have this "delayed committing"  
problem
at all, I compared the two Tranql vendors' code with the Oracle  
vendor code.
Basically the vendor code contains the vendor specific MCF class  
that is

created based on the datasource from the vendor (for example,
OracleXADataSource).  The MCF also sets/gets the datasource's  
different
properties (like databasename, username, password, servername,  
etc.).  I

still don't get much clue as to why Oracle is special with Tranql.

I think what I'll do is to come up with a simple application that  
can be
loaded into Eclipse and step into the connection.commit() code from  
Eclipse.

Too bad that I haven't figured out how to get daytrader running from
Eclipse.:-(

Time to study the new plugin Sachin puts out.:-)

Lin





-Original Message-
From: Mario Rübsam [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 06, 2006 2:37 PM
To: user@geronimo.apache.org
Subject: Re: daytrader with Tranql Oracle XA resource adapter

Lin Sun wrote:

Hi there,

Do you know how to log the commits on the oracle side?  I 'll be  
happy to

check that out if I know how to do it.


I don't have a clue about the Oracle tools. But there must be some  
admin

tool to show the stats of the server, the connections, threads, ...
There is normally a transaction counter in these tools. Another way  
to find
it out is to look into the driver itself and figure out what is  
going on
in the setAutoCommit() method. But this is not legal in every  
country for

closed source interfaces.



I posted another note yesterday.   The application was not using

AutoCommit.

Instead connection.commit() is being used.


That is correct, but to commit the local transaction TranQL use the
setAutoCommit(true); method, so if the JDBC driver is spec  
compliant the

transaction must be commited ... so far the theory, in the real world
some of the drivers don't do it for performance or whatever reasons.

There was already a discussion about this problem here:
http://www.mail-archive.com/user@geronimo.apache.org/msg03450.html

Thanks,
Mario





Lin

-Original Message-
From: Mario Rübsam [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 05, 2006 4:59 PM
To: user@geronimo.apache.org
Subject: Re: daytrader with Tranql Oracle XA resource adapter

I don't have experience with the Oracle Adapter. Can you log the  
commits

on

the Oracle side to see if any commits come through? I had a similar

problem
with MaxDB and it seems that the transactions are not closed  
because the
JDBC driver for MaxDB did no commit on the connection if the  
AutoCommit

was
switched from false to true. The JDBC spec says if the value  
changed the

connection must be commited but the driver does not. Thats why I use
CommitBeforeAutCommit now.
Can you try to use the generic adapter to connect to Oracle and  
see if it

happens also?

Thanks,
Mario


Lin Sun wrote:

Hi there,

Thanks - I remember seeing your posting on CommitBeforeAutCommit  
setting

in
the generic adapter.    The CommitBeforeAutCommit setting is not  
avail in

the Oracle XA resource adapter.

Lin

-Original Message-
From: Mario Rübsam [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 29, 2006 4:56 PM
To: user@geronimo.apache.org
Subject: Re: daytrader with Tranql Oracle XA resource adapter

Hi,

the CommitBeforeAutCommit setting in the generic adapter call
a commit on the local connection before it calls setAutoCommit 
(true).

Some JDBC drivers act not like specified in JDBC and don't call
a commit when the AutoCommit value changes with setAutoCommit(true)
so CommitBeforeAutCommit is a workaround to get the transaction
commited on these drivers (MySQL, MaxDB, PostgreSQL in some cases).
I don't know about the XA driver and Oracle but it could be a  
similar

problem.


-Mario



Lin Sun wrote:

Hi there,

I have been playing with the daytrader with Tranql Oracle XA  
resource

adapter (tr

Re: daytrader with Tranql Oracle XA resource adapter

2006-07-07 Thread Mario Ruebsam

Lin Sun wrote:

Hi there,

Thanks for the pointer!  IIUC, if the application uses connection.commit,
tranql will translate that as setautocommit(true) when the
commitBeforeAutoCommit is set to false.   I believe this is what I have in
my environment.


TranQL use always setAutoCommit(true) no matter what you set in
commitBeforeAutoCommit. But if you set commitBeforeAutoCommit=true
TranQL calls a extra commit on the connection so that you can be sure
that it is done.



However, I still don't understand why it makes such a big difference for
Oracle.  I have loaded daytrader on another J2EE application server
(WebSphere Application Server) and found out the same order committed to the
oracle database right away.  With that, I would not categorize it as one of
the problematic drivers you mentioned before.


maybe problematic in case of the setAutoCommit behavior


Thanks,
Mario


Since derby and db2 XA adapter don't have this "delayed committing" problem
at all, I compared the two Tranql vendors' code with the Oracle vendor code.
Basically the vendor code contains the vendor specific MCF class that is
created based on the datasource from the vendor (for example,
OracleXADataSource).  The MCF also sets/gets the datasource's different
properties (like databasename, username, password, servername, etc.).  I
still don't get much clue as to why Oracle is special with Tranql.

I think what I'll do is to come up with a simple application that can be
loaded into Eclipse and step into the connection.commit() code from Eclipse.
Too bad that I haven't figured out how to get daytrader running from
Eclipse.:-(   


Time to study the new plugin Sachin puts out.:-)

Lin





-Original Message-
From: Mario Rübsam [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 06, 2006 2:37 PM

To: user@geronimo.apache.org
Subject: Re: daytrader with Tranql Oracle XA resource adapter

Lin Sun wrote:

Hi there,

Do you know how to log the commits on the oracle side?  I 'll be happy to
check that out if I know how to do it.


I don't have a clue about the Oracle tools. But there must be some admin
tool to show the stats of the server, the connections, threads, ...
There is normally a transaction counter in these tools. Another way to find
it out is to look into the driver itself and figure out what is going on
in the setAutoCommit() method. But this is not legal in every country for
closed source interfaces.


I posted another note yesterday.   The application was not using

AutoCommit.

Instead connection.commit() is being used.


That is correct, but to commit the local transaction TranQL use the
setAutoCommit(true); method, so if the JDBC driver is spec compliant the
transaction must be commited ... so far the theory, in the real world
some of the drivers don't do it for performance or whatever reasons.

There was already a discussion about this problem here:
http://www.mail-archive.com/user@geronimo.apache.org/msg03450.html

Thanks,
Mario




Lin

-Original Message-
From: Mario Rübsam [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 05, 2006 4:59 PM

To: user@geronimo.apache.org
Subject: Re: daytrader with Tranql Oracle XA resource adapter

I don't have experience with the Oracle Adapter. Can you log the commits

on

the Oracle side to see if any commits come through? I had a similar

problem

with MaxDB and it seems that the transactions are not closed because the
JDBC driver for MaxDB did no commit on the connection if the AutoCommit

was

switched from false to true. The JDBC spec says if the value changed the
connection must be commited but the driver does not. Thats why I use
CommitBeforeAutCommit now.
Can you try to use the generic adapter to connect to Oracle and see if it
happens also?

Thanks,
Mario


Lin Sun wrote:

Hi there,

Thanks - I remember seeing your posting on CommitBeforeAutCommit setting

in

the generic adapter.    The CommitBeforeAutCommit setting is not avail in
the Oracle XA resource adapter.  


Lin

-Original Message-
From: Mario Rübsam [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 29, 2006 4:56 PM

To: user@geronimo.apache.org
Subject: Re: daytrader with Tranql Oracle XA resource adapter

Hi,

the CommitBeforeAutCommit setting in the generic adapter call
a commit on the local connection before it calls setAutoCommit(true).
Some JDBC drivers act not like specified in JDBC and don't call
a commit when the AutoCommit value changes with setAutoCommit(true)
so CommitBeforeAutCommit is a workaround to get the transaction
commited on these drivers (MySQL, MaxDB, PostgreSQL in some cases).
I don't know about the XA driver and Oracle but it could be a similar
problem.


-Mario



Lin Sun wrote:

Hi there,

I have been playing with the daytrader with Tranql Oracle XA resource
adapter (tranql-connector-oracle-xa-1.1.rar).  After I tweaked the
plan a bit and I am able to get daytrader running well with oracle!

One thing

RE: daytrader with Tranql Oracle XA resource adapter

2006-07-07 Thread Lin Sun
Hi there,

Thanks for the pointer!  IIUC, if the application uses connection.commit,
tranql will translate that as setautocommit(true) when the
commitBeforeAutoCommit is set to false.   I believe this is what I have in
my environment.

However, I still don't understand why it makes such a big difference for
Oracle.  I have loaded daytrader on another J2EE application server
(WebSphere Application Server) and found out the same order committed to the
oracle database right away.  With that, I would not categorize it as one of
the problematic drivers you mentioned before.

Since derby and db2 XA adapter don't have this "delayed committing" problem
at all, I compared the two Tranql vendors' code with the Oracle vendor code.
Basically the vendor code contains the vendor specific MCF class that is
created based on the datasource from the vendor (for example,
OracleXADataSource).  The MCF also sets/gets the datasource's different
properties (like databasename, username, password, servername, etc.).  I
still don't get much clue as to why Oracle is special with Tranql.

I think what I'll do is to come up with a simple application that can be
loaded into Eclipse and step into the connection.commit() code from Eclipse.
Too bad that I haven't figured out how to get daytrader running from
Eclipse.:-(   

Time to study the new plugin Sachin puts out.:-)

Lin





-Original Message-
From: Mario Rübsam [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 06, 2006 2:37 PM
To: user@geronimo.apache.org
Subject: Re: daytrader with Tranql Oracle XA resource adapter

Lin Sun wrote:
> Hi there,
> 
> Do you know how to log the commits on the oracle side?  I 'll be happy to
> check that out if I know how to do it.

I don't have a clue about the Oracle tools. But there must be some admin
tool to show the stats of the server, the connections, threads, ...
There is normally a transaction counter in these tools. Another way to find
it out is to look into the driver itself and figure out what is going on
in the setAutoCommit() method. But this is not legal in every country for
closed source interfaces.

> 
> I posted another note yesterday.   The application was not using
AutoCommit.
> Instead connection.commit() is being used.

That is correct, but to commit the local transaction TranQL use the
setAutoCommit(true); method, so if the JDBC driver is spec compliant the
transaction must be commited ... so far the theory, in the real world
some of the drivers don't do it for performance or whatever reasons.

There was already a discussion about this problem here:
http://www.mail-archive.com/user@geronimo.apache.org/msg03450.html

Thanks,
Mario



> 
> Lin
> 
> -Original Message-
> From: Mario Rübsam [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, July 05, 2006 4:59 PM
> To: user@geronimo.apache.org
> Subject: Re: daytrader with Tranql Oracle XA resource adapter
> 
> I don't have experience with the Oracle Adapter. Can you log the commits
on
> the Oracle side to see if any commits come through? I had a similar
problem
> with MaxDB and it seems that the transactions are not closed because the
> JDBC driver for MaxDB did no commit on the connection if the AutoCommit
was
> switched from false to true. The JDBC spec says if the value changed the
> connection must be commited but the driver does not. Thats why I use
> CommitBeforeAutCommit now.
> Can you try to use the generic adapter to connect to Oracle and see if it
> happens also?
> 
> Thanks,
> Mario
> 
> 
> Lin Sun wrote:
>> Hi there,
>>
>> Thanks - I remember seeing your posting on CommitBeforeAutCommit setting
> in
>> the generic adapter.The CommitBeforeAutCommit setting is not avail in
>> the Oracle XA resource adapter.  
>>
>> Lin
>>
>> -Original Message-
>> From: Mario Rübsam [mailto:[EMAIL PROTECTED] 
>> Sent: Thursday, June 29, 2006 4:56 PM
>> To: user@geronimo.apache.org
>> Subject: Re: daytrader with Tranql Oracle XA resource adapter
>>
>> Hi,
>>
>> the CommitBeforeAutCommit setting in the generic adapter call
>> a commit on the local connection before it calls setAutoCommit(true).
>> Some JDBC drivers act not like specified in JDBC and don't call
>> a commit when the AutoCommit value changes with setAutoCommit(true)
>> so CommitBeforeAutCommit is a workaround to get the transaction
>> commited on these drivers (MySQL, MaxDB, PostgreSQL in some cases).
>> I don't know about the XA driver and Oracle but it could be a similar
>> problem.
>>
>>
>> -Mario
>>
>>
>>
>> Lin Sun wrote:
>>> Hi there,
>>>
>>> I have been playing with the daytrader with Tranql Oracle XA resource
>>>

Re: daytrader with Tranql Oracle XA resource adapter

2006-07-06 Thread Mario Rübsam

Lin Sun wrote:

Hi there,

Do you know how to log the commits on the oracle side?  I 'll be happy to
check that out if I know how to do it.


I don't have a clue about the Oracle tools. But there must be some admin
tool to show the stats of the server, the connections, threads, ...
There is normally a transaction counter in these tools. Another way to find
it out is to look into the driver itself and figure out what is going on
in the setAutoCommit() method. But this is not legal in every country for
closed source interfaces.



I posted another note yesterday.   The application was not using AutoCommit.
Instead connection.commit() is being used.


That is correct, but to commit the local transaction TranQL use the
setAutoCommit(true); method, so if the JDBC driver is spec compliant the
transaction must be commited ... so far the theory, in the real world
some of the drivers don't do it for performance or whatever reasons.

There was already a discussion about this problem here:
http://www.mail-archive.com/user@geronimo.apache.org/msg03450.html

Thanks,
Mario





Lin

-Original Message-
From: Mario Rübsam [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 05, 2006 4:59 PM

To: user@geronimo.apache.org
Subject: Re: daytrader with Tranql Oracle XA resource adapter

I don't have experience with the Oracle Adapter. Can you log the commits on
the Oracle side to see if any commits come through? I had a similar problem
with MaxDB and it seems that the transactions are not closed because the
JDBC driver for MaxDB did no commit on the connection if the AutoCommit was
switched from false to true. The JDBC spec says if the value changed the
connection must be commited but the driver does not. Thats why I use
CommitBeforeAutCommit now.
Can you try to use the generic adapter to connect to Oracle and see if it
happens also?

Thanks,
Mario


Lin Sun wrote:

Hi there,

Thanks - I remember seeing your posting on CommitBeforeAutCommit setting

in

the generic adapter.The CommitBeforeAutCommit setting is not avail in
the Oracle XA resource adapter.  


Lin

-Original Message-
From: Mario Rübsam [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 29, 2006 4:56 PM

To: user@geronimo.apache.org
Subject: Re: daytrader with Tranql Oracle XA resource adapter

Hi,

the CommitBeforeAutCommit setting in the generic adapter call
a commit on the local connection before it calls setAutoCommit(true).
Some JDBC drivers act not like specified in JDBC and don't call
a commit when the AutoCommit value changes with setAutoCommit(true)
so CommitBeforeAutCommit is a workaround to get the transaction
commited on these drivers (MySQL, MaxDB, PostgreSQL in some cases).
I don't know about the XA driver and Oracle but it could be a similar
problem.


-Mario



Lin Sun wrote:

Hi there,

I have been playing with the daytrader with Tranql Oracle XA resource
adapter (tranql-connector-oracle-xa-1.1.rar).  After I tweaked the
plan a bit and I am able to get daytrader running well with oracle!

One thing I noticed is that if I perform any trading activities as a
user (say uid:1, account_id 50), I get the message that my order has
been completed almost immediately.  However, the order isn't committed
into the oracle database until quite a while.  I don't know the exact
timing but seems to be over 20-30 minutes.

Here is what I did to check if the order is recorded in the database:

Select * from orderejb where account_id=50;

If the order is committed into the database, I would expect a row that
represents my previous order to be returned as the output of the sql
command.

If I run the same scenario with db2 or derby, I can see my order
recorded in the orderejb table immediately.

I looked at the tranql oracle vendor code but I didn't see anywhere
specifying the commit timing thing.  The generic resource adapter does
offer an param called CommitBeforeAutCommit and by setting it to true
would force the commit to happen immediately.   Can someone shed some
light on this?

Thanks, Lin








smime.p7s
Description: S/MIME Cryptographic Signature


RE: daytrader with Tranql Oracle XA resource adapter

2006-07-06 Thread Lin Sun








Hi, I think I ran into the same problem with
the generic adapter too.   I didn’t wait longer than 20 minutes but I
know the data was not committed in the first 20 minutes, unless you reinstall
the app or shutdown the server.

 

Lin

 

-Original Message-
From: Manu George
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 06, 2006 2:42
AM
To: user@geronimo.apache.org
Subject: Re: daytrader with Tranql
Oracle XA resource adapter

 

Hi,
  I have faced the same problem using the generic adapter which got solved
on setting CommitBeforeAutCommit to true. The commits used to happen on
shutting down the app or the server though.

Thanks 
Manu



On 7/6/06, Mario Rübsam <[EMAIL PROTECTED]> wrote:

I
don't have experience with the Oracle Adapter. Can you log the commits on
the Oracle side to see if any commits come through? I had a similar problem
with MaxDB and it seems that the transactions are not closed because the 
JDBC driver for MaxDB did no commit on the connection if the AutoCommit was
switched from false to true. The JDBC spec says if the value changed the
connection must be commited but the driver does not. Thats why I use 
CommitBeforeAutCommit now.
Can you try to use the generic adapter to connect to Oracle and see if it
happens also?

Thanks,
Mario


Lin Sun wrote:
> Hi there,
>
> Thanks - I remember seeing your posting on CommitBeforeAutCommit setting
in 
> the generic adapter.The CommitBeforeAutCommit
setting is not avail in
> the Oracle XA resource adapter.
>
> Lin
>
> -Original Message-
> From: Mario Rübsam [mailto: [EMAIL PROTECTED]]
> Sent: Thursday, June 29, 2006 4:56 PM
> To: user@geronimo.apache.org
> Subject: Re: daytrader with Tranql Oracle XA resource adapter 
>
> Hi,
>
> the CommitBeforeAutCommit setting in the generic adapter call
> a commit on the local connection before it calls setAutoCommit(true).
> Some JDBC drivers act not like specified in JDBC and don't call 
> a commit when the AutoCommit value changes with setAutoCommit(true)
> so CommitBeforeAutCommit is a workaround to get the transaction
> commited on these drivers (MySQL, MaxDB, PostgreSQL in some cases). 
> I don't know about the XA driver and Oracle but it could be a similar
> problem.
>
>
> -Mario
>
>
>
> Lin Sun wrote:
>> Hi there,
>>
>> I have been playing with the daytrader with Tranql Oracle XA resource 
>> adapter (tranql-connector-oracle-xa-1.1.rar).  After I
tweaked the
>> plan a bit and I am able to get daytrader running well with oracle!
>>
>> One thing I noticed is that if I perform any trading activities as a 
>> user (say uid:1, account_id 50), I get the message that my order has
>> been completed almost immediately.  However, the order isn't
committed
>> into the oracle database until quite a while.  I don't know
the exact 
>> timing but seems to be over 20-30 minutes.
>>
>> Here is what I did to check if the order is recorded in the database:
>>
>> Select * from orderejb where account_id=50;
>>
>> If the order is committed into the database, I would expect a row that
>> represents my previous order to be returned as the output of the sql
>> command.
>>
>> If I run the same scenario with db2 or derby, I can see my order 
>> recorded in the orderejb table immediately.
>>
>> I looked at the tranql oracle vendor code but I didn't see anywhere
>> specifying the commit timing thing.  The generic resource
adapter does 
>> offer an param called CommitBeforeAutCommit and by setting it to true
>> would force the commit to happen immediately.   Can someone
shed some
>> light on this?
>>
>> Thanks, Lin 
>>
>
>





 








RE: daytrader with Tranql Oracle XA resource adapter

2006-07-06 Thread Lin Sun
Hi there,

Do you know how to log the commits on the oracle side?  I 'll be happy to
check that out if I know how to do it.

I posted another note yesterday.   The application was not using AutoCommit.
Instead connection.commit() is being used.

Lin

-Original Message-
From: Mario Rübsam [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 05, 2006 4:59 PM
To: user@geronimo.apache.org
Subject: Re: daytrader with Tranql Oracle XA resource adapter

I don't have experience with the Oracle Adapter. Can you log the commits on
the Oracle side to see if any commits come through? I had a similar problem
with MaxDB and it seems that the transactions are not closed because the
JDBC driver for MaxDB did no commit on the connection if the AutoCommit was
switched from false to true. The JDBC spec says if the value changed the
connection must be commited but the driver does not. Thats why I use
CommitBeforeAutCommit now.
Can you try to use the generic adapter to connect to Oracle and see if it
happens also?

Thanks,
Mario


Lin Sun wrote:
> Hi there,
> 
> Thanks - I remember seeing your posting on CommitBeforeAutCommit setting
in
> the generic adapter.The CommitBeforeAutCommit setting is not avail in
> the Oracle XA resource adapter.  
> 
> Lin
> 
> -Original Message-
> From: Mario Rübsam [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, June 29, 2006 4:56 PM
> To: user@geronimo.apache.org
> Subject: Re: daytrader with Tranql Oracle XA resource adapter
> 
> Hi,
> 
> the CommitBeforeAutCommit setting in the generic adapter call
> a commit on the local connection before it calls setAutoCommit(true).
> Some JDBC drivers act not like specified in JDBC and don't call
> a commit when the AutoCommit value changes with setAutoCommit(true)
> so CommitBeforeAutCommit is a workaround to get the transaction
> commited on these drivers (MySQL, MaxDB, PostgreSQL in some cases).
> I don't know about the XA driver and Oracle but it could be a similar
> problem.
> 
> 
> -Mario
> 
> 
> 
> Lin Sun wrote:
>> Hi there,
>>
>> I have been playing with the daytrader with Tranql Oracle XA resource
>> adapter (tranql-connector-oracle-xa-1.1.rar).  After I tweaked the
>> plan a bit and I am able to get daytrader running well with oracle!
>>
>> One thing I noticed is that if I perform any trading activities as a
>> user (say uid:1, account_id 50), I get the message that my order has
>> been completed almost immediately.  However, the order isn't committed
>> into the oracle database until quite a while.  I don't know the exact
>> timing but seems to be over 20-30 minutes.
>>
>> Here is what I did to check if the order is recorded in the database:
>>
>> Select * from orderejb where account_id=50;
>>
>> If the order is committed into the database, I would expect a row that
>> represents my previous order to be returned as the output of the sql
>> command.
>>
>> If I run the same scenario with db2 or derby, I can see my order
>> recorded in the orderejb table immediately.
>>
>> I looked at the tranql oracle vendor code but I didn't see anywhere
>> specifying the commit timing thing.  The generic resource adapter does
>> offer an param called CommitBeforeAutCommit and by setting it to true
>> would force the commit to happen immediately.   Can someone shed some
>> light on this?
>>
>> Thanks, Lin
>>
> 
> 



Re: daytrader with Tranql Oracle XA resource adapter

2006-07-05 Thread Manu George
Hi,
  I have faced the same problem using the generic adapter which
got solved on setting CommitBeforeAutCommit to true. The commits used
to happen on shutting down the app or the server though.

Thanks 
Manu
On 7/6/06, Mario Rübsam <[EMAIL PROTECTED]> wrote:
I don't have experience with the Oracle Adapter. Can you log the commits onthe Oracle side to see if any commits come through? I had a similar problemwith MaxDB and it seems that the transactions are not closed because the
JDBC driver for MaxDB did no commit on the connection if the AutoCommit wasswitched from false to true. The JDBC spec says if the value changed theconnection must be commited but the driver does not. Thats why I use
CommitBeforeAutCommit now.Can you try to use the generic adapter to connect to Oracle and see if ithappens also?Thanks,MarioLin Sun wrote:> Hi there,>> Thanks - I remember seeing your posting on CommitBeforeAutCommit setting in
> the generic adapter.The CommitBeforeAutCommit setting is not avail in> the Oracle XA resource adapter.>> Lin>> -Original Message-> From: Mario Rübsam [mailto:
[EMAIL PROTECTED]]> Sent: Thursday, June 29, 2006 4:56 PM> To: user@geronimo.apache.org> Subject: Re: daytrader with Tranql Oracle XA resource adapter
>> Hi,>> the CommitBeforeAutCommit setting in the generic adapter call> a commit on the local connection before it calls setAutoCommit(true).> Some JDBC drivers act not like specified in JDBC and don't call
> a commit when the AutoCommit value changes with setAutoCommit(true)> so CommitBeforeAutCommit is a workaround to get the transaction> commited on these drivers (MySQL, MaxDB, PostgreSQL in some cases).
> I don't know about the XA driver and Oracle but it could be a similar> problem.>>> -Mario>>>> Lin Sun wrote:>> Hi there,>>>> I have been playing with the daytrader with Tranql Oracle XA resource
>> adapter (tranql-connector-oracle-xa-1.1.rar).  After I tweaked the>> plan a bit and I am able to get daytrader running well with oracle!>>>> One thing I noticed is that if I perform any trading activities as a
>> user (say uid:1, account_id 50), I get the message that my order has>> been completed almost immediately.  However, the order isn't committed>> into the oracle database until quite a while.  I don't know the exact
>> timing but seems to be over 20-30 minutes.>>>> Here is what I did to check if the order is recorded in the database:>>>> Select * from orderejb where account_id=50;
>>>> If the order is committed into the database, I would expect a row that>> represents my previous order to be returned as the output of the sql>> command.>>>> If I run the same scenario with db2 or derby, I can see my order
>> recorded in the orderejb table immediately.>>>> I looked at the tranql oracle vendor code but I didn't see anywhere>> specifying the commit timing thing.  The generic resource adapter does
>> offer an param called CommitBeforeAutCommit and by setting it to true>> would force the commit to happen immediately.   Can someone shed some>> light on this?>>>> Thanks, Lin
>>>>


Re: daytrader with Tranql Oracle XA resource adapter

2006-07-05 Thread Mario Rübsam

I don't have experience with the Oracle Adapter. Can you log the commits on
the Oracle side to see if any commits come through? I had a similar problem
with MaxDB and it seems that the transactions are not closed because the
JDBC driver for MaxDB did no commit on the connection if the AutoCommit was
switched from false to true. The JDBC spec says if the value changed the
connection must be commited but the driver does not. Thats why I use
CommitBeforeAutCommit now.
Can you try to use the generic adapter to connect to Oracle and see if it
happens also?

Thanks,
Mario


Lin Sun wrote:

Hi there,

Thanks - I remember seeing your posting on CommitBeforeAutCommit setting in
the generic adapter.The CommitBeforeAutCommit setting is not avail in
the Oracle XA resource adapter.  


Lin

-Original Message-
From: Mario Rübsam [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 29, 2006 4:56 PM

To: user@geronimo.apache.org
Subject: Re: daytrader with Tranql Oracle XA resource adapter

Hi,

the CommitBeforeAutCommit setting in the generic adapter call
a commit on the local connection before it calls setAutoCommit(true).
Some JDBC drivers act not like specified in JDBC and don't call
a commit when the AutoCommit value changes with setAutoCommit(true)
so CommitBeforeAutCommit is a workaround to get the transaction
commited on these drivers (MySQL, MaxDB, PostgreSQL in some cases).
I don't know about the XA driver and Oracle but it could be a similar
problem.


-Mario



Lin Sun wrote:

Hi there,

I have been playing with the daytrader with Tranql Oracle XA resource
adapter (tranql-connector-oracle-xa-1.1.rar).  After I tweaked the
plan a bit and I am able to get daytrader running well with oracle!

One thing I noticed is that if I perform any trading activities as a
user (say uid:1, account_id 50), I get the message that my order has
been completed almost immediately.  However, the order isn't committed
into the oracle database until quite a while.  I don't know the exact
timing but seems to be over 20-30 minutes.

Here is what I did to check if the order is recorded in the database:

Select * from orderejb where account_id=50;

If the order is committed into the database, I would expect a row that
represents my previous order to be returned as the output of the sql
command.

If I run the same scenario with db2 or derby, I can see my order
recorded in the orderejb table immediately.

I looked at the tranql oracle vendor code but I didn't see anywhere
specifying the commit timing thing.  The generic resource adapter does
offer an param called CommitBeforeAutCommit and by setting it to true
would force the commit to happen immediately.   Can someone shed some
light on this?

Thanks, Lin






smime.p7s
Description: S/MIME Cryptographic Signature


RE: daytrader with Tranql Oracle XA resource adapter

2006-07-05 Thread Lin Sun
Hi there,

Thanks - I remember seeing your posting on CommitBeforeAutCommit setting in
the generic adapter.The CommitBeforeAutCommit setting is not avail in
the Oracle XA resource adapter.  

Lin

-Original Message-
From: Mario Rübsam [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 29, 2006 4:56 PM
To: user@geronimo.apache.org
Subject: Re: daytrader with Tranql Oracle XA resource adapter

Hi,

the CommitBeforeAutCommit setting in the generic adapter call
a commit on the local connection before it calls setAutoCommit(true).
Some JDBC drivers act not like specified in JDBC and don't call
a commit when the AutoCommit value changes with setAutoCommit(true)
so CommitBeforeAutCommit is a workaround to get the transaction
commited on these drivers (MySQL, MaxDB, PostgreSQL in some cases).
I don't know about the XA driver and Oracle but it could be a similar
problem.


-Mario



Lin Sun wrote:
> Hi there,
> 
> I have been playing with the daytrader with Tranql Oracle XA resource
> adapter (tranql-connector-oracle-xa-1.1.rar).  After I tweaked the
> plan a bit and I am able to get daytrader running well with oracle!
> 
> One thing I noticed is that if I perform any trading activities as a
> user (say uid:1, account_id 50), I get the message that my order has
> been completed almost immediately.  However, the order isn't committed
> into the oracle database until quite a while.  I don't know the exact
> timing but seems to be over 20-30 minutes.
> 
> Here is what I did to check if the order is recorded in the database:
> 
> Select * from orderejb where account_id=50;
> 
> If the order is committed into the database, I would expect a row that
> represents my previous order to be returned as the output of the sql
> command.
> 
> If I run the same scenario with db2 or derby, I can see my order
> recorded in the orderejb table immediately.
> 
> I looked at the tranql oracle vendor code but I didn't see anywhere
> specifying the commit timing thing.  The generic resource adapter does
> offer an param called CommitBeforeAutCommit and by setting it to true
> would force the commit to happen immediately.   Can someone shed some
> light on this?
> 
> Thanks, Lin
> 



Re: daytrader with Tranql Oracle XA resource adapter

2006-06-29 Thread Mario Rübsam

Hi,

the CommitBeforeAutCommit setting in the generic adapter call
a commit on the local connection before it calls setAutoCommit(true).
Some JDBC drivers act not like specified in JDBC and don't call
a commit when the AutoCommit value changes with setAutoCommit(true)
so CommitBeforeAutCommit is a workaround to get the transaction
commited on these drivers (MySQL, MaxDB, PostgreSQL in some cases).
I don't know about the XA driver and Oracle but it could be a similar
problem.


-Mario



Lin Sun wrote:

Hi there,

I have been playing with the daytrader with Tranql Oracle XA resource
adapter (tranql-connector-oracle-xa-1.1.rar).  After I tweaked the
plan a bit and I am able to get daytrader running well with oracle!

One thing I noticed is that if I perform any trading activities as a
user (say uid:1, account_id 50), I get the message that my order has
been completed almost immediately.  However, the order isn't committed
into the oracle database until quite a while.  I don't know the exact
timing but seems to be over 20-30 minutes.

Here is what I did to check if the order is recorded in the database:

Select * from orderejb where account_id=50;

If the order is committed into the database, I would expect a row that
represents my previous order to be returned as the output of the sql
command.

If I run the same scenario with db2 or derby, I can see my order
recorded in the orderejb table immediately.

I looked at the tranql oracle vendor code but I didn't see anywhere
specifying the commit timing thing.  The generic resource adapter does
offer an param called CommitBeforeAutCommit and by setting it to true
would force the commit to happen immediately.   Can someone shed some
light on this?

Thanks, Lin



smime.p7s
Description: S/MIME Cryptographic Signature


Oracle XA Driver in Console (via Plugin)

2006-06-09 Thread Aaron Mulder

Here's an attempt to do two things:
- demonstrate plugins in action
- provide easier access to the Oracle XA driver

This will only work on 1.1, specifically
http://people.apache.org/dist/geronimo/unstable/1.1-412854 or a future
1.1 build, and you'll need the full J2EE distribution because Little G
does not include the console.

If you install the plugin called "Oracle XA Driver for Console
(Jetty/Tomcat)" then you'll get an Oracle XA (Test) entry in the
console database pool database list.  You'll also need to put an
Oracle JDBC driver into the Geronimo repository (e.g. Oracle JDBC
9.0.5 for Java 1.4), since we can't redistribute the Oracle JDBC
drivers, but the plugin will install the TranQL connector for you and
make the configuration screen available.

There's still the issue that the TranQL Oracle XA connector RAR does
not include any documentation on the settings it uses, and there are a
lot of them, so I'm not sure how you'll need to configure it, but
hopefully someone here knows.  :)

Thanks,
Aaron