[jboss-user] [JCA/JBoss] - Re: How can I test if a Datasource is correctly installed
Easiest way is to write some code to use it. Installation issues will generally show up as errors in the log, but being that by default DS pools are not pre-filled, connectivity errors will generally not show up until the first time you attempt to use the datasource. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094893#4094893 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094893 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JCA/JBoss] - Re: How can I test if a Datasource is correctly installed
Such as? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094896#4094896 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094896 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JCA/JBoss] - Re: How can I test if a Datasource is correctly installed
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#4094899 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094899 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JCA/JBoss] - Re: How can I test if a Datasource is correctly installed
"ZazzaZ" wrote : Such as? You can use set prefill tag to true in the ds-xml file configuration . But the catch would be that the testing results will be in the logs and you will have to see the logs if the ds configuration is appropriate . Alternatively you can create a MBean which will create the connection , have a look at this link http://jira.jboss.com/jira/browse/JBAS-1466 View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094898#4094898 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094898 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JCA/JBoss] - Re: How can I test if a Datasource is correctly installed
Thanks to all! View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094908#4094908 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094908 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user