db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Crowell <JimCrow...@EMail.com>
Subject Re: Derby Network Server usage?
Date Wed, 13 Jan 2010 19:05:30 GMT


Thanks for all the help.

I just posted a message in the derby-user mailing list asking about the
feasibility of embedding a Web Server in my Java stand alone application.

The thread's subject is as follows:
"Embedded Web Server in Java stand alone application..."

Bryan Pendleton wrote:
> Hi Jim,
> These questions are probably better addressed to the derby-user mailing
> list
> since they have more to do with how to use Derby than with how it is
> implemented internally. So you probably want to pursue the discussion on
> that list, as you'll find more people who have experience building
> applications
> like the one you describe.
> Derby does not provide a JSP container, nor a Servlet container, so if
> you are interested in writing JSPs and Servlets you'll need to find one.
> Tomcat is certainly a fine choice; there are plenty of other JSP and
> Servlet
> containers out there, but the derby-dev list is probably the wrong place
> to look
> for more information about that.
> When you get to writing your JSPs and Servlets, you merely need to ensure
> that the derbyclient.jar library is available to them. In the case of most
> JSP or Servlet containers, there is a simple way to include such a jar
> library
> into your web application; for example in Tomcat I believe you just have
> to
> place derbyclient.jar into the correct 'lib' directory.
> Once you have made derbyclient.jar available to your JSP or Servlet, you
> can
> simply create a new java.sql.Connection object in your code, using the
> Derby
> network-format URL scheme:
>    jdbc:derby://host:port/databaseName;options
> The ClientDriver class in the derbyclient.jar will then implement all of
> your
> JDBC calls using network access to the Network Server instance located in
> your application.
> I think that JDK 1.5 is capable of doing everything you've described so
> far.
> I believe that JDK 1.6 adds further performance and functionality
> improvements,
> but Derby runs great with JDK 1.5 as well as with JDK 1.6 so you can
> choose
> whichever you prefer.
> I believe you are correct that you don't need Java EE in order to write
> simple JSP and Servlet code. You just need J2SE and a Servlet/JSP
> container
> such as Tomcat.
> I believe there is a great "using Derby with Tomcat" tutorial here:
> http://db.apache.org/derby/papers/fortune_tut.html
> There are some links in that tutorial to other Derby-with-Tomcat
> tutorials.
> Good luck, and let us know if you run into any problems with Derby; the
> community will be glad to help.
> thanks,
> bryan

View this message in context: http://old.nabble.com/Derby-Network-Server-usage--tp27117797p27148810.html
Sent from the Apache Derby Developers mailing list archive at Nabble.com.

View raw message