[ 
http://jira.jboss.com/jira/browse/JBAS-1270?page=comments#action_12316460 ]
     
Dirk Niemeier commented on JBAS-1270:
-------------------------------------

Dear Scott,
don't you solve the problem in the 3.x versions ?

Regards, 
  Dirk 






> UserTransaction with non default ProviderURL
> --------------------------------------------
>
>          Key: JBAS-1270
>          URL: http://jira.jboss.com/jira/browse/JBAS-1270
>      Project: JBoss Application Server
>         Type: Bug
>   Components: Transaction Manager service
>     Versions: JBossAS-3.2.6 Final
>  Environment: WinXP Client SP 2, java version 1.4.2_04-b05, jboss-3.2.6
>     Reporter: Dirk Niemeier
>     Assignee: Scott M Stark
>     Priority: Critical
>      Fix For: JBossAS-5.0 Alpha, JBossAS-4.0.2 Final,  JBossAS-3.2.8 Final

>
>
> Problem to initiate an UserTransaction from client with non default 
> providerURL.
> java.util.Hashtable env = new java.util.Hashtable();
> env.put( Context.PROVIDER_URL, "myserver:1199");
> InitialContext ctx = new InitialContext(env);
> javax.transaction.UserTransaction tx = (UserTransaction) 
> ctx.lookup("UserTransaction");       
> The lookup cause an stacktrace like this :
> 08:36:54,531 DEBUG [AWT-EventQueue-0] (NamingContext.java:1192) - Failed to 
> connect to 172.30.1.22:1099
> javax.naming.CommunicationException: Failed to connect to server 
> 172.30.1.22:1099 [Root exception is javax.naming.ServiceUnavailableException: 
> Failed to connect to server 172.30.1.22:1099 [Root exception is 
> java.net.ConnectException: Connection timed out: connect]]
>       at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:213)
>       at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1187)
>       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:516)
> The provider "172.30.1.22:1099" is the default provider in my jndi properties 
> file which is not online at this time.
> I think the problem is in 
> org.jboss.tm.usertx.client.ClientUserTransactionObjectFactory, which will be 
> called in lookup handling.
> The getUserTransaction() tries to create an new InitialContext with default 
> parameters. It should use the context available by getObjectInstance(..).
> An additional problem to this is in class 
> org.jboss.tm.usertx.client.ClientUserTransaction :
>   private synchronized void createSession()
>    {
>       // Destroy any old session.
>       if (session != null)
>          destroySession();
>       try {
>          // Get a reference to the UT session factory.
>          UserTransactionSessionFactory factory;
>          factory = (UserTransactionSessionFactory)new 
> InitialContext().lookup("UserTransactionSessionFactory");
>          // Call factory to get a UT session.
>          session = factory.newInstance();
>       } catch (Exception ex) {
>          throw new RuntimeException("UT factory lookup failed: " + ex);
>       }
>    }
> This occurs when begin() is invoked. Same problem with new InitialContext().
> In class ServerVMClientUserTransaction the same problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to