-
1. Re: JBOSS7 datasource
wdfink Sep 7, 2012 8:49 AM (in response to erasmomarciano)I'm not sure I catch your question.
You will find many basic examples how to access datasources with JNDI lookup or @Ressource injection, it depends on the EE version you use.
So you can write a simple example with a JDBC statement or a JPA entity to access the DS, nevertheless whether it is a MySql or somthing different.
The configuration is shown here https://community.jboss.org/wiki/DataSourceConfigurationinAS7#Installing_a_JDBC_driver_as_a_module
-
2. Re: JBOSS7 datasource
rmody Sep 9, 2012 7:07 AM (in response to erasmomarciano)Hi erasmo2 marciano2,
You can try out a simple web app jdbcclient.war created by us, which might help you in checking if you are able to get a jdbc connection or not. You just have to change the datasoucre JNDI name in the "index.jsp" file
Change the below line:
ds = (DataSource)ic.lookup("java:jboss/datasources/ExampleDS");
Regards,
Ravish Mody
-
3. Re: JBOSS7 datasource
nickarls Sep 9, 2012 7:12 AM (in response to erasmomarciano)The web console (linked from the context root of a running AS) should also give you the ability to test a configured datasource...