I'm not familiar with the Microsoft driver, so it's possible they have some
features I am not aware of.

In an application server, the server should control pooling, transactions,
and security without the involvement of the application.  The JDBC spec
handles this by suggesting that the app server provide the DataSource
implementation as a front to the app server pooling etc, rather than the
driver providing the DataSource. (In JDBC, support for tx management is
only for xa drivers, and AFAIK there is no real support for container
managed security).  The JCA spec, requiring support for all sorts of
connection factories, not just for jdbc connections, has an architecture
that lets the adapter provide the DataSource-like-object while delegating
pooling etc to the application server.  In JBoss 3, we provide the
DataSource by using a jdbc wrapper jca adapter.  While it would be possible
to write an adapter that got connections from a DataSource rather than the
DriverManager, I haven't seen a reason to do so yet, since JBoss has to do
its own pooling etc anyway, and there are no standard hooks into any
proprietary pooling mechanism.

So, to answer your question more directly, you can't use a DataSource now
and I don't see any reason to try to do so.

Note that this discussion applies only to non-xa drivers.  You can use an
XADataSource implementation with the xa wrapper adapter.

david jencks

On 2002.07.10 08:40:07 -0400 Jamie Burns wrote:
> Hi.
> 
> Microsoft has a SQLServerDriver and a SQLServerDataSource class in their
> SQL 
> Server JDBC package. I was thinking the SQLServeDataSource class would be
> 
> the prefered class for a J2EE app because it is supposed to support J2EE 
> requirements for pooling etc. It also seems strange putting a Driver into
> 
> the JNDI and getting a DataSource out.
> 
> Does JBoss only support java.sql.Driver classes? If not, what is involved
> in 
> using the SQLServerDataSource class? If l have a choice of
> SQLServerDriver 
> and SQLServerDataSource, do l gain anything using one instead of the
> other 
> with JBoss?
> 
> Thanks.
> 
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Two, two, TWO treats in one.
> http://thinkgeek.com/sf
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Two, two, TWO treats in one.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to