-
1. Re: how can i connect my jboss pool connection with spring web framework
jeppy Oct 1, 2010 2:36 AM (in response to juank)in my webcontent\WEB-INF\classes
i create datasource.xml
with the below content
<jee:jndi-lookup id="dataSource" jndi-name="java:jdbc/ics" />
where the jndi name is same with the oracle-ds.xml plus "java:" prefix
so if the your jndi name inside oracle-ds.xml like the following
<jndi-name>jdbc/jeppy</jndi-name>
then jndi name for your datasource.xml will become like
<jee:jndi-lookup id="dataSource" jndi-name="java:jdbc/jeppy" />
hope that's help
Regards,
Jeppy Suparto
-
2. Re: how can i connect my jboss pool connection with spring web framework
juank Oct 6, 2010 2:18 PM (in response to jeppy)i make this spring.xml
<?
xml version="1.0" encoding="UTF-8"?>
<
beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd"
>
<!-- Instructs the container to look for beans with @Transactional and decorate them -->
<tx:annotation-driven transaction-manager="transactionManager"/>
<!-- Drives transactions in a local Hibernate environment -->
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
beans>
<
jee:jndi-lookup id="dataSource" jndi-name="java:jdbc/OracleDS"/>
i get the next error:
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException
: Line 22 in XML document from ServletContext resource [/WEB-INF/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'jee:jndi-lookup'.
-
3. Re: how can i connect my jboss pool connection with spring web framework
vcorrea Jan 6, 2011 11:37 AM (in response to juank)You have to create a DATASOURCE file with the same JNDI name of on the directory that you had deployed your application ( /jboss_home/server/YOUR_PROFILE/deploy ). You can find some examples on the /JBOSS_HOME/docs/examples/jca. Dont forget to change the JNDI name of the datasource.
Good Luck
Vítor Corrêa