Hi, I wrote a sample code to test the configuration of <commit-option> in standardjboss.xml. I searched the forum, so I think that if i set like <commit-option>C</commit-option> then my code should work. But It doesn't. and I got the exception. Could anyone help? Thanks in advance!
Remote Exception: RemoteException occurred in server thread; nested exception is: javax.transaction.TransactionRolledbackException: INSERTING AN ALREADY EXISTING BEAN, ID = milos.enactment.Agent Key@1; nested exception is: java.lang.IllegalStateException: INSERTING AN ALREADY EXISTING BEAN, ID = milos.enactment.AgentKey@1 My code is simple. I created 3 agentbeans, then I use jdbc to clean the table, after that I tried to create the same beans again: ctx = new javax.naming.InitialContext(); AgentHome aHome = (AgentHome) ctx.lookup("milos/enactment/Agent"); aHome.create("lg1", "ps", "fn1", "ln1"); aHome.create("lg2", "ps", "fn2", "ln2"); aHome.create("lg3", "ps", "fn3", "ln3"); if (connection == null) { System.setProperty("jdbc.drivers", DB_DRIVER); Class.forName(DB_DRIVER); connection = DriverManager.getConnection(DB_URL, DB_ACCOUNT, DB_PASSWORD); } Statement statement = connection.createStatement(); // clean Agent statement.execute("delete from agent"); if (connection != null) connection.close(); aHome.create("lg1", "ps", "fn1", "ln1"); aHome.create("lg2", "ps", "fn2", "ln2"); aHome.create("lg3", "ps", "fn3", "ln3"); -- Jia (Christine) Li 524N ICT Building Department of Computer Science University of Calgary _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user