I suggest you use an idea Dain suggested to me, write a customized jca-jdbc
wrapper that maps Subject to db url. (He suggested mapping subject to
schema/catalog, however the same idea ought to work here.) If you want to
combine result sets from several distinct databases I suggest you use a db
that allows you to create views like this or modify your schema to have
only one database, where each table includes a user id column.

david jencks

On 2002.04.03 17:33:23 -0500 "Simpson, Mike W" wrote:
> Will JBoss3 allow me to specify multiple datasources for a single CMP
> bean?
> My app supports an asp model where I have physically separate databases,
> each with identical schema, and users are bound to one database at logon.
> It seems like a waste of resources to uniquely name instances of every
> bean
> (even if I need separate JNDI names to lookup from a specific datasource)
> in
> the system for each database when it doesn't really matter ultimately
> which
> datasource was used to populate the bean instance.  
>  
> Taken to the logical conclusion, it would be nice if my findBy... methods
> could query many datasources and combine the resultsets, tracking
> physical
> database mappings on the back end.
>  
> Has anyone had experience doing this?  How can I get JBoss3 to let me
> choose
> the datasource for each instance of a bean rather than each class of
> beans?
>  
> -mike
>  
>  
> 
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
> 
> 
> <META content="MSHTML 5.50.4616.200" name=GENERATOR></HEAD>
> <BODY>
> <DIV><FONT face=Arial size=2>Will JBoss3 allow me to specify multiple 
> datasources for a single&nbsp;<SPAN class=828453422-03042002>CMP 
> </SPAN>bean?&nbsp; My app supports an asp model where I have physically
> separate 
> databases, each with identical schema, and users are bound to one
> database at 
> logon.&nbsp; It seems like a waste of resources to&nbsp;<SPAN 
> class=828453422-03042002>uniquely name</SPAN> instances of every bean
> (even if I 
> need separate JNDI names to lookup from a specific datasource) in the
> system for 
> each database when it doesn't really matter ultimately which datasource
> was used 
> to populate the bean instance.&nbsp; </FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2>Taken to the logical conclusion, it would be
> nice 
> if my findBy... methods could query many datasources and combine the
> resultsets, 
> tracking physical database mappings on the back end.</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2>Has anyone had experience doing this?&nbsp;
> How can 
> I get JBoss3 to let me choose the datasource for each instance of a bean
> rather 
> than each class of beans?</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
> <DIV><SPAN class=828453422-03042002><FONT face=Arial 
> size=2>-mike</FONT></SPAN></DIV>
> <DIV><SPAN class=828453422-03042002><FONT face=Arial 
> size=2></FONT></SPAN>&nbsp;</DIV>
> <DIV><SPAN class=828453422-03042002><FONT face=Arial 
> size=2></FONT></SPAN>&nbsp;</DIV></BODY></HTML>
> 

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

Reply via email to