geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: Tomcat MySQL XA support
Date Fri, 10 Feb 2006 16:28:44 GMT
I'm very confused about what you are trying to do and why.  Can you  
back up and explain your overall strategy here?

I may not understand what you are trying to do but the following  
comments might be relevant:

- the tomcat configuration files are mostly ignored in the tomcat  
geronimo integration.  There are generally geronimo equivalents.

- the geronimo jndi implementation accessible to web apps is read- 
only. Only the stuff you specify in web.xml is available, and binding  
anything else into it won't work.

- Utilizing an XADataSource directly is not appropriate in a j2ee  
application.  All the xa stuff is intended to be done for you by the  
app server.  If you want xa for your application, you need to deploy  
an instance of a suitable xa connector.  I believe there is a mysql  
xa adapter at the tranql project at tranql/vendors/mysql.  If this is  
in line with what you are trying to do I can try to figure out if it  
has been published or more precise download instructions.

thanks
david jencks

On Feb 9, 2006, at 5:36 AM, Jack Wang wrote:

>
> Does MySQL5.0.18 suport XA in Tomcat 5.5 ? I do a XA test in tomcat  
> with only a jsp file and
> necessary jars. The jsp is as:
>
> ---------------------------------------------
> <%
> Context ctx = new InitialContext();
> com.mysql.jdbc.jdbc2.optional.MysqlXADataSource xads = new
> com.mysql.jdbc.jdbc2.optional.MysqlXADataSource();
> xads.setServerName("localhost");
> xads.setDatabaseName("test");
> xads.setPortNumber(3306);
> XAConnection xcon = xads.getXAConnection("root","password");
> Connection con = xcon.getConnection();
>
> System.out.println("I get the correct xads and the con=" + con);
> System.out.println("Bind xads to InitialContext");
>
> ctx.bind("myXADB", xads);
> MysqlXADataSource mysqlXADataSource = (MysqlXADataSource)ctx.lookup 
> ("myXADB");
>
> System.out.println("Get the null MysqlXADataSource from ctx xads="  
> + mysqlXADataSource );
> %>
> ---------------------------------------------
>
>  Why mysqlXADataSource get from the InitialContext is null ?
>
>  Is this why I can not configure the XADataSource in tomcat in the  
> previous mail ?
>
>  I have waste much time in this problem, please help.
>
>  Thanks.
>
>
>
>
>
>
> Wang Jun
>
>
> 	
>
> 	
> 		
> ___________________________________________________________
> 雅虎1G免费邮箱百分百防垃圾信
> http://cn.mail.yahoo.com/


Mime
View raw message