| View previous topic :: View next topic |
| Author |
Message |
Warren Wilson Guest
|
Posted: Tue Aug 23, 2005 3:06 pm Post subject: Help with JDBC Realm and JNDI Resource configuration for Tom |
|
|
Hi,
I am trying to build a Web application in JBuilder 8 and run it using Web
run. I am having trouble configuring the JDBC Realm and
JNDI Resource/ResourceParams elements.
The Web app works in Tomcat 4.1.27 as a standalone server when I define
these entries in the <context-name>.xml file in the <tomcat-root>webapps
directory. But JBuilder
generates a jb-<context-name>.xml file for the Web application whenever
Tomcat starts up. Any modifications to this file will
be deleted. Can this be done in JBuilder? How do you configure the realm
and resources?
Example for test context (test.xml):
<Context path="/test" ...>
<Realm
className="org.apache.catalina.realm.JDBCRealm"
debug="99"
connectionName="tester"
connectionPassword="tester"
connectionURL="jdbc:mysql://testBox/phx1?user=tester"
driverName="org.gjt.mm.mysql.Driver"
userTable="USERS"
userNameCol="USER_NAME"
userCredCol="USER_PASS"
userRoleTable="USER_ROLES"
roleNameCol="ROLE_NAME"/>
<Resource
name="bean/TestService"
auth="Container"
type="com.enterprise.services.TestService"/>
<ResourceParams name="bean/TestService">
<parameter>
<name>factory</name>
<value>org.apache.naming.factory.BeanFactory</value>
</parameter>
</ResourceParams>
</Context>
The Resource element would go with a resource-env-ref element in the web.xml
file:
<resource-env-ref>
<resource-env-ref-name>bean/TestService</resource-env-ref-name>
<resource-env-ref-type>com.enterprise.services.TestService</resource-env-ref-type>
</resource-env-ref>
Thanks.
|
|
| Back to top |
|
 |
Paul Furbacher [TeamB] Guest
|
Posted: Tue Aug 23, 2005 4:34 pm Post subject: Re: Help with JDBC Realm and JNDI Resource configuration for |
|
|
Warren Wilson wrote:
| Quote: | I am trying to build a Web application in JBuilder 8 and run it using Web
run. I am having trouble configuring the JDBC Realm and
JNDI Resource/ResourceParams elements.
The Web app works in Tomcat 4.1.27 as a standalone server when I define
these entries in the <context-name>.xml file in the <tomcat-root>webapps
directory. But JBuilder
generates a jb-<context-name>.xml file for the Web application whenever
Tomcat starts up. Any modifications to this file will
be deleted. Can this be done in JBuilder? How do you configure the realm
and resources?
|
This has been discussed many times in the newsgroup archives
(see sig below for starting link).
Search using keywords
edit "server8080.xml"
to find out how to prevent JBuilder from deleting modifications.
Also do searches on
Tomcat realms
Tomcat jdbc resource
Tomcat jndi resource
--
Paul Furbacher (TeamB)
Save time, search the archives:
http://info.borland.com/newsgroups/ngsearch.html
Is it in Joi Ellis's Faq-O-Matic?
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.
|
|
| Back to top |
|
 |
|