/ Published in: Java
This is a simple lookup and usage of the default DS in JBoss
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
try { final DataSource dataSource = (DataSource)ictx.lookup("java:/DefaultDS"); final JdbcTemplate template = new JdbcTemplate(dataSource); // do your work here log.error(".."); }