-
Aug 29th, 2011, 02:18 AM
#1
Springs with tomcat problem please help me
Can some body please help how to read tomcat conf/context.xml resources using persistence.xml Spring and i am using oracle toplink?
-
Aug 29th, 2011, 06:33 AM
#2
Can you provide more details about what is in the context that you are trying to read? What code have you written thus far, and what are the relevant contents of the configuration files?
Peter Mularien | Blog
Author, Spring Security 3 (Book) - Packt Publishing, Available in print and eBook form
SCJP 5, Oracle DBA
Any postings are my own opinion, and should not be attributed to my employer or clients.
-
Aug 30th, 2011, 12:34 AM
#3
Hi Thanks
In tomcat/conf/context.xml contains the resource,please see below from tomcat/conf/context.xml
<Resource name="jdbc/ISM_rep_user"
auth="Container"
type="javax.sql.DataSource"
removeAbandoned="true"
removeAbandonedTimeout="60"
logAbandoned="true"
maxActive="10"
maxIdle="5"
maxWait="15000"
username="ism_cust2"
password="iamse2_"
driverClassName="oracle.jdbc.OracleDriver" url="jdbcracle:thin:@xxx.gggg/>
I want to read above Tomcat datasource via JNDI in my Spring configuration i am using oracle toplink
in spring applicationContext.xml i am using like below
<bean id="UserDatabase" class="org.springframework.jndi.JndiObjectFactoryB ean">
<property name="jndiName" value="java:comp/env/jdbc/ISM_rep_user"></property>
<property name="lookupOn" value="true"></property>
<property name="cache" value="true"></property>
<property name="proxyInterface" value="javax.sql.DataSource"></property>
</bean>
and in web.xml i am using
<resource-ref>
<description>Connection Pool</description>
<res-ref-name>jdbc/ISM_rep_user</res-ref-name>
<res-type>javax.sql.Datasource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
I am still getting problem please give me some example
I am getting Problem
Last edited by aleddullas; Aug 30th, 2011 at 03:26 AM.
-
Aug 30th, 2011, 05:19 AM
#4
This isn't really a Spring Security question, and you still haven't indicated what the actual error you're getting is, so unfortunately I still can't really help you. I was able to Google and find a somewhat similar question and answer here. If you search around for "spring JNDI datasource tomcat" you should find some examples. I would suggest posting any follow-up in the Spring Data forum here... Good luck!
Peter Mularien | Blog
Author, Spring Security 3 (Book) - Packt Publishing, Available in print and eBook form
SCJP 5, Oracle DBA
Any postings are my own opinion, and should not be attributed to my employer or clients.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules