On Fri, 1 Dec 2000 [EMAIL PROTECTED] wrote:
> I find this a little confusing...can you provide an example JSP and
> web.xml that shows how I should do this?  Or would I be better off
> writing a data access bean (not ejb bean) to handle the connection via
> JNDI?

        Let me rephrase: As far as I know, nothing outside of the EJB
container can access a DB pool.  One of the goals of the jBoss+Tomcat
integration was to allow things in Tomcat to access DB pools, but I'm not
sure if that particular goal was achieved.  I hope someone who worked on
that integration will speak up and confirm one way or another.
        As far as how a servlet would do it (if in fact it was enabled in
the integration effort), see the servlet 2.2 spec pp. 67-68.  There is a
tag called "resource-ref" that you can put in web.xml just like you can
for EJBs in ejb-jar.xml.  Then you'd use syntax similar to what you use in
an EJB to access the resource - assuming Tomcat supports that tag (which I
am not sure of).
        If this was not enabled in the integration effort, you'd have to
use a data access EJB, or set up separate DB pools for the servlets (you
can still use Minerva to do so, but you'd have to write something for
Tomcat to initialize the pool when the servlet context is started).  I
suspect this will be the way to go in the short term, though ultimately it
should work as described above.

Aaron



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to