[
https://issues.jboss.org/browse/JBTM-1479?page=com.atlassian.jira.plugin....
]
Gytis Trikleris edited comment on JBTM-1479 at 4/26/13 8:05 AM:
----------------------------------------------------------------
I've tried this simple test on windows and it also failed with
"java.io.IOException: Could not delete
PATH_TO_TEMP_DIRECTORY/ironjacamar-jdbc.jar"
{code}
public class SimpleTest {
private static final String JDBC_RAR_FILE_PATH =
"src/main/resources/jdbc-xa.rar";
private static Embedded EMBEDDED;
@Test
public void test() throws Throwable {
EMBEDDED = EmbeddedFactory.create();
EMBEDDED.startup();
EMBEDDED.deploy(getURL(JDBC_RAR_FILE_PATH));
System.out.println("Test...");
EMBEDDED.undeploy(getURL(JDBC_RAR_FILE_PATH));
EMBEDDED.shutdown();
}
private static URL getURL(final String path) throws MalformedURLException {
final File f = new File(path);
return f.toURI().toURL();
}
}
{code}
was (Author: gytis):
I've tried this simple test on windows and it also failed with
"java.io.IOException: Could not delete
{PATH_TO_TEMP_DIRECTORY}/ironjacamar-jdbc.jar"
{code}
public class SimpleTest {
private static final String JDBC_RAR_FILE_PATH =
"src/main/resources/jdbc-xa.rar";
private static Embedded EMBEDDED;
@Test
public void test() throws Throwable {
EMBEDDED = EmbeddedFactory.create();
EMBEDDED.startup();
EMBEDDED.deploy(getURL(JDBC_RAR_FILE_PATH));
System.out.println("Test...");
EMBEDDED.undeploy(getURL(JDBC_RAR_FILE_PATH));
EMBEDDED.shutdown();
}
private static URL getURL(final String path) throws MalformedURLException {
final File f = new File(path);
return f.toURI().toURL();
}
}
{code}
Create a quickstart to show how to use IronJacamar and JBTM inside
tomcat
-------------------------------------------------------------------------
Key: JBTM-1479
URL:
https://issues.jboss.org/browse/JBTM-1479
Project: JBoss Transaction Manager
Issue Type: Task
Security Level: Public(Everyone can see)
Components: Demonstrator
Reporter: Tom Jenkinson
Assignee: Gytis Trikleris
Fix For: 5.0.0.M3
Attachments: test-ds.xml, transaction.xml
Original Estimate: 3 days
Time Spent: 1 week, 1 day, 3 hours, 20 minutes
Remaining Estimate: 0 minutes
See JBTM-809 for the algorithm
You might want to put the startup in the context listener:
public class MyServletContextListener implements ServletContextListener {
public void contextInitialized(ServletContextEvent sce) {
// Initialize RecoveryManager
// Initialize TransactionManager
// Initialize IronJacamar
}
@Override
public void contextDestroyed(ServletContextEvent sce) {
// Clean IronJacamar
// Clean TransactionManager
// Clean RecoveryManager
}
}
Quickstart application should connect to the database (say PostgreSQL), dummy XA resource
and coordinate the transaction. The PostgreSQL data source needs to be accessed via
IronJacamar.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira