BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help with JDBC Realm and JNDI Resource configuration for Tom

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Enterprise
View previous topic :: View next topic  
Author Message
Warren Wilson
Guest





PostPosted: Tue Aug 23, 2005 3:06 pm    Post subject: Help with JDBC Realm and JNDI Resource configuration for Tom Reply with quote



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





PostPosted: Tue Aug 23, 2005 4:34 pm    Post subject: Re: Help with JDBC Realm and JNDI Resource configuration for Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Enterprise All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.