[JBoss Messaging] - Re: Lookup for JmsXA returning null
by timfox
UserTransaction is only available in the java: namespace too (see J2EE spec)
In order to run recoverable transactions with different resources (DB and JMS) in a global tx *outside* the application server, you would need to:
a) Have a transaction manager
b) Have a recovery manager
running at the client.
The transaction manager would also need to have a trusted, reliable file system where it can log at the client side.
So, in other words you would have to recreate half the app sever at the client side to do this - this is almost certainly not something you would want to do.
If you want to enlist more than one resource in a global tx - do it on the app server (write an MBean or EJB or Servlet) where the infrastructure already exists to support this.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056346#4056346
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056346
18Â years, 10Â months
[JBoss jBPM] - Re: async pain
by kukeltje
Alex,
Building these kinds of 'does-this-file-exist' checks is not something we promote in doing with jBPM timers. The better solution is to have an ESB like solution, which often has really good file polling. This can then signal the tokens.
You are correct in the assumption that JMS would not help in this case. I mixed two things up. The thing is that the subject does not cover the issue anymore. The issue is purely related to concurrent access to a token (in this case when 2 tokens go in the join)
Sorry I did not try to run the testcase (yet) Do you get an exeption?
btw, why is there an async=true on the fork? What behaviour do you expect?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056345#4056345
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056345
18Â years, 10Â months
[EJB/JBoss] - we're going to insert CLOB data in oracle db, using jboss4.0
by ljg76
hi?
Nice meet you
when we insert CLOB data in oracle db, using jboss4.0.4,
we have a problem.
if you want to disclose a error cause, you must compare two source.
first java source has a matter, second jsp source hasn't any error.
i want to known a case of first source error.
The following first source has a NoClassDefFoundError of jboss/resource/adapter/jdbc/WrappedConnection
--------------------------------------------------------------------------------------
/*
* Classname : DataChange.java
* Version information : v 1.0
*/
import java.sql.Clob;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;
import java.util.Iterator;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.Reader;
import java.io.Writer;
import java.io.StringWriter;
import java.io.StringReader;
import oracle.sql.CLOB;
import org.jboss.resource.adapter.jdbc.WrappedConnection;
public class EpiaClobUtil
{
public static Clob createClob(Connection con, String string) throws SQLException
{
CLOB clob = null;
boolean bOk = false;
WrappedConnection wc = null;
System.out.println("wc : " + wc);
try
{
wc= (WrappedConnection) con;
Connection oracleConnection=wc.getUnderlyingConnection();
clob = CLOB.createTemporary(oracleConnection, true, CLOB.DURATION_SESSION);
clob.open(CLOB.MODE_READWRITE);
BufferedWriter bw = new BufferedWriter(clob.getCharacterOutputStream());
try
{
bw.write(string, 0, string.length());
bw.close();
}
catch (IOException e)
{
System.out.println("createClob5" + e);
System.out.println("createClob51" + e.getMessage() );
}
bOk = true;
}catch(Exception e1){
e1.printStackTrace();
System.out.println("createClob11" + e1);
}
finally
{
if (!bOk && clob != null)
{
try
{
CLOB.freeTemporary(clob);
}
catch (SQLException e)
{
e.printStackTrace();
System.out.println("createClob8" + e);
}
clob = null;
}
}
return clob;
}
}
------------------------------------------------------------------------------------
The Following Second Source has not any problem
------------------------------------------------------------------------------------
<%@ page contentType="text/html; charset=euc-kr" session="true"%>
<%@ page import = " java.util.*,
java.text.*,
java.io.*,
java.sql.*,
javax.sql.*,
com.ehigh.univdbfwl.*,
javax.naming.*,
org.jboss.resource.adapter.jdbc.WrappedConnection"
%>
<%
InitialContext ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup("java:/DefaultDS");
Connection con = ds.getConnection();
System.out.println("First Connection --> "+con.toString()+"");
out.println("First Connection --> "+con.toString()+"");
if(con instanceof WrappedConnection){
System.out.println("Yes instanceof");
out.println("Yes instanceof");
WrappedConnection wc=(WrappedConnection)con;
Connection oracleConnection=wc.getUnderlyingConnection();
}else{
System.out.println("No instanceof");
out.println("No instanceof");
}
WrappedConnection unlycon = (WrappedConnection)con;
System.out.println(unlycon.getUnderlyingConnection()+"");
out.println(unlycon.getUnderlyingConnection()+"");
Connection con1 = ds.getConnection();
WrappedConnection unlycon1 = (WrappedConnection)con1;
System.out.println("unlycon1 Connection : "+unlycon1.getUnderlyingConnection()+"");
out.println("unlycon1 Connection : "+unlycon1.getUnderlyingConnection()+"");
System.out.println("Second Connection : "+con1);
out.println("Second Connection : "+con1);
con.close();
con1.close();
%>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056337#4056337
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056337
18Â years, 10Â months