Such as?
Psuedo code in Servlet or EJB
|
| InitialContext ctx = null;
| DataSource ds = null;
| Connection c = null;
|
| try
| {
| ctx = new InitialContext();
| ds = ctx.lookup("JNDINAME OF DATASOURCE HERE");
| c = ds.getConnection();
|
| }catch(SQLException e)
| {
| System.out.println(e.getMessage());
|
| }
| finally
| {
| if(c != null)
| c.close();
|
| if(ctx != null)
| ctx.close();
| }
|
|
There are plenty of other examples out there as well. I recommend the J2EE tutorial as a
place to start if the above concepts are not familiar to you.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094899#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...