[ http://jira.jboss.com/jira/browse/JBAS-1270?page=history ]
Dirk Niemeier updated JBAS-1270:
--------------------------------
Description:
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().
was:
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(..).
> UserTransaction with non default ProviderURL
> --------------------------------------------
>
> Key: JBAS-1270
> URL: http://jira.jboss.com/jira/browse/JBAS-1270
> Project: JBoss Application Server
> Type: Bug
> Components: CMP 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
>
>
> 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().
--
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
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
JBoss-Development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-development