Hi!

Adrian K�pe wrote:
> I've got 2 problems: one simple question and one simple implementation
> problem.
> Question:  does any of you guys implemented or tried to implement a BMP
> which use multiple databases sources (without hard coding anything) ?

Nope, but it should work. Are you using multiple DS's *per bean* or do
you just have a generic BMP base entity which you extend to multiple
BMP's with different DS's?

> Problem: I've tried to implement a simple generic BMP which have to do
> the following:
>      - read some configuration files

Why don't you use environment variables? You know you're not allowed to
read files in EJB's...

>      - retrieve the DS and relative database information such table
> name, primary column index ...
>      - add a new row if its required only
>      - etc.
> 
> Now this bean I want to use it for different databases (tables,
> databases) so that each bean has its own database table (one or more if
> its required).
> Does anyone know how can I do it ? and of course if is possible to do it

It seems like the easiest way to do this is to have a resource reference
"java:comp/env/jdbc/BeanDS" that you configure on jboss.xml for each
bean to point to the respective database. Use environment entries for
table names etc.

regards,
  Rickard

-- 
Rickard �berg

Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to