This content has been marked as final.
Show 2 replies
-
1. Re: Datasource configuration from Tomcat
nickarls Sep 17, 2012 5:47 AM (in response to jpardons)How are you using the datasource? I don't think you should need any more configuration besides the datasource in standalone.xml (and you might want to use a pool-name without slashes: e.g. EPCISDBPool).Try java:jboss/datasources/EPCISDB for the name
-
2. Re: Datasource configuration from Tomcat
jpardons Sep 17, 2012 6:07 AM (in response to nickarls)I tried with this name, but I got the same error.
I made a full search on my code, here is the results:
String jndiName = getProperties().getProperty("jndi.datasource.name", "java:comp/env/jdbc/EPCISDB"); jndi.datasource.name=java:comp/env/jdbc/EPCISDB <hibernate-configuration> <session-factory> <property name="hibernate.connection.datasource">java:comp/env/jdbc/EPCISDB</property> <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean" scope="singleton"> <property name="jndiName" value="jdbc/EPCISDB" /> <property name="resourceRef" value="true" /> </bean> <Resource name="jdbc/EPCISDB" type="javax.sql.DataSource" auth="Container" username="${db.username}" password="${db.password}" driverClassName="com.mysql.jdbc.Driver" defaultAutoCommit="false" url="jdbc:mysql://localhost:3306/${db.database}?autoReconnect=true"> </Resource> <resource-ref> <res-ref-name>jdbc/EPCISDB</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref>