Then, is there a way to prevent one website use the datasource of another website in Tomcat? Looks like user A can access the database of user B in this case, if data sources are defined globally in Tomcat. Does Derby have any facility to isolate the database of one user from another?
 
Another question: If I use DriverManager and NOT the datasources defined in Tomcat, then what do I need to use as the database name? For example, locally I can use: C:\mydb
But in Tomcat, I don't know absolute path, I need to use relative path. Is there an example that shows a feasable naming and db location usage? This location needs to be private to the website that is using this database. Other websites should not have access to it.
 
Would be nice if we can come up with good guidelines that will highlight best practices for popular app servers so that Derby can be promoted to be used in shared app servers where mysql is the database of choice today. In mysql, all websites connect to the same database server, but their database userid makes sure they can only see what they own.
 
Regards,
Arda
 


todd runstein <todd_run@yahoo.com> wrote:
Arda,

You've got to figure out why the server is not
recognizing the jar files in WEB-INF/lib. I can tell
you that if you're trying to set up your connection as
a JNDI resource and your web server is Tomcat, you're
never going to get it to work. Tomcat required you to
use the common directory for JNDI based connections.

Can you get it to work using a standard JDBC
connection using the DriverManager approach? If not,
you need to get this figured out before you move
forward. If you can, you're home free.

Good Luck

Todd

--- Arda M wrote:

> On a shared webserver, Tomcat users do not have
> access to server.xml or common/lib. What do we do to
> use derby in our own website only? Without effecting
> others? I can only edit web.xml and put jars in
> WEB-INF/lib.
> Regards,
> Arda
>
>
>
> Karl Ostendorf wrote:Have a
> look at the following link.
>
>
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html
>
> The resource parameters are a little different.
>
>
> On Fri, 10 Dec 2004 08:46:44 -0800, Gregory Parent
> wrote:
> > Great--thanks! I'm using Tomcat 5.0--what's the
> difference?
> >
> > >From: Karl Ostendorf
> > >Reply-To: Karl Ostendorf
> > >To: Derby Discussion
> > >Subject: Re: DataSource Tomcat
> > >Date: Fri, 10 Dec 2004 17:44:04 +0100
> >
> >
> > >
> > >Yes. Just add the following as a top-level
> element in your
> > >server.xml. Be aware that this is the syntax for
> the Tomcat 5.5.x
> > >series, the syntax for 5.0.x is a little
> different. Also be sure to
> > >add the derby.jar to common/lib.
> > >
> > >
> > >
> > > > > auth="Container"
> > > type="javax.sql.DataSource"
> > >
>
driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
> > > url="jdbc:derby:"
> > > maxActive="0"
> > > minIdle="1"
> > > maxIdle="5"
> > > maxWait="5000"
> > > />
> > >
> > >
> > >
> > >
> > >
> > >On Thu, 09 Dec 2004 15:33:16 -0800, Gregory
> Parent
> > >wrote:
> > > > Can derby be configured to use DataSource with
> Tomcat ?
> > > >
> > > > Regards
> > > >
> > > > GP
> > > >
> > > >
> >
> >
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail - Find what you need with new enhanced
> search. Learn more.


=====
The only "dumb question" is the one you were too afraid to ask.
________________________________________
Check out RouteRuler - Free software for runners, cyclists, walkers, etc.
http://routeruler.sourceforge.net
________________________________________
Get a handle on your data with "pocOLAP", the "little" OLAP project
http://pocolap.sourceforge.net
________________________________________



__________________________________
Do you Yahoo!?
Send a seasonal email greeting and help others. Do good.
http://celebrity.mail.yahoo.com


Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search. Learn more.