Re: [JBoss-user] different datasources for differnet entity beans

2001-04-19 Thread Franco Biaggi

Hi,
if I'm right on the discussion,
the datasource is defined at ejb-jar.xml, for instance if you need more that one 
datasource, build a jar file for each datasource that contain the 
correct xml files and eventually the EBs.
With this approach we are able to connet to mySQL for the new application and to the 
AS/400 DB/2 for legacy data without any problem, using 
the same JNDI.


On Fri, 20 Apr 2001 07:40:10 +1200, Toby Allsopp wrote:

>On Thu, Apr 19, 2001 at 08:07:15PM +0100, Ijonas Kisselbach wrote:
>> Yeah no problem what so ever. The following works for BMP as well as CMP
>> beans.
>> 
>> Basically, all you need to do is specify different datasource resource
>> references in your ejb-jar.xml and jboss.xml files, e.g.:
>
>I'm fairly sure that this is only correct for BMP.  CMP uses jaws.xml to
>decide which DataSource to use, and I seem to recall that this element is
>not per-bean.  I don't know much about JBossCMP, so I might be wrong on that.
>
>Toby.
>
>___
>JBoss-user mailing list
>[EMAIL PROTECTED]
>http://lists.sourceforge.net/lists/listinfo/jboss-user
>












  


  

http://www.ticino.com/usr/fbiaggi/">Franco 
Biaggi
http://www.sisa.ch">SISA Studio Informatica 
SA 
R&D 
Services

Via Carvina 
1 
CH-6807 
Taverne 
Efax +1 801 705 
2839
Tel. +41 91 935 75 35  Fax. +41 
91 935
75 30
Sorry for my bad 
english... 

  







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



Re: [JBoss-user] different datasources for differnet entity beans

2001-04-19 Thread Toby Allsopp

On Thu, Apr 19, 2001 at 08:07:15PM +0100, Ijonas Kisselbach wrote:
> Yeah no problem what so ever. The following works for BMP as well as CMP
> beans.
> 
> Basically, all you need to do is specify different datasource resource
> references in your ejb-jar.xml and jboss.xml files, e.g.:

I'm fairly sure that this is only correct for BMP.  CMP uses jaws.xml to
decide which DataSource to use, and I seem to recall that this element is
not per-bean.  I don't know much about JBossCMP, so I might be wrong on that.

Toby.

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



Re: [JBoss-user] different datasources for differnet entity beans

2001-04-19 Thread Ijonas Kisselbach

Yeah no problem what so ever. The following works for BMP as well as CMP
beans.

Basically, all you need to do is specify different datasource resource
references in your ejb-jar.xml and jboss.xml files, e.g.:

ejb-jar.xml -


  Bean1
  Bean1Home
  Bean1
  Bean1Bean
  Bean
  java.lang.String
  False
  
 jdbc/DB1
 javax.sql.DataSource
 Container
  


  Bean2
  Bean2Home
  Bean2
  Bean2Bean
  Bean
  java.lang.String
  False
  
 jdbc/DB2
 javax.sql.DataSource
 Container
  


jboss.xml --


 
 jdbc/DB1
 java:/OracleDBPoolName
 
 
 jdbc/DB2
 java:/SybaseDBPoolName
 
 

 
   Bean1
   app/Bean1
   
   
   jdbc/DB1
   jdbc/access1
   
  
 
   Bean2
   app/Bean2
   
   
   jdbc/DB2
   jdbc/access2
   
  


- Original Message -
From: "Carles Pi-Sunyer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 19, 2001 7:25 PM
Subject: [JBoss-user] different datasources for differnet entity beans


> Is it possible to configure the datasource that an
> entity bean uses on a per-bean basis?
>
> I have entity beans (container managed) that represent
> tables in different databases. I would like to avoid
> packaging them in different jar files. Is there any
> way to do this?
>
> Thanks,
> Carles
>
> __
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.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



[JBoss-user] different datasources for differnet entity beans

2001-04-19 Thread Carles Pi-Sunyer

Is it possible to configure the datasource that an
entity bean uses on a per-bean basis?

I have entity beans (container managed) that represent
tables in different databases. I would like to avoid
packaging them in different jar files. Is there any
way to do this?

Thanks,
Carles

__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

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