????
You MUST be able to access a DataSource from a servlet in a WAR file
deployed to JBoss in an EAR!!!

does the combination of WEB.XML :-
<web-app>
...
        <resource-ref>
                <res-ref-name>jdbc/ADataSource</res-ref-name>
                <res-type>javax.sql.DataSource</res-type>
                <res-auth>Servlet</res-auth>
        </resource-ref>
</web-app>

and

jboss-web.xml :-

<jboss-web>
...
        <resource-ref>
                <res-ref-name>jdbc/ADataSource</res-ref-name>
                <res-type>javax.sql.DataSource</res-type>
                <jndi-name>java:/APool</jndi-name>
        </resource-ref>
</jboss-web>

not work as expected????

Lewis

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Grim
Shieldsson
Sent: 08 June 2001 10:18
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Lookup Datasource from Javabeans. Possible?


That would be the point of using Jboss, is to use the EJB stuff.  If
you want to run servlets that directly hit the db, then use tomcat.

--- Edward Wang <[EMAIL PROTECTED]> wrote:
> If the JBoss/Tomcat pack even doesn't allow my servlet to access
> Datasource, then why would I use JBoss but not JRun or something
> else?
> For that, I have to write an EJB for every little piece of SQL I want
> to execute in my DB in my servlet. Is that too inconvient?
>
> ----- Original Message -----
> From: "Guy Rouillier" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 08, 2001 2:16 PM
> Subject: Re: [JBoss-user] Lookup Datasource from Javabeans. Possible?
>
>
> See numerous messages in the archives on this subject.  The
> connection pool
> is meant to be used by EJBs running within JBoss, not by external
> clients.
> Won't work - connections are set up within a JVM context, and your
> external
> client is in another JVM.
>
> I don't know if there is some hack to make this work with the
> integrated
> packages (JBoss+Tomcat or JBoss+Jetty), but even if you can you
> shouldn't.
>
> ----- Original Message -----
> From: "Edward Wang" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, June 07, 2001 9:44 PM
> Subject: Re: [JBoss-user] Lookup Datasource from Javabeans. Possible?
>
>
> > Seems impossible. When I was trying to connect to a Datasource that
> I saw
> was bound to java:/instantDB by JBoss at the startup in my servlet.
> > But the following error was reported:
> >
> > Connection error:javax.naming.NameNotFoundException: InstandDB not
> bound
> >
> > Does this mean that?
> >
> > Edward
> >
> > ----- Original Message -----
> > From: "Dexter Legaspi" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, June 07, 2001 9:57 PM
> > Subject: Re: [JBoss-user] Lookup Datasource from Javabeans.
> Possible?
> >
> >
> > >
> > > yes!
> > >
> > > --- Tim Yates <[EMAIL PROTECTED]> wrote:
> > > > Is it possible to lookup the Datasource from my
> > > > JavaBeans?
> > > >
> > > > I use direct SQL to improve performance in several
> > > > methods, and wondered if
> > > > I could use the connection pool from my BMP beans...
> > > >
> > > > Cheers.
> > > >
> > > > Tim.
> > > >
> > > >
> > > > _______________________________________________
> > > > JBoss-user mailing list
> > > > [EMAIL PROTECTED]
> > > >
> > > http://lists.sourceforge.net/lists/listinfo/jboss-user
> > >
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Get personalized email addresses from Yahoo! Mail - only $35
> > > a year!  http://personal.mail.yahoo.com/
> > >
> > > _______________________________________________
> > > JBoss-user mailing list
> > > [EMAIL PROTECTED]
> > > http://lists.sourceforge.net/lists/listinfo/jboss-user
> > >
> > $2.--$2.6:~z?2"y72-S~2
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
>
$,2k.f")`+-$,2k.X,6K(:7~
`zw-[iyb2[,"j\yz+i^7yb2[?+-
wh~6h2K,z


=====
Grim Shieldsson (James A Barrows)
Acting Chieftain of Clan StormWolf
Barbarian Freehold Alliance
Oppurtunity doesn't knock.  It only presents itself after you kick down the
door.
--Kyle Chandler

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year!  http://personal.mail.yahoo.com/

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to