Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Clustering Warning Messages

 
Borgward Coupe
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
What do I have to do to get rid of those warnings (see below). I thought I have to create a InitialContext by using the HA-JNDI port (in my case it is the default port: 1100 ) but I still get the warning message.
Is there anything else I need to know
Cheers
Rolf

Waring Message
07:21:39,070 WARN [TxConnectionManager] Prepare called on a local tx. Use of local transactions on a jta transaction wi
th more than one branch may result in inconsistent data in some cases of failure.

My way of getting the initial context (HA-JNDI)
private Context getInitialContext() throws NamingException {
Hashtable environment = new Hashtable();
environment.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
environment.put(Context.URL_PKG_PREFIXES, "org.jboss.naming rg.jnp.interfaces");
environment.put(Context.PROVIDER_URL, TARGETHOST + ":1100");
return new InitialContext(environment);
}
 
Konstantin Avdeyev
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you need to use XA datasource instead of local datasource. With more than one branch inside transaction transaction manager wants to do two-phase commit which is only possible with XA datasource.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic