Re: no UserTransaction in jndi

2007-11-08 Thread Peter Fischer

Hello mgainty,


mgainty wrote:
 
 took a quick gander at
 http://twiki.atomikos-support.com/bin/view.pl/Main/Tomcat55SelfContainedWar
 and dont see any auth or name attributes specified
 
 Perhaps you are interacting with an EJB server???
 
What do you mean? I have only one tomcat running. No own webapp deployed or
ejb server running. I plan to use XA-transactions with Atomikos
transactions. Therefore I need a UserTransaction provided per jndi. This is
what I'm testing, but I have problems on the first setup.

regards,
Peter

-- 
View this message in context: 
http://www.nabble.com/no-UserTransaction-in-jndi-tf4763485.html#a13643926
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: no UserTransaction in jndi

2007-11-08 Thread Peter Fischer

Hello Chuck,


Caldarale, Charles R wrote:
 
 According to the Tomcat doc, the only valid attribute is factory; I'm
 only speculating, but the presence of the name and auth attributes may
 be causing the element to be rejected.
 
 Is there anything shown in the logs about this at Tomcat startup?
 

You'r right, so I tried
Transaction factory=com.atomikos.icatch.jta.UserTransactionFactory /

But there is no change in the result:
- http://localhost:8080/manager/resources; lists only the UserDatabase
- lambdaprobe says that the resource-ref to UserTransaction is not working

manager.log:
08.11.2007 10:07:16 org.apache.catalina.session.StandardSession readObject
FEIN: readObject() loading session EF0E6D1AFB09EB9770363511F24A1FE4
08.11.2007 10:07:16 org.apache.catalina.core.StandardContext listenerStart
FEIN: Sending application start events
08.11.2007 10:07:16 org.apache.catalina.core.StandardContext filterStart
FEIN: Starting filters
08.11.2007 10:07:20 org.apache.catalina.core.ApplicationContext log
INFO: Manager: init: Associated with Deployer
'Catalina:type=Deployer,host=localhost'
08.11.2007 10:07:20 org.apache.catalina.core.ApplicationContext log
INFO: Manager: init: Global resources are available
08.11.2007 10:07:20 org.apache.catalina.core.ApplicationContext log
INFO: Manager: resources:  Listing resources of all types


probe.log:
08 Nov 2007 10:26:00 [http-8080-1] INFO 
org.jstripe.tomcat.probe.ProbeServlet  - setWrapper() called
08 Nov 2007 10:26:00 [http-8080-1] INFO 
org.jstripe.tomcat.probe.ProbeServlet  - Initializing servlet 'probe'
08 Nov 2007 10:26:00 [http-8080-1] INFO 
org.springframework.core.CollectionFactory  - JDK 1.4+ collections available
08 Nov 2007 10:26:00 [http-8080-1] INFO 
org.springframework.core.CollectionFactory  - Commons Collections 3.x
available
08 Nov 2007 10:26:00 [http-8080-1] INFO 
org.jstripe.tomcat.probe.ProbeServlet  - FrameworkServlet 'probe':
initialization started
08 Nov 2007 10:26:00 [http-8080-1] INFO 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader  - Loading XML
bean definitions from ServletContext resource
[/WEB-INF/spring-controllers.xml]
08 Nov 2007 10:26:00 [http-8080-1] INFO 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader  - Loading XML
bean definitions from ServletContext resource
[/WEB-INF/spring-resources.xml]
08 Nov 2007 10:26:00 [http-8080-1] INFO 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader  - Loading XML
bean definitions from ServletContext resource [/WEB-INF/spring-stats.xml]
08 Nov 2007 10:26:00 [http-8080-1] INFO 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader  - Loading XML
bean definitions from ServletContext resource
[/WEB-INF/spring-probe-servlet.xml]
08 Nov 2007 10:26:00 [http-8080-1] INFO 
org.springframework.ui.context.support.UiApplicationContextUtils  - Unable
to locate ThemeSource with name 'themeSource': using default
[EMAIL PROTECTED]
08 Nov 2007 10:26:01 [http-8080-1] INFO 
org.jstripe.tomcat.probe.model.stats.StatsCollection  - stats data read in
234ms.
08 Nov 2007 10:26:01 [http-8080-1] INFO  org.quartz.simpl.SimpleThreadPool 
- Job execution threads will use class loader of thread: http-8080-1
08 Nov 2007 10:26:01 [http-8080-1] INFO  org.quartz.core.QuartzScheduler  -
Quartz Scheduler v.1.5.1 created.
08 Nov 2007 10:26:01 [http-8080-1] INFO  org.quartz.simpl.RAMJobStore  -
RAMJobStore initialized.
08 Nov 2007 10:26:01 [http-8080-1] INFO  org.quartz.impl.StdSchedulerFactory 
- Quartz scheduler 'DefaultQuartzScheduler' initialized from default
resource file in Quartz package: 'quartz.properties'
08 Nov 2007 10:26:01 [http-8080-1] INFO  org.quartz.impl.StdSchedulerFactory 
- Quartz scheduler version: 1.5.1
08 Nov 2007 10:26:01 [http-8080-1] INFO 
org.springframework.scheduling.quartz.SchedulerFactoryBean  - Starting
Quartz scheduler now
08 Nov 2007 10:26:01 [http-8080-1] INFO  org.quartz.core.QuartzScheduler  -
Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
08 Nov 2007 10:26:01 [http-8080-1] INFO 
org.jstripe.tomcat.probe.ProbeServlet  - Using context class
[org.springframework.web.context.support.XmlWebApplicationContext] for
servlet 'probe'
08 Nov 2007 10:26:01 [http-8080-1] INFO 
org.jstripe.tomcat.probe.ProbeServlet  - Unable to locate MultipartResolver
with name 'multipartResolver': no multipart request handling provided
08 Nov 2007 10:26:01 [http-8080-1] INFO 
org.jstripe.tomcat.probe.ProbeServlet  - Unable to locate LocaleResolver
with name 'localeResolver': using default
[EMAIL PROTECTED]
08 Nov 2007 10:26:01 [http-8080-1] INFO 
org.jstripe.tomcat.probe.ProbeServlet  - Using ThemeResolver
[EMAIL PROTECTED]
08 Nov 2007 10:26:01 [http-8080-1] INFO 
org.jstripe.tomcat.probe.ProbeServlet  - No HandlerAdapters found in servlet
'probe': using default
08 Nov 2007 10:26:01 [http-8080-1] INFO 
org.jstripe.tomcat.probe.ProbeServlet  - FrameworkServlet 'probe':
initialization completed in 1607 ms
08 Nov 2007 10:26:01 [http-8080-1] INFO

Re: no UserTransaction in jndi

2007-11-08 Thread Peter Fischer

Hello,

under 5.5.9 the configuration has to be
Resource
name=UserTransaction
type=com.atomikos.icatch.jta.UserTransactionImp
factory=org.apache.naming.factory.BeanFactory/ 

With this, the 5.5.9 manager lists the UserTransaction. But I want to use a
actual version of tomcat.

Should the manager list the UserTransaction if it is configured under 5.5.25
or 6.0.14 with
Transaction factory=com.atomikos.icatch.jta.UserTransactionFactory /?

regards,
Peter
-- 
View this message in context: 
http://www.nabble.com/no-UserTransaction-in-jndi-tf4763485.html#a13644275
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: no UserTransaction in jndi

2007-11-08 Thread Martin Gainty
Hi Peter

The immediate answer is no as you would be losing JNDI lookup capability

Read this quote from one of the atomikos staff

Tomcat JNDI configuration can be a pain to set up, mainly due to the way
Tomcat requires several XML elements to agree on the same naming parts. The
easiest way to get Tomcat to work is by subscribing: subscribers get access
to Atomikos control panel web app, making it easy to configure everything.

At first blush this does'nt seem to answer the question posed
personally I would be extremely careful about committing business
functionality using proprietary software where no source is available
http://twiki.atomikos-support.com/bin/view.pl/Main/KnownProblems#Tomcat_JNDI
_Configuration

Perhaps Rainier has input?

Martin--
- Original Message -
From: Peter Fischer [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Thursday, November 08, 2007 5:09 AM
Subject: Re: no UserTransaction in jndi



 Hello,

 under 5.5.9 the configuration has to be
 Resource
 name=UserTransaction
 type=com.atomikos.icatch.jta.UserTransactionImp
 factory=org.apache.naming.factory.BeanFactory/

 With this, the 5.5.9 manager lists the UserTransaction. But I want to use
a
 actual version of tomcat.

 Should the manager list the UserTransaction if it is configured under
5.5.25
 or 6.0.14 with
 Transaction factory=com.atomikos.icatch.jta.UserTransactionFactory /?

 regards,
 Peter
 --
 View this message in context:
http://www.nabble.com/no-UserTransaction-in-jndi-tf4763485.html#a13644275
 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]




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



no UserTransaction in jndi

2007-11-07 Thread Peter Fischer

Hello,

I try to configure a tomcat 6.0.14 to provide a
javax.transaction.UserTransaction in jndi java:comp/UserTransaction.

For this I added to the GlobalNamingResources in the server.xml

Transaction name=UserTransaction auth=Container
factory=com.atomikos.icatch.jta.UserTransactionFactory
/

and 
ResourceLink global=UserTransaction name=UserTransaction
type=javax.transaction.UserTransaction /
to the global context.

I put the needed jars into the folder $catalina_home$/lib.

Listing all jndi-resources with http://localhost:8080/manager/resources;
shows only the UserDatabase without the UserTransaction.

The log of lambdaprobe contains this error if I list the jndi-resources:

07 Nov 2007 10:16:19 [http-8080-1] INFO 
org.jstripe.tomcat.probe.beans.ContainerWrapperBean  - Using
org.jstripe.tomcat.probe.Tomcat55ContainerAdaptor
07 Nov 2007 10:16:19 [http-8080-1] INFO 
org.jstripe.tomcat.probe.beans.ContainerWrapperBean  - Using DEFAULT
resource resolver
07 Nov 2007 10:16:19 [http-8080-1] INFO 
org.jstripe.tomcat.probe.beans.ResourceResolverBean  - Reading CONTEXT 
07 Nov 2007 10:16:19 [http-8080-1] ERROR
org.jstripe.tomcat.probe.beans.ResourceResolverBean  - Failed to lookup:
UserTransaction
javax.naming.NameNotFoundException: Name UserTransaction is not bound in
this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at
org.jstripe.tomcat.probe.beans.ResourceResolverBean.lookupResource(ResourceResolverBean.java:107)
at
org.jstripe.tomcat.probe.beans.ResourceResolverBean.getApplicationResources(ResourceResolverBean.java:89)
at
org.jstripe.tomcat.probe.tools.ApplicationUtils.getApplicationDataSourceUsageScore(ApplicationUtils.java:150)
at
org.jstripe.tomcat.probe.tools.ApplicationUtils.getApplication(ApplicationUtils.java:137)
at
org.jstripe.tomcat.probe.controllers.AppSummaryController.handleContext(AppSummaryController.java:35)
at
org.jstripe.tomcat.probe.controllers.ContextHandlerController.handleRequestInternal(ContextHandlerController.java:39)
at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:723)
at 
org.jstripe.tomcat.probe.ProbeServlet.doDispatch(ProbeServlet.java:49)
at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:663)
at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:394)
at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:348)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:120)
at
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447

Re: no UserTransaction in jndi

2007-11-07 Thread Martin Gainty
took a quick gander at
http://twiki.atomikos-support.com/bin/view.pl/Main/Tomcat55SelfContainedWar
and dont see any auth or name attributes specified

Perhaps you are interacting with an EJB server???
M--
- Original Message - 
From: Caldarale, Charles R [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Wednesday, November 07, 2007 8:49 AM
Subject: RE: no UserTransaction in jndi


 From: Peter Fischer [mailto:[EMAIL PROTECTED] 
 Subject: no UserTransaction in jndi
 
 For this I added to the GlobalNamingResources in the server.xml
 Transaction name=UserTransaction auth=Container
 factory=com.atomikos.icatch.jta.UserTransactionFactory
 /

According to the Tomcat doc, the only valid attribute is factory; I'm
only speculating, but the presence of the name and auth attributes may
be causing the element to be rejected.

Is there anything shown in the logs about this at Tomcat startup?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



-
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: no UserTransaction in jndi

2007-11-07 Thread Caldarale, Charles R
 From: Peter Fischer [mailto:[EMAIL PROTECTED] 
 Subject: no UserTransaction in jndi
 
 For this I added to the GlobalNamingResources in the server.xml
 Transaction name=UserTransaction auth=Container
 factory=com.atomikos.icatch.jta.UserTransactionFactory
 /

According to the Tomcat doc, the only valid attribute is factory; I'm
only speculating, but the presence of the name and auth attributes may
be causing the element to be rejected.

Is there anything shown in the logs about this at Tomcat startup?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



Usertransaction

2007-09-06 Thread Gerard Biemolt
Hi All,

I'm currently trying to create a transaction between a standalone
application and a web service. By starting a usertransaction in
the standalone app and bridging it to/with the web service.
However I'm unable to get use a transaction in the web service.
I took these steps:

- published a transactional webservice with apache axis on tomcat 5.5
- added to /conf/server.xml
  Transaction name=UserTransaction factory=
com.arjuna.mw.wst.UserTransactionFactory/
- added to /conf/context.xml
   ResourceLink name=UserTransaction global=UserTransaction type=
com.arjuna.mw.wst.UserTransactionFactory/
- added the following lines to the code:
InitialContext ctx = new InitialContext();
ut = (UserTransaction) ctx.lookup(java:comp/UserTransaction);
which gives the javax.naming.NameNotFoundException: Name UserTransaction is
not bound in this Context

Am I missing some xml-statements somewhere?

thanks in advance,

Gerard


Re: UserTransaction, JOTM and Tomcat 5.5.x

2007-05-27 Thread sxm

I am able to work with JOTM when I run tomcat stand alone, but when I run it
from maven (embedded), UserTransaction doesn't get bind in the context
resulting in following error. 

javax.naming.NamingException: Cannot create resource instance
at
org.apache.naming.factory.TransactionFactory.getObjectInstance(TransactionFactor\
y.java:98)
at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.apache.naming.NamingContext.lookup(NamingContext.java:792)
at org.apache.naming.NamingContext.lookup(NamingContext.java:139)
at org.apache.naming.NamingContext.lookup(NamingContext.java:780)
at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
at
org.apache.naming.SelectorContext.lookup(SelectorContext.java:136)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at
flex.data.DataServiceTransaction.doBegin(DataServiceTransaction.java:653)
at
flex.data.DataServiceTransaction.begin(DataServiceTransaction.java:624)
at
flex.data.DataService.serviceTransactedMessage(DataService.java:474)
at flex.data.DataService.serviceMessage(DataService.java:241)
at
flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:548)
at
flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:3\
02)
at
flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(AbstractRTMPSer\
ver.java:682)
at
flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTMPConnection\
.java:665)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask\
(ThreadPoolExecutor.java:643)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(Thr\
eadPoolExecutor.java:668)


Matt Raible-3 wrote:
 
 Just to follow up on this, the settings below work - but HSQLDB
 doesn't seem to support nested transactions.
 
  beginning the transaction 
 DBTest  javax.transaction.NotSupportedException: Nested transactions not
 suppo
 rted
 at org.objectweb.jotm.Current.begin(Current.java:233)
 at foo.DBTest.init(DBTest.java:30)
 at org.apache.jsp.test_jsp._jspService(org.apache.jsp.test_jsp:54)
 
 The DBTest class is from the JOTM + Tomcat example at
 http://jotm.objectweb.org/current/jotm/doc/howto-tomcat-jotm.html.
 
 Changing to use MySQL solves the problem and everything works great.
 
 Also, it looks like JOTM (or maybe Carol) has issues with JDK 5.  I
 googled for the following error and it appears to be known about on
 the ObjectWeb mailing lists - but there doesn't seem to be a
 documented solution.
 
 java.lang.NoSuchMethodError:
 sun.rmi.transport.ObjectTable.getStub(Ljava/rmi/Remote;)Ljava/rmi/server/RemoteStub;
 
 org.objectweb.carol.rmi.jrmp.server.JUnicastRemoteObject.unexportObject(JUnicastRemoteObject.java:138)
 
 org.objectweb.carol.rmi.multi.JrmpPRODelegate.unexportObject(JrmpPRODelegate.java:107)
 
 org.objectweb.carol.rmi.multi.MultiPRODelegate.unexportObject(MultiPRODelegate.java:107)
 
 javax.rmi.PortableRemoteObject.unexportObject(PortableRemoteObject.java:119)
 
 org.objectweb.jotm.SubCoordinator.doAfterCompletion(SubCoordinator.java:1584)
   org.objectweb.jotm.SubCoordinator.doRollback(SubCoordinator.java:1370)
   org.objectweb.jotm.SubCoordinator.rollback(SubCoordinator.java:330)
   org.objectweb.jotm.TransactionImpl.rollback(TransactionImpl.java:668)
   org.objectweb.jotm.Current.rollback(Current.java:538)
   foo.DBTest.init(DBTest.java:50)
   org.apache.jsp.test_jsp._jspService(org.apache.jsp.test_jsp:54)
 
 Thanks,
 
 Matt
 
 On 2/8/06, Remy Maucherat [EMAIL PROTECTED] wrote:
 Since you're doing docs, META-INF/context.xml should be simplified to:
 Context

 Resource name=jdbc/myDB auth=Container
 type=javax.sql.DataSource
 factory=org.objectweb.jndi.DataSourceFactory
 driverClassName=org.hsqldb.jdbcDriver
 username=sa password=
 url=jdbc:hsqldb:./

 Transaction factory=org.objectweb.jotm.UserTransactionFactory
 jotm.timeout=60/

 /Context

 No servlet class reloading anymore (not useful to many people), and
 the Transaction element has all the necessary defaults since it's a
 special resource.

 --
 x
 Rémy Maucherat
 Developer  Consultant
 JBoss Group (Europe) SàRL
 x

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


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

-- 
View this message in context: 
http://www.nabble.com/UserTransaction%2C-JOTM-and-Tomcat-5.5.x-tf1073172.html#a10830695
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

Re: UserTransaction, JOTM and Tomcat 5.5.x

2006-09-11 Thread Ignacio de Córdoba

Hi there,
I am trying to follow docs in these messages to implement transaction
support in my stand alone Tomcat 5.5.17, but not to use it with JDBC but
with a remote JBoss server.
I get a comp not bound error:

Caused by: javax.naming.NameNotFoundException: comp not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
at sun.reflect.GeneratedMethodAccessor108.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)

when doing the lookup. I've tried to register the Transaction element in
all places in tomcat (conf/context.xml, server.xml, META-INF/context.xml in
my webapp, ...) but can't make it create the java:comp/UserTransaction name
in the initial context.
The code I am using is:
   return (UserTransaction)new
javax.naming.InitialContext().lookup(java:comp/UserTransaction);

Thanks for any help...

Ignacio
-- 
View this message in context: 
http://www.nabble.com/UserTransaction%2C-JOTM-and-Tomcat-5.5.x-tf1073172.html#a6244225
Sent from the Tomcat - User forum 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]



java:comp/UserTransaction NameNotFoundException Tomcat 5.0.28

2006-07-24 Thread Seetha Rao
Hi I'm using JOTM for transaction management with Tomcat 5.0.28. I have all
the required jar files as given in
http://jotm.objectweb.org/current/jotm/doc/howto-tomcat-jotm.html The JNDI
look up throws the following exception:

Here is the code:

Context ctx = new InitialContext();
UserTransaction userTx =
(UserTransaction)ctx.lookup(java:comp/UserTransaction);

The Entry in the mywebapp.xml file:

Resource name=UserTransaction auth=Container
type=javax.transaction.UserTransaction /
ResourceParams name=UserTransaction
parameter
  namefactory/name
  valueorg.objectweb.jotm.UserTransactionFactory/value
  /parameter
parameter
  namejotm.timeout/name
  value60/value
/parameter
/ResourceParams

Exception:
javax.naming.NameNotFoundException
at
org.objectweb.carol.jndi.enc.java.CompNamingContext.lookupCtx(CompNamingCont
ext.java:689)
at
org.objectweb.carol.jndi.enc.java.CompNamingContext.lookup(CompNamingContext
.java:179)
at
org.objectweb.carol.jndi.enc.java.JavaURLContext.lookup(JavaURLContext.java:
138)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.vcbp.struts.action.InsertuserAction.execute(InsertuserAction.java:81)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:484)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.Http

Could anyone give me home hints?

Thanks
Seetha


-
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: java:comp/UserTransaction NameNotFoundException Tomcat 5.0.28

2006-07-24 Thread Vivek Mohan

try using java:comp/env.UserTransaction for JNDI lookup.

--
Vivek.

On 7/24/06, Seetha Rao [EMAIL PROTECTED] wrote:

Hi I'm using JOTM for transaction management with Tomcat 5.0.28. I have all
the required jar files as given in
http://jotm.objectweb.org/current/jotm/doc/howto-tomcat-jotm.html The JNDI
look up throws the following exception:

Here is the code:

Context ctx = new InitialContext();
UserTransaction userTx =
(UserTransaction)ctx.lookup(java:comp/UserTransaction);

The Entry in the mywebapp.xml file:

Resource name=UserTransaction auth=Container
type=javax.transaction.UserTransaction /
ResourceParams name=UserTransaction
parameter
  namefactory/name
  valueorg.objectweb.jotm.UserTransactionFactory/value
  /parameter
parameter
  namejotm.timeout/name
  value60/value
/parameter
/ResourceParams

Exception:
javax.naming.NameNotFoundException
at
org.objectweb.carol.jndi.enc.java.CompNamingContext.lookupCtx(CompNamingCont
ext.java:689)
at
org.objectweb.carol.jndi.enc.java.CompNamingContext.lookup(CompNamingContext
.java:179)
at
org.objectweb.carol.jndi.enc.java.JavaURLContext.lookup(JavaURLContext.java:
138)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.vcbp.struts.action.InsertuserAction.execute(InsertuserAction.java:81)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:484)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.Http

Could anyone give me home hints?

Thanks
Seetha


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





--
This is your life and it's ending one minute at a time.

-
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: java:comp/UserTransaction NameNotFoundException Tomcat 5.0.28

2006-07-24 Thread Vivek Mohan

sorry, I meant, java:comp/env/UserTransaction

--
Vivek.

On 7/24/06, Vivek Mohan [EMAIL PROTECTED] wrote:

try using java:comp/env.UserTransaction for JNDI lookup.

--
Vivek.

On 7/24/06, Seetha Rao [EMAIL PROTECTED] wrote:
 Hi I'm using JOTM for transaction management with Tomcat 5.0.28. I have all
 the required jar files as given in
 http://jotm.objectweb.org/current/jotm/doc/howto-tomcat-jotm.html The JNDI
 look up throws the following exception:

 Here is the code:

 Context ctx = new InitialContext();
 UserTransaction userTx =
 (UserTransaction)ctx.lookup(java:comp/UserTransaction);

 The Entry in the mywebapp.xml file:

 Resource name=UserTransaction auth=Container
 type=javax.transaction.UserTransaction /
 ResourceParams name=UserTransaction
 parameter
   namefactory/name
   valueorg.objectweb.jotm.UserTransactionFactory/value
   /parameter
 parameter
   namejotm.timeout/name
   value60/value
 /parameter
 /ResourceParams

 Exception:
 javax.naming.NameNotFoundException
 at
 org.objectweb.carol.jndi.enc.java.CompNamingContext.lookupCtx(CompNamingCont
 ext.java:689)
 at
 org.objectweb.carol.jndi.enc.java.CompNamingContext.lookup(CompNamingContext
 .java:179)
 at
 org.objectweb.carol.jndi.enc.java.JavaURLContext.lookup(JavaURLContext.java:
 138)
 at javax.naming.InitialContext.lookup(Unknown Source)
 at com.vcbp.struts.action.InsertuserAction.execute(InsertuserAction.java:81)
 at
 org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
 sor.java:484)
 at
 org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
 at javax.servlet.http.Http

 Could anyone give me home hints?

 Thanks
 Seetha


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




--
This is your life and it's ending one minute at a time.




--
This is your life and it's ending one minute at a time.

-
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: java:comp/UserTransaction NameNotFoundException Tomcat 5.0.28

2006-07-24 Thread Seetha Rao
Thanks, but got the same exception.

-Original Message-
From: Vivek Mohan [mailto:[EMAIL PROTECTED]
Sent: Monday, July 24, 2006 4:16 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: java:comp/UserTransaction NameNotFoundException Tomcat
5.0.28


sorry, I meant, java:comp/env/UserTransaction

--
Vivek.

On 7/24/06, Vivek Mohan [EMAIL PROTECTED] wrote:
 try using java:comp/env.UserTransaction for JNDI lookup.

 --
 Vivek.

 On 7/24/06, Seetha Rao [EMAIL PROTECTED] wrote:
  Hi I'm using JOTM for transaction management with Tomcat 5.0.28. I have
all
  the required jar files as given in
  http://jotm.objectweb.org/current/jotm/doc/howto-tomcat-jotm.html The
JNDI
  look up throws the following exception:
 
  Here is the code:
 
  Context ctx = new InitialContext();
  UserTransaction userTx =
  (UserTransaction)ctx.lookup(java:comp/UserTransaction);
 
  The Entry in the mywebapp.xml file:
 
  Resource name=UserTransaction auth=Container
  type=javax.transaction.UserTransaction /
  ResourceParams name=UserTransaction
  parameter
namefactory/name
valueorg.objectweb.jotm.UserTransactionFactory/value
/parameter
  parameter
namejotm.timeout/name
value60/value
  /parameter
  /ResourceParams
 
  Exception:
  javax.naming.NameNotFoundException
  at
 
org.objectweb.carol.jndi.enc.java.CompNamingContext.lookupCtx(CompNamingCont
  ext.java:689)
  at
 
org.objectweb.carol.jndi.enc.java.CompNamingContext.lookup(CompNamingContext
  .java:179)
  at
 
org.objectweb.carol.jndi.enc.java.JavaURLContext.lookup(JavaURLContext.java:
  138)
  at javax.naming.InitialContext.lookup(Unknown Source)
  at
com.vcbp.struts.action.InsertuserAction.execute(InsertuserAction.java:81)
  at
 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
  sor.java:484)
  at
 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
  at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
  at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
  at javax.servlet.http.Http
 
  Could anyone give me home hints?
 
  Thanks
  Seetha
 
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 This is your life and it's ending one minute at a time.



--
This is your life and it's ending one minute at a time.

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


-
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: java:comp/UserTransaction NameNotFoundException Tomcat 5.0.28

2006-07-24 Thread Pid
Have you got useNaming=true enabled in your context.xml, or server.xml
Context element?



Seetha Rao wrote:
 Thanks, but got the same exception.
 
 -Original Message-
 From: Vivek Mohan [mailto:[EMAIL PROTECTED]
 Sent: Monday, July 24, 2006 4:16 PM
 To: Tomcat Users List; [EMAIL PROTECTED]
 Subject: Re: java:comp/UserTransaction NameNotFoundException Tomcat
 5.0.28
 
 
 sorry, I meant, java:comp/env/UserTransaction
 
 --
 Vivek.
 
 On 7/24/06, Vivek Mohan [EMAIL PROTECTED] wrote:
 try using java:comp/env.UserTransaction for JNDI lookup.

 --
 Vivek.

 On 7/24/06, Seetha Rao [EMAIL PROTECTED] wrote:
 Hi I'm using JOTM for transaction management with Tomcat 5.0.28. I have
 all
 the required jar files as given in
 http://jotm.objectweb.org/current/jotm/doc/howto-tomcat-jotm.html The
 JNDI
 look up throws the following exception:

 Here is the code:

 Context ctx = new InitialContext();
 UserTransaction userTx =
 (UserTransaction)ctx.lookup(java:comp/UserTransaction);

 The Entry in the mywebapp.xml file:

 Resource name=UserTransaction auth=Container
 type=javax.transaction.UserTransaction /
 ResourceParams name=UserTransaction
 parameter
   namefactory/name
   valueorg.objectweb.jotm.UserTransactionFactory/value
   /parameter
 parameter
   namejotm.timeout/name
   value60/value
 /parameter
 /ResourceParams

 Exception:
 javax.naming.NameNotFoundException
 at

 org.objectweb.carol.jndi.enc.java.CompNamingContext.lookupCtx(CompNamingCont
 ext.java:689)
 at

 org.objectweb.carol.jndi.enc.java.CompNamingContext.lookup(CompNamingContext
 .java:179)
 at

 org.objectweb.carol.jndi.enc.java.JavaURLContext.lookup(JavaURLContext.java:
 138)
 at javax.naming.InitialContext.lookup(Unknown Source)
 at
 com.vcbp.struts.action.InsertuserAction.execute(InsertuserAction.java:81)
 at

 org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
 sor.java:484)
 at

 org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
 at
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
 at javax.servlet.http.Http

 Could anyone give me home hints?

 Thanks
 Seetha


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



 --
 This is your life and it's ending one minute at a time.

 
 
 --
 This is your life and it's ending one minute at a time.
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-
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: java:comp/UserTransaction NameNotFoundException Tomcat 5.0.28

2006-07-24 Thread Seetha Rao
I don't have that enabled. Isn't it by default set to true?
Here is my context element.

Context path=/virtualcbp docBase=virtualcbp debug=5 reloadable=true
crossContext=true

-Original Message-
From: Pid [mailto:[EMAIL PROTECTED]
Sent: Monday, July 24, 2006 5:07 PM
To: Tomcat Users List
Subject: Re: java:comp/UserTransaction NameNotFoundException Tomcat
5.0.28


Have you got useNaming=true enabled in your context.xml, or server.xml
Context element?



Seetha Rao wrote:
 Thanks, but got the same exception.

 -Original Message-
 From: Vivek Mohan [mailto:[EMAIL PROTECTED]
 Sent: Monday, July 24, 2006 4:16 PM
 To: Tomcat Users List; [EMAIL PROTECTED]
 Subject: Re: java:comp/UserTransaction NameNotFoundException Tomcat
 5.0.28


 sorry, I meant, java:comp/env/UserTransaction

 --
 Vivek.

 On 7/24/06, Vivek Mohan [EMAIL PROTECTED] wrote:
 try using java:comp/env.UserTransaction for JNDI lookup.

 --
 Vivek.

 On 7/24/06, Seetha Rao [EMAIL PROTECTED] wrote:
 Hi I'm using JOTM for transaction management with Tomcat 5.0.28. I have
 all
 the required jar files as given in
 http://jotm.objectweb.org/current/jotm/doc/howto-tomcat-jotm.html The
 JNDI
 look up throws the following exception:

 Here is the code:

 Context ctx = new InitialContext();
 UserTransaction userTx =
 (UserTransaction)ctx.lookup(java:comp/UserTransaction);

 The Entry in the mywebapp.xml file:

 Resource name=UserTransaction auth=Container
 type=javax.transaction.UserTransaction /
 ResourceParams name=UserTransaction
 parameter
   namefactory/name
   valueorg.objectweb.jotm.UserTransactionFactory/value
   /parameter
 parameter
   namejotm.timeout/name
   value60/value
 /parameter
 /ResourceParams

 Exception:
 javax.naming.NameNotFoundException
 at


org.objectweb.carol.jndi.enc.java.CompNamingContext.lookupCtx(CompNamingCont
 ext.java:689)
 at


org.objectweb.carol.jndi.enc.java.CompNamingContext.lookup(CompNamingContext
 .java:179)
 at


org.objectweb.carol.jndi.enc.java.JavaURLContext.lookup(JavaURLContext.java:
 138)
 at javax.naming.InitialContext.lookup(Unknown Source)
 at
 com.vcbp.struts.action.InsertuserAction.execute(InsertuserAction.java:81)
 at


org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
 sor.java:484)
 at


org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
 at
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
 at javax.servlet.http.Http

 Could anyone give me home hints?

 Thanks
 Seetha


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



 --
 This is your life and it's ending one minute at a time.



 --
 This is your life and it's ending one minute at a time.

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


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




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


-
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: UserTransaction, JOTM and Tomcat 5.5.x

2006-04-12 Thread Derek Hulley

The java.lang.NoSuchMethodError goes away if you recompile the carol
library using JDK 1.5.  The JOTM uses the carol stubs, I presume.  Anyway, I
got the hint from this location:
http://jira.ofbiz.org/browse/OFBIZ-737 

I compiled JOTM for good measure as well.  All seemed to work fine after
that.

Regards
--
View this message in context: 
http://www.nabble.com/UserTransaction%2C-JOTM-and-Tomcat-5.5.x-t1073172.html#a3891129
Sent from the Tomcat - User forum at Nabble.com.


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



Re: UserTransaction, JOTM and Tomcat 5.5.x

2006-02-11 Thread Matt Raible
Just to follow up on this, the settings below work - but HSQLDB
doesn't seem to support nested transactions.

 beginning the transaction 
DBTest  javax.transaction.NotSupportedException: Nested transactions not suppo
rted
at org.objectweb.jotm.Current.begin(Current.java:233)
at foo.DBTest.init(DBTest.java:30)
at org.apache.jsp.test_jsp._jspService(org.apache.jsp.test_jsp:54)

The DBTest class is from the JOTM + Tomcat example at
http://jotm.objectweb.org/current/jotm/doc/howto-tomcat-jotm.html.

Changing to use MySQL solves the problem and everything works great.

Also, it looks like JOTM (or maybe Carol) has issues with JDK 5.  I
googled for the following error and it appears to be known about on
the ObjectWeb mailing lists - but there doesn't seem to be a
documented solution.

java.lang.NoSuchMethodError:
sun.rmi.transport.ObjectTable.getStub(Ljava/rmi/Remote;)Ljava/rmi/server/RemoteStub;

org.objectweb.carol.rmi.jrmp.server.JUnicastRemoteObject.unexportObject(JUnicastRemoteObject.java:138)

org.objectweb.carol.rmi.multi.JrmpPRODelegate.unexportObject(JrmpPRODelegate.java:107)

org.objectweb.carol.rmi.multi.MultiPRODelegate.unexportObject(MultiPRODelegate.java:107)

javax.rmi.PortableRemoteObject.unexportObject(PortableRemoteObject.java:119)

org.objectweb.jotm.SubCoordinator.doAfterCompletion(SubCoordinator.java:1584)
org.objectweb.jotm.SubCoordinator.doRollback(SubCoordinator.java:1370)
org.objectweb.jotm.SubCoordinator.rollback(SubCoordinator.java:330)
org.objectweb.jotm.TransactionImpl.rollback(TransactionImpl.java:668)
org.objectweb.jotm.Current.rollback(Current.java:538)
foo.DBTest.init(DBTest.java:50)
org.apache.jsp.test_jsp._jspService(org.apache.jsp.test_jsp:54)

Thanks,

Matt

On 2/8/06, Remy Maucherat [EMAIL PROTECTED] wrote:
 Since you're doing docs, META-INF/context.xml should be simplified to:
 Context

 Resource name=jdbc/myDB auth=Container type=javax.sql.DataSource
 factory=org.objectweb.jndi.DataSourceFactory
 driverClassName=org.hsqldb.jdbcDriver
 username=sa password=
 url=jdbc:hsqldb:./

 Transaction factory=org.objectweb.jotm.UserTransactionFactory
 jotm.timeout=60/

 /Context

 No servlet class reloading anymore (not useful to many people), and
 the Transaction element has all the necessary defaults since it's a
 special resource.

 --
 x
 Rémy Maucherat
 Developer  Consultant
 JBoss Group (Europe) SàRL
 x

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



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



Re: UserTransaction, JOTM and Tomcat 5.5.x

2006-02-11 Thread Remy Maucherat
On 2/11/06, Matt Raible [EMAIL PROTECTED] wrote:
 Just to follow up on this, the settings below work - but HSQLDB
 doesn't seem to support nested transactions.

  beginning the transaction 
 DBTest  javax.transaction.NotSupportedException: Nested transactions not 
 suppo
 rted
 at org.objectweb.jotm.Current.begin(Current.java:233)
 at foo.DBTest.init(DBTest.java:30)
 at org.apache.jsp.test_jsp._jspService(org.apache.jsp.test_jsp:54)

 The DBTest class is from the JOTM + Tomcat example at
 http://jotm.objectweb.org/current/jotm/doc/howto-tomcat-jotm.html.

 Changing to use MySQL solves the problem and everything works great.

Yes, I noticed hsql had that lack of transaction support, but I
assumed things would work with a regular DB.

I added some documentation for the Transaction element.

--
x
Rémy Maucherat
Developer  Consultant
JBoss Group (Europe) SàRL
x

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



Re: UserTransaction, JOTM and Tomcat 5.5.x

2006-02-08 Thread Remy Maucherat
Since you're doing docs, META-INF/context.xml should be simplified to:
Context

Resource name=jdbc/myDB auth=Container type=javax.sql.DataSource
factory=org.objectweb.jndi.DataSourceFactory
driverClassName=org.hsqldb.jdbcDriver
username=sa password=
url=jdbc:hsqldb:./

Transaction factory=org.objectweb.jotm.UserTransactionFactory
jotm.timeout=60/

/Context

No servlet class reloading anymore (not useful to many people), and
the Transaction element has all the necessary defaults since it's a
special resource.

--
x
Rémy Maucherat
Developer  Consultant
JBoss Group (Europe) SàRL
x

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



Re: UserTransaction, JOTM and Tomcat 5.5.x

2006-02-07 Thread Remy Maucherat
On 2/7/06, Remy Maucherat [EMAIL PROTECTED] wrote:
 For 1), it's simple: Resources are bound in comp/env, while the
 UserTransaction should go in comp. ResourceLink has a special case
 for UserTransaction, so it works. There's a special Transaction
 element which would avoid having to do that, but it's not implemented.
 It wouldn't be hard to add support for it in
 org.apache.catalina.core.NamingContextListener.

Actually, I checked again and the Transaction element seems to be
properly implemented, and it should be used since it will bind the UT
to the right place (unlike the Resource element).

It works very well for me right now.

META-INF/context.xml:
Context reloadable=true crossContext=true

Resource name=jdbc/myDB auth=Container type=javax.sql.DataSource
factory=org.objectweb.jndi.DataSourceFactory
driverClassName=org.hsqldb.jdbcDriver
username=sa password= url=jdbc:hsqldb:./

Transaction name=UserTransaction auth=Container
type=javax.transaction.UserTransaction
factory=org.objectweb.jotm.UserTransactionFactory
jotm.timeout=60/

/Context

WEB-INF/lib contains all the jotm JARs (and the hsql JAR).
WEB-INF/classes contains the carol.properties config (the lmi protocol
didn't work for me, so I switched to jrmp). So it can be packaged as a
ready to run WAR. I still don't understand how that %ç!ç carol
hijacks the java: ENC in its default configuration, however.

--
x
Rémy Maucherat
Developer  Consultant
JBoss Group (Europe) SàRL
x

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



Re: UserTransaction, JOTM and Tomcat 5.5.x

2006-02-07 Thread Matt Raible
Thanks Remy - this is good stuff, I didn't know about the
Transaction element.  Is that new in 5.5.x?  Is it documented
anywhere?

As far as the JARs location - this shouldn't matter should it?  I can
put it in $CATALINA_HOME/common/lib *or* in WEB-INF/lib - right?

I've tried changing my context, and moving all JARs/properties local
to my WAR, but it still doesn't work.  Can you post your WAR for
download?  dropload.com works for me if you can't post it somewhere.

I'll make sure and submit a patch to JOTM's documentation once I get
this figured out.

Thanks,

Matt

On 2/7/06, Remy Maucherat [EMAIL PROTECTED] wrote:
 On 2/7/06, Remy Maucherat [EMAIL PROTECTED] wrote:
  For 1), it's simple: Resources are bound in comp/env, while the
  UserTransaction should go in comp. ResourceLink has a special case
  for UserTransaction, so it works. There's a special Transaction
  element which would avoid having to do that, but it's not implemented.
  It wouldn't be hard to add support for it in
  org.apache.catalina.core.NamingContextListener.

 Actually, I checked again and the Transaction element seems to be
 properly implemented, and it should be used since it will bind the UT
 to the right place (unlike the Resource element).

 It works very well for me right now.

 META-INF/context.xml:
 Context reloadable=true crossContext=true

 Resource name=jdbc/myDB auth=Container type=javax.sql.DataSource
 factory=org.objectweb.jndi.DataSourceFactory
 driverClassName=org.hsqldb.jdbcDriver
 username=sa password= url=jdbc:hsqldb:./

 Transaction name=UserTransaction auth=Container
 type=javax.transaction.UserTransaction
 factory=org.objectweb.jotm.UserTransactionFactory
 jotm.timeout=60/

 /Context

 WEB-INF/lib contains all the jotm JARs (and the hsql JAR).
 WEB-INF/classes contains the carol.properties config (the lmi protocol
 didn't work for me, so I switched to jrmp). So it can be packaged as a
 ready to run WAR. I still don't understand how that %ç!ç carol
 hijacks the java: ENC in its default configuration, however.

 --
 x
 Rémy Maucherat
 Developer  Consultant
 JBoss Group (Europe) SàRL
 x

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



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



Re: UserTransaction, JOTM and Tomcat 5.5.x

2006-02-07 Thread Remy Maucherat
On 2/7/06, Matt Raible [EMAIL PROTECTED] wrote:
 Thanks Remy - this is good stuff, I didn't know about the
 Transaction element.  Is that new in 5.5.x?  Is it documented
 anywhere?

No. It's not useful to anyone (well, almost) either.

 As far as the JARs location - this shouldn't matter should it?  I can
 put it in $CATALINA_HOME/common/lib *or* in WEB-INF/lib - right?

No, it does not matter.

 I've tried changing my context, and moving all JARs/properties local
 to my WAR, but it still doesn't work.  Can you post your WAR for
 download?  dropload.com works for me if you can't post it somewhere.

I am not doing anything special besides what I wrote. You have all the
configuration files.

--
x
Rémy Maucherat
Developer  Consultant
JBoss Group (Europe) SàRL
x

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



Re: UserTransaction, JOTM and Tomcat 5.5.x

2006-02-07 Thread Matt Raible
On 2/7/06, Remy Maucherat [EMAIL PROTECTED] wrote:
 On 2/7/06, Matt Raible [EMAIL PROTECTED] wrote:
  Thanks Remy - this is good stuff, I didn't know about the
  Transaction element.  Is that new in 5.5.x?  Is it documented
  anywhere?

 No. It's not useful to anyone (well, almost) either.

Just curious - what do you mean?  Are you saying that no one uses a
JTA TransactionManager with Tomcat? Is it something you don't
recommend?  My guess is it's better to use a server like JBoss,
Geronimo or JOnAS.  Unfortunately, I have clients that aren't
interested in moving off Tomcat.


  As far as the JARs location - this shouldn't matter should it?  I can
  put it in $CATALINA_HOME/common/lib *or* in WEB-INF/lib - right?

 No, it does not matter.

  I've tried changing my context, and moving all JARs/properties local
  to my WAR, but it still doesn't work.  Can you post your WAR for
  download?  dropload.com works for me if you can't post it somewhere.

 I am not doing anything special besides what I wrote. You have all the
 configuration files.

OK - then I must be missing something.  It's probably so small I can't
see it. ;-)

I'm using an exploded dbtest WAR in webapps with 5.5.15 and OS X +
JDK 5.  In META-INF/context.xml, I have:

Context reloadable=true

Resource name=jdbc/myDB auth=Container type=javax.sql.DataSource
factory=org.objectweb.jndi.DataSourceFactory
driverClassName=org.hsqldb.jdbcDriver
username=sa password= url=jdbc:hsqldb:./

Transaction name=UserTransaction auth=Container
type=javax.transaction.UserTransaction
factory=org.objectweb.jotm.UserTransactionFactory
jotm.timeout=60/

/Context

In WEB-INF/lib I have:

commons-cli-1.0.jar
commons-logging.jar
connector-1_5.jar
howl.jar
hsqldb.jar
jotm_iiop_stubs.jar
jotm_jrmp_stubs.jar
jotm.jar
jta-spec1_0_1.jar
jts1_0.jar
objectweb-datasource.jar
ow_carol.jar
xapool.jar

web.xml:

?xml version=1.0 encoding=UTF-8?
web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;

resource-env-ref
descriptionDB Connection/description
resource-env-ref-namejdbc/myDB/resource-env-ref-name
resource-env-ref-type
javax.sql.DataSource
/resource-env-ref-type
/resource-env-ref
/web-app

WEB-INF/classes/carol.properties:

# JNDI (Protocol Invocation)
carol.protocols=jrmp

# do not use CAROL JNDI wrapper
carol.start.jndi=false

# do not start a name server
carol.start.ns=false

I'm using the DBTest and test.jsp from the example I pointed to
earlier.  When I hit test.jsp, I get:

DBTest  javax.naming.NameNotFoundException
at 
org.objectweb.carol.jndi.enc.java.CompNamingContext.lookupCtx(CompNamingContext.java:689)
at 
org.objectweb.carol.jndi.enc.java.CompNamingContext.lookup(CompNamingContext.java:179)
at 
org.objectweb.carol.jndi.enc.java.JavaURLContext.lookup(JavaURLContext.java:138)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at foo.DBTest.init(DBTest.java:23)
at org.apache.jsp.test_jsp._jspService(org.apache.jsp.test_jsp:52)

Which is this line:

(DataSource)ctx.lookup(java:comp/env/jdbc/myDB);

I've uploaded my dbtest.war to
http://static.raibledesigns.com/downloads/dbtest.war.

Thanks for all your help so far.

Matt

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



UserTransaction, JOTM and Tomcat 5.5.x

2006-02-06 Thread Matt Raible
Howdy all,

I'm trying to get JOTM working on Tomcat 5.5.x.  I'm using 5.5.15 and
I've run into some strange issues.  More than anything, I'm looking
for explanations and (hopefully) some help.

I've updated the following tutorial for Tomcat 5.5.x:

http://jotm.objectweb.org/current/jotm/doc/howto-tomcat-jotm.html

My update: http://static.raibledesigns.com/downloads/howto-tomcat-jotm.html

I uploaded this update only temporarily - hopefully the patch I
submitted (http://tinyurl.com/9q4vl) will get committed to the JOTM
project. ;-)

Strange things:

1. it's no longer possible to put a Resource for UserTransaction in
context.xml.  Why is that?  It works fine in Tomcat 5.0.x.

For 5.5.x, it seems you have to put the UserTransaction resource in
the GlobalNamingResources part of server.xml.

Resource name=UserTransaction auth=Container
type=javax.transaction.UserTransaction
factory=org.objectweb.jotm.UserTransactionFactory
jotm.timeout=60/

Then you have to link to it from your context.xml:

ResourceLink name=UserTransaction global=UserTransaction
type=javax.transaction.UserTransaction/

2. For the demo (dbtest.war) listed in this howto to work, it seems
it's essential that factory=org.objectweb.jndi.DataSource be
specified on the jdbc/myDB Resource.  However, if you specify that
in context.xml for Tomcat 5.5.x, the DataSource doesn't get
registered.  Removing it gets the DS registered, but rollback doesn't
occur properly in the application.

Resource name=jdbc/myDB auth=Container type=javax.sql.DataSource
factory=org.objectweb.jndi.DataSourceFactory
driverClassName=com.mysql.jdbc.Driver
username=mojo password=jojo
url=jdbc:mysql://localhost/javatest/

To summarize:

Why can't a UserTransaction resource be in context.xml with Tomcat 5.5.x?
Why can't a factory attribute be specified on a datasource with Tomcat 5.5.x?

Both of these settings work fine on Tomcat 5.0.28.  I'm on OS X with JDK 5.

Of course, if anyone knows of a easier transaction manager to
integrate into Tomcat, I'm all ears. ;0)

Thanks,

Matt

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