You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dasarath Weeratunge <da...@yahoo.com> on 2004/06/14 22:30:38 UTC

Integrating Tomcat, JOTM and Axis ... java:comp/env/UserTransaction ???

Hi

Nope, in the jsp example it works for
java:comp/UserTransaction, so I thought same would
work for axis as well. Further
java:comp/env/UserTransaction doesn't work. I check
it; but if you use _UserTransaction instead of 
UserTransaction it works for
java:comp/env/_UserTransaction.

Has anyone used any JDBC data sources with
Axis/Tomcat?

I'm using Tomcat 4.1.24

Thanks

Dasarath

--- "Shapira, Yoav" <Yo...@mpi.com> wrote:
> 
> Hi,
> Wouldn't it be java:comp/env/UserTransaction instead
> of
> java:comp/UserTransaction?
> 
> Yoav Shapira
> Millennium Research Informatics
> 
> 
> >-----Original Message-----
> >From: Dasarath Weeratunge
> [mailto:dasarathweeratunge@yahoo.com]
> >Sent: Monday, June 14, 2004 12:03 AM
> >To: tomcat-user@jakarta.apache.org;
> axis-user@ws.apache.org;
> >jotm@objectweb.org
> >Subject: Integrating Tomcat, JOTM and Axis
> >
> >Hi,
> >
> >I'm trying to use Tomcat (4.1.24), JOTM (1.4.3) and
> >Axis (1.1). I'm using the following axis.xml in
> >%tomcat_home%\webapps. However, when I try to
> lookup
> >"java:comp/UserTransaction" within a web service it
> >fails and the JDBC DataSource doesn't work either.
> I
> >followed the "How to use JDBC and transactions in
> >Tomcat with JOTM" and the same SQL server database
> >(given below) and JOTM **works well** for that
> >example(jsp). Is this not applicable to web
> services?
> >
> >Thanks
> >
> >Dasarath
> >
> >axis.xml  in %tomcat_home%\webapps
> >----------------------------------
> >
> ><Context path="/axis" docBase="axis" debug="0"
> >  reloadable="true" crossContext="true">
> >   <Resource name="jdbc/test" auth="Container"
> >    type="javax.sql.DataSource"/>
> >  <ResourceParams name="jdbc/test">
> >    <parameter>
> >      <name>factory</name>
> >
> ><value>org.objectweb.jndi.DataSourceFactory</value>
> >    </parameter>
> >
> >
>
><parameter><name>username</name><value>sa</value></parameter>
> >
>
><parameter><name>password</name><value>admin</value></parameter>
> >    <parameter><name>driverClassName</name>
> >
>
><value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value></parameter>
> >    <parameter><name>url</name>
> >
> >
>
><value>jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=test;Sele
> ctMe
> >thod=cursor</value></parameter>
> >
> >  </ResourceParams>
> >
> >  <Resource name="UserTransaction" auth="Container"
> >    type="javax.transaction.UserTransaction"/>
> >  <ResourceParams name="UserTransaction">
> >    <parameter>
> >      <name>factory</name>
> >
>
><value>org.objectweb.jotm.UserTransactionFactory</value>
> >    </parameter>
> >    <parameter>
> >      <name>jotm.timeout</name>
> >      <value>60</value>
> >    </parameter>
> >  </ResourceParams>
> ></Context>
> >
> >added to web.xml
> >%tomcat_home%\webapps\axis\WEB-INF\web.xml
> >--------------------------------------
> >
> ><resource-env-ref>
> >
>
><resource-env-ref-name>jdbc/test</resource-env-ref-name>
> >
>
><resource-env-ref-type>javax.sql.DataSource</resource-env-ref-type>
> ></resource-env-ref>
> >
> >
> >lookup code used in the web service
> >-------------------------------------------
> >new
>
>InitialContext().lookup("java:comp/UserTransaction");
> >
> >initCtx.lookup("java:comp/env/jdbc/test");
> >
> >
> >
> >
> >__________________________________
> >Do you Yahoo!?
> >Friends.  Fun.  Try the all-new Yahoo! Messenger.
> >http://messenger.yahoo.com/
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> 
> 
> 
> 
> This e-mail, including any attachments, is a
> confidential business communication, and may contain
> information that is confidential, proprietary and/or
> privileged.  This e-mail is intended only for the
> individual(s) to whom it is addressed, and may not
> be saved, copied, printed, disclosed or used by
> anyone else.  If you are not the(an) intended
> recipient, please immediately delete this e-mail
> from your computer system and notify the sender. 
> Thank you.
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> 
> 



	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org