Re: Transaction manager

2008-10-16 Thread Jérôme Delattre
2008/10/15 Jérôme Delattre [EMAIL PROTECTED]:
 2008/10/15 Jérôme Delattre [EMAIL PROTECTED]:
 Hi,

 I am looking for a standalone transaction manager for Tomcat.

 I tried JOTM but there's some blocker bugs in XAPool and the
 datasource implementation, moreover no new release for 3 years is
 scary :-)
 JBossTM works fine but it's under LGPL and unfortunatly I can't use
 it, too bad :-(
 Atomikos would be ok but I did not manage to configure it with Spring
 (the lookup for JTATransactionManager fails: No JTA ... found ..., and
 I don't wan't to tweak my applicationContext.xml with specific things
 as it should work in some other servers).
 I don't know if Geronimo provides a standalone TM that I could use in
 Tomcat, it seems to but I did not found any clear doc / post.

 Which TM are using with Tomcat?

 Thanks,
 Jerome

 I've just noticed JOTM is available in version 2.1.2 in maven repository ...
 http://www.mvnrepository.com/artifact/org.ow2.jotm/jotm-standalone/2.1.2

 On their website it's still 2.0.10 ... strange.


I finally managed to plug Atomikos in Tomcat 6 and it seems to work fine.
Forget my question :-)

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Transaction manager

2008-10-16 Thread Jérôme Delattre
Thanks Martin, but I want to be more generic in my
applicationContext.xml, and just look up for the TM like this:

tx:jta-transaction-manager/

I finally followed this doc:
http://www.atomikos.com/Documentation/Tomcat55Integration33
I just had to add commons-logging to be able to integrate in Tomcat 6.

Spring is warning because it does not find the Transaction Manager,
only User Transaction:

[WARN] org.springframework.transaction.jta.JtaTransactionManager - No
JTA TransactionManager found: transaction suspension and
synchronization with existing JTA transactions not available

But I'm not using REQUIRES_NEW or NOT_SUPPORTED so it should not be a problem.

Jerome

2008/10/16 Martin Gainty [EMAIL PROTECTED]:

 take a look at this setup for atomikosTransactionManager as a ref for 
 org.springframework.transaction.jta.JtaTransactionManager 'transactionManager'

bean id=atomikosTransactionManager 
 class=com.atomikos.icatch.jta.UserTransactionManager init-method=init 
 destroy-method=close
property 
 name=startupTransactionServicevaluetrue/value/property
property name=forceShutdownvaluetrue/value/property
property name=transactionTimeoutvalue600/value/property
/bean

bean id=atomikosUserTransaction 
 class=com.atomikos.icatch.jta.UserTransactionImp /

bean id=transactionManager 
 class=org.springframework.transaction.jta.JtaTransactionManager
property name=transactionManagerref 
 bean=atomikosTransactionManager//property
property name=userTransactionref 
 bean=atomikosUserTransaction//property
property name=transactionSynchronizationName 
 value=SYNCHRONIZATION_ON_ACTUAL_TRANSACTION/
/bean

 http://forum.springframework.org/showthread.php?t=38266

 let me know..
 Martin
 __
 Disclaimer and confidentiality note
 Everything in this e-mail and any attachments relates to the official 
 business of Sender. This transmission is of a confidential nature and Sender 
 does not endorse distribution to any party other than intended recipient. 
 Sender does not necessarily endorse content contained within this 
 transmission.


 Date: Thu, 16 Oct 2008 14:04:37 +0200
 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Subject: Re: Transaction manager

 2008/10/15 Jérôme Delattre [EMAIL PROTECTED]:
  2008/10/15 Jérôme Delattre [EMAIL PROTECTED]:
  Hi,
 
  I am looking for a standalone transaction manager for Tomcat.
 
  I tried JOTM but there's some blocker bugs in XAPool and the
  datasource implementation, moreover no new release for 3 years is
  scary :-)
  JBossTM works fine but it's under LGPL and unfortunatly I can't use
  it, too bad :-(
  Atomikos would be ok but I did not manage to configure it with Spring
  (the lookup for JTATransactionManager fails: No JTA ... found ..., and
  I don't wan't to tweak my applicationContext.xml with specific things
  as it should work in some other servers).
  I don't know if Geronimo provides a standalone TM that I could use in
  Tomcat, it seems to but I did not found any clear doc / post.
 
  Which TM are using with Tomcat?
 
  Thanks,
  Jerome
 
  I've just noticed JOTM is available in version 2.1.2 in maven repository 
  ...
  http://www.mvnrepository.com/artifact/org.ow2.jotm/jotm-standalone/2.1.2
 
  On their website it's still 2.0.10 ... strange.
 

 I finally managed to plug Atomikos in Tomcat 6 and it seems to work fine.
 Forget my question :-)

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 _
 When your life is on the go—take your life with you.
 http://clk.atdmt.com/MRT/go/115298558/direct/01/

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Transaction manager

2008-10-16 Thread Martin Gainty

take a look at this setup for atomikosTransactionManager as a ref for 
org.springframework.transaction.jta.JtaTransactionManager 'transactionManager' 

bean id=atomikosTransactionManager 
class=com.atomikos.icatch.jta.UserTransactionManager init-method=init 
destroy-method=close
property 
name=startupTransactionServicevaluetrue/value/property
property name=forceShutdownvaluetrue/value/property
property name=transactionTimeoutvalue600/value/property   
  
/bean
   
bean id=atomikosUserTransaction 
class=com.atomikos.icatch.jta.UserTransactionImp /
   
bean id=transactionManager 
class=org.springframework.transaction.jta.JtaTransactionManager
property name=transactionManagerref 
bean=atomikosTransactionManager//property
property name=userTransactionref 
bean=atomikosUserTransaction//property
property name=transactionSynchronizationName 
value=SYNCHRONIZATION_ON_ACTUAL_TRANSACTION/ 
/bean

http://forum.springframework.org/showthread.php?t=38266

let me know..
Martin
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


 Date: Thu, 16 Oct 2008 14:04:37 +0200
 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Subject: Re: Transaction manager
 
 2008/10/15 Jérôme Delattre [EMAIL PROTECTED]:
  2008/10/15 Jérôme Delattre [EMAIL PROTECTED]:
  Hi,
 
  I am looking for a standalone transaction manager for Tomcat.
 
  I tried JOTM but there's some blocker bugs in XAPool and the
  datasource implementation, moreover no new release for 3 years is
  scary :-)
  JBossTM works fine but it's under LGPL and unfortunatly I can't use
  it, too bad :-(
  Atomikos would be ok but I did not manage to configure it with Spring
  (the lookup for JTATransactionManager fails: No JTA ... found ..., and
  I don't wan't to tweak my applicationContext.xml with specific things
  as it should work in some other servers).
  I don't know if Geronimo provides a standalone TM that I could use in
  Tomcat, it seems to but I did not found any clear doc / post.
 
  Which TM are using with Tomcat?
 
  Thanks,
  Jerome
 
  I've just noticed JOTM is available in version 2.1.2 in maven repository ...
  http://www.mvnrepository.com/artifact/org.ow2.jotm/jotm-standalone/2.1.2
 
  On their website it's still 2.0.10 ... strange.
 
 
 I finally managed to plug Atomikos in Tomcat 6 and it seems to work fine.
 Forget my question :-)
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

_
When your life is on the go—take your life with you.
http://clk.atdmt.com/MRT/go/115298558/direct/01/

Re: Transaction manager

2008-10-15 Thread Jérôme Delattre
2008/10/15 Jérôme Delattre [EMAIL PROTECTED]:
 Hi,

 I am looking for a standalone transaction manager for Tomcat.

 I tried JOTM but there's some blocker bugs in XAPool and the
 datasource implementation, moreover no new release for 3 years is
 scary :-)
 JBossTM works fine but it's under LGPL and unfortunatly I can't use
 it, too bad :-(
 Atomikos would be ok but I did not manage to configure it with Spring
 (the lookup for JTATransactionManager fails: No JTA ... found ..., and
 I don't wan't to tweak my applicationContext.xml with specific things
 as it should work in some other servers).
 I don't know if Geronimo provides a standalone TM that I could use in
 Tomcat, it seems to but I did not found any clear doc / post.

 Which TM are using with Tomcat?

 Thanks,
 Jerome

I've just noticed JOTM is available in version 2.1.2 in maven repository ...
http://www.mvnrepository.com/artifact/org.ow2.jotm/jotm-standalone/2.1.2

On their website it's still 2.0.10 ... strange.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: transaction manager cannot load in Tomcat 6

2007-05-23 Thread mwaltz



tmo256 wrote:
 
 The main thing is that my problem is very specifically with the
 transaction manager factory
 
I'm in *exactly* the same situation, with exactly the same environment
(Tomcat 6, JDK1.6, FC 6).  We're also getting the ClassNotFound exception on
org.objectweb.jndi.DataSourceFactory.  We've got all of our jars in the
right places, per:
http://static.raibledesigns.com/downloads/howto-tomcat-jotm.html

We also rebuilt carol and jotm under jdk1.6 to get rid of a different issue. 
If you'd like, I can send you our recipe for doing our builds.

To make sure it isn't a classpath issue, we instantiated other classes in
other jars in common/lib in our test.jsp with success.  However, when we
specifically try to instantiate org.objectweb.jndi.DataSourceFactory, we get
the class not found exception.

The source for that class is included in the jar, and we're just now
beginning to collect all the bits that this class is dependent upon.  We're
going to try to rebuild the whole deal.

If we find out anything -- we'll post back here.  Good luck;  transactional
db activity in a most ubiquitous java-based webserver shouldn't be this
tough. :)

Regards,
Mark


-- 
View this message in context: 
http://www.nabble.com/transaction-manager-cannot-load-in-Tomcat-6-tf3774696.html#a10770626
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: transaction manager cannot load in Tomcat 6

2007-05-23 Thread tmo256

Matt:
I got it working, and I think I figured this out. What I believe happens is
that the ClassNotFound Exception is a little misleading: the JOTM classes
ARE found, but the CommonsLogging class needed by the JOTM factory is NOT. I
believe we had a different version of the necessary jar in the classpath,
and ultimately just needed to make sure the commons-logging.jar was
highest in the classpath.

FYI, I did need to recompile using Java 1.6 the Carol jars (ow_carol.jar)
used by JOTM in order to avoid the RMI method exception (noted by several on
the JOTM list).


mwaltz wrote:
 
 
 
 tmo256 wrote:
 
 The main thing is that my problem is very specifically with the
 transaction manager factory
 
 I'm in *exactly* the same situation, with exactly the same environment
 (Tomcat 6, JDK1.6, FC 6).  We're also getting the ClassNotFound exception
 on org.objectweb.jndi.DataSourceFactory.  We've got all of our jars in the
 right places, per:
 http://static.raibledesigns.com/downloads/howto-tomcat-jotm.html
 
 We also rebuilt carol and jotm under jdk1.6 to get rid of a different
 issue.  If you'd like, I can send you our recipe for doing our builds.
 
 To make sure it isn't a classpath issue, we instantiated other classes in
 other jars in common/lib in our test.jsp with success.  However, when we
 specifically try to instantiate org.objectweb.jndi.DataSourceFactory, we
 get the class not found exception.
 
 The source for that class is included in the jar, and we're just now
 beginning to collect all the bits that this class is dependent upon. 
 We're going to try to rebuild the whole deal.
 
 If we find out anything -- we'll post back here.  Good luck; 
 transactional db activity in a most ubiquitous java-based webserver
 shouldn't be this tough. :)
 
 Regards,
 Mark
 
 
 

-- 
View this message in context: 
http://www.nabble.com/transaction-manager-cannot-load-in-Tomcat-6-tf3774696.html#a10771208
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: transaction manager cannot load in Tomcat 6

2007-05-21 Thread tmo256

Hi: Thanks for trying to help out. Let me clarify a couple of points.

The main thing is that my problem is very specifically with the transaction
manager factory; I have successfully set up other dhcp connection pools
(non-transactional).

With the failure to initialize, I moved
all needed jars into CATALINA_BASE/bin, after first trying
 CATALINA_BASE/lib. 
...
I think you should keep the JAR files in the lib folder and not the bin
folder. 

As originally stated, I've tried placing the putting the jars in that
folder, with no difference.

I have configured everything just as in Tomcat 5.5, but there
 seems to be a change in the classloading structure
... 
I would try to connect directly without using JNDI first, to make sure
a direct connection works. 

Because these connections are configured in 5.5 exactly as here (in 6), I
know the connection is correct.

This is what's configured as a global resource in server.xml
...
Where have you placed the above Resource / tag ? 

As stated, I the tag is a global resource and the resourceLink referecing it
is in the default context.xml context.

In addition to the configuration checks I've mentioned in my previous
post, also check that you've configured the web.xml correctly. 

Considering that the main error I've listed is a ClassNotFoundDef, I
question whether my web.xml configuration could change that, though I will
certainly give it a try. Actually: the rest of my Oracle connections work
without any references in web.xml; my understanding from the documentation
was this was optional. You need either the web.xml reference OR a context
reference.

Thanks so much for trying to help, though. Any further suggestions would be
welcome.

Thanks,
Teresa



 I've been trying to use Tomcat 6 (with Java 6) on FC6, but I cannot seem
 to get the third-party transaction manager integrated as in previous
 versions. I have configured everything just as in Tomcat 5.5, but there
 seems to be a change in the classloading structure, which simply
 prevents the classes from loading.
  
 Originally, I had the all the necessary Objectweb (JOTM is my
 transaction manager) in a directory outside of the CATALINA_BASE but had
 appended them to the beginning of the classpath in setclasspath.sh,
 which is how it currently works. With the failure to initialize, I moved
 all needed jars into CATALINA_BASE/bin, after first trying
 CATALINA_BASE/lib. My suspicion is that there's a class that is needed
 by the Objectweb DataSourceFactory that was previously included but is
 no longer found, due to a change in the classloading architecture; but,
 that's almost purely theoretical.
  
 This is the error from catalina.out:
  
 WARNING: Failed to register in JMX: javax.naming.NamingException: Could
 not create resource factory instance [Root exception is
 java.lang.NoClassDefFoundError: Could not initialize class
 org.objectweb.jndi.DataSourceFactory]
  
 This is what's configured as a global resource in server.xml:
 Resource name=AdminCop
 min=1
 max=1
 auth=Container
 type=javax.sql.DataSource
 factory=org.objectweb.jndi.DataSourceFactory
driverClassName=oracle.jdbc.driver.OracleDriver
 username=xxx
 password=xxx
 url=jdbc:oracle:thin:@localhost::XXX /
  
 I have, of course, read the appropriate JNDI How-To, but, as I say, I
 have configured all resources, properties, paths, etc, exactly the same
 as in Tomcat 5.5 with no luck. Any help would be greatly appreciated.
  
 Thanks!
  
 -- Teresa
 
-- 
View this message in context: 
http://www.nabble.com/transaction-manager-cannot-load-in-Tomcat-6-tf3774696.html#a10720221
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: transaction manager cannot load in Tomcat 6

2007-05-21 Thread Rashmi Rubdi

On 5/21/07, tmo256 [EMAIL PROTECTED] wrote:


Thanks so much for trying to help, though. Any further suggestions would be
welcome.


Sorry I couldn't be of help here, the only other thing I can think of
is that the CLASSPATH may be partially correct or incorrect.

It is better to not set the systemwide classpath. It is sufficient to
set the JAVA_HOME and CATALINA_BASE or CATALINA_HOME in the system
environment variables, then Tomcat detects the other JAR files.

I don't know if you already consulted this list:
http://www.objectweb.org/wws/lists/projects/jotm , I'm just posting
the link in case you didn't.


Thanks,
Teresa


-Regards
Rashmi

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: transaction manager cannot load in Tomcat 6

2007-05-19 Thread Rashmi Rubdi

On 5/17/07, Molina, Teresa [EMAIL PROTECTED] wrote:

I've been trying to use Tomcat 6 (with Java 6) on FC6, but I cannot seem
to get the third-party transaction manager integrated as in previous
versions. I have configured everything just as in Tomcat 5.5, but there
seems to be a change in the classloading structure, which simply
prevents the classes from loading.

Originally, I had the all the necessary Objectweb (JOTM is my
transaction manager) in a directory outside of the CATALINA_BASE but had
appended them to the beginning of the classpath in setclasspath.sh,
which is how it currently works. With the failure to initialize, I moved
all needed jars into CATALINA_BASE/bin, after first trying
CATALINA_BASE/lib.


I don't know anything about Objectweb or JOTM transaction manager, but
just trying to point a few corrections with the configuration.

I think you should keep the JAR files in the lib folder and not the bin folder.

I did configure MySQL JDBC Datasource (for connection pooling)
successfully, so I have some basic idea about it how it is supposed to
be configured for Oracle and MySQL.


My suspicion is that there's a class that is needed
by the Objectweb DataSourceFactory that was previously included but is
no longer found, due to a change in the classloading architecture; but,
that's almost purely theoretical.

This is the error from catalina.out:

WARNING: Failed to register in JMX: javax.naming.NamingException: Could
not create resource factory instance [Root exception is
java.lang.NoClassDefFoundError: Could not initialize class
org.objectweb.jndi.DataSourceFactory]


I would try to connect directly without using JNDI first, to make sure
a direct connection works.


This is what's configured as a global resource in server.xml:
Resource name=AdminCop
min=1
max=1
auth=Container
type=javax.sql.DataSource
factory=org.objectweb.jndi.DataSourceFactory
   driverClassName=oracle.jdbc.driver.OracleDriver
username=xxx
password=xxx
url=jdbc:oracle:thin:@localhost::XXX /



Where have you placed the above Resource / tag ?

It should be placed either inside your applications Context node
(please note that it is possible that your Context node could be
defined outside server.xml, in that case you would place it where ever
the Context node is defined --- may be in server.xml or may be
outside)

, or in GlobalNamingResources node.

I'm not sure if you can use min and max attributes above. I couldn't
find any attributes with those names here:
http://jakarta.apache.org/commons/dbcp/configuration.html


I have, of course, read the appropriate JNDI How-To, but, as I say, I
have configured all resources, properties, paths, etc, exactly the same
as in Tomcat 5.5 with no luck. Any help would be greatly appreciated.

Thanks!

-- Teresa



Regards
Rashmi

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: transaction manager cannot load in Tomcat 6

2007-05-19 Thread Rashmi Rubdi

On 5/19/07, Rashmi Rubdi [EMAIL PROTECTED] wrote:

 This is what's configured as a global resource in server.xml:
 Resource name=AdminCop
 min=1
 max=1
 auth=Container
 type=javax.sql.DataSource
 factory=org.objectweb.jndi.DataSourceFactory
driverClassName=oracle.jdbc.driver.OracleDriver
 username=xxx
 password=xxx
 url=jdbc:oracle:thin:@localhost::XXX /



In addition to the configuration checks I've mentioned in my previous
post, also check that you've configured the web.xml correctly.

Here's my configuration for reference, it works with Tomcat 6.0.10 and
Oracle 10g

---
web.xml
---
resource-ref
descriptionOracle Datasource example/description
res-ref-namejdbc/myoracle/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref

---
Context xml  or server.xml Context tag
---

Context path= docBase=... reloadable=true debug=true

Resource name=jdbc/myoracle auth=Container 
type=javax.sql.DataSource
maxActive=20 maxIdle=10  maxWait=-1
username=x password=x 
driverClassName=oracle.jdbc.OracleDriver
url=jdbc:oracle:thin:@Venus:1521:XE/

/Context

--
Place ojdbc14_g.jar under
\apache-tomcat-6.0.10\lib\  folder

-Regards
Rashmi

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]