You should be able to create use a JDBCDataSourceLoader to get a DataSource
suitable for doing some JDBC outside of an EJB. You can also look up an XA
Datasource from outside an EJB but when I did that I got an exception when I
tried to turn autocommit off do my own commit or rollback. One problem with
JDBCDataSourceLoader is that I haven't found any examples of it working. I
submitted a patch to fix what seems to be a problem but I need to do more
testing before it gets committed. If you get it to work then let me know. 

http://sourceforge.net/tracker/index.php?func=detail&aid=416523&group_id=228
66&atid=376687

Hal


> -----Original Message-----
> From: Doug Ferguson [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 17, 2001 8:01 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-user] datasource lookup from non ejb
> 
> 
> I am not aware that I can't lookup a DataSource from outside the JVM.
> 
> So this means that only beans will be able to make use of the 
> connection pool.
> I have pieces of my application which are not ejb and it 
> makes no sense to make
> them ejbs
> I would like to use the j2ee connection pooling to have 
> discrete control over
> the max
> number of db connections open at a given time. Any suggestions?
> 
> d.
> 
> 
> Toby Allsopp wrote:
> 
> > On Mon, Apr 16, 2001 at 06:30:41PM -0500, Doug Ferguson wrote:
> > > Hey,
> > >
> > > I am trying to access a datasource from outside  a bean.
> > >
> > > I get a not bound naming exception.
> > >
> > > What do I need to do?
> >
> > Anyway, you should be aware that you can't lookup 
> DataSources from outside
> > the JVM running JBoss. This is true for the entire java: 
> context. In a bean
> > or not shouldn't make any difference, as long as your code 
> runs in the same
> > JVM as JBoss.
> >
> > Toby.
> >
> > _______________________________________________
> > 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
> 

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

Reply via email to