RE: [JBoss-user] CMR uses the default datasource in stead of the one specifically specified for the CMP 2.0 EJB entity beans concerned

2003-03-31 Thread Allan Kamau
Hi,
I faced the same problem some time back and this is
how I solved it (on JBoss 3.0.6).
My application was using data from PostgreSQL database
and I had to access use data residing a M$ SQL 2000
database.
I had configured the entire application to use
PostgreSQL for CMP persistence. I did this by creating
a “META-INF/jbosscmp-jdbc.xml” containing something
like this.


java:/PostgresDS
PostgreSQL
7.2
true
false
false
300
true
true
false

foreign-key

on-load
1000
*

1000
 




PBudgetSummaryLineItemYearEJB
java:/MSSQLDS
MS
SQLSERVER2000

PBudgetSummaryLineItemYearEJB
true





Now all the CMP entity beans in my application are
using the PostgreSQL datasource. EXCEPT the
“PBudgetSummaryLineItemYearEJB” CMP entity bean which
is using MSSQLDS datasource for persistence.

Of course the datasources have to be configured in
your JBoss installation. 


Allan Kamau.




--- Jboss Percy <[EMAIL PROTECTED]> wrote:
> I use the normal download (with Tomcat integrated)
> from the Jboss Site
> jboss-3.0.6_tomcat-4.1.18.
> Here is the release log.
> JBoss Release: JBoss-3.0.6 CVSTag=JBoss_3_0_6
> How and where can I get that latewst release? Is
> that build or do I have
> to retrieve the sources and build 
> My own version from a merge?
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Alex
> Loubyansky
> Sent: maandag 31 maart 2003 13:40
> To: Jboss Percy
> Subject: Re: [JBoss-user] CMR uses the default
> datasource in stead of
> the one specifically specified for the CMP 2.0 EJB
> entity beans
> concerned
> 
> 
> What JBoss version are you using?
> This was fixed in Branch_3_2 recently.
> 
> alex
> 
> Monday, March 31, 2003, 2:05:25 PM, Jboss Percy
> wrote:
> 
> JP> I am new to JBoss and to MySql (although the
> problem has not 
> JP> specifically to do with MySql). I am trying to
> port a rather large 
> JP> application from Borland BES 5.2 to JBoss 3.06
> and ran in a little 
> JP> problem. The application uses different
> databases, which I all 
> JP> hosted to MySql. Each deployable unit has its
> own database with its 
> JP> own tables. This situation prevents me from
> using the simple 
> JP> solution of setting a single database a default
> data source (in the
> JP>
>
\server\default\conf\standardjaws.xml
> and 
> JP>
>
\server\default\conf\standardjbosscmp-jdbc.xml)
> 
> JP> So I define my multiple data sources in multiple
> mysql--service.xml
> JP> files (one per database) and configure each of
> these services in the
> JP>
>
\server\default\conf\login-config.xml)
> 
> JP> All runs fine except for the CMR. When I create
> a new (EJB 2.0 
> JP> entity
> JP> bean) relation I see that the Hypersonic SQL
> driver is selected
> in-stead
> JP> of the MySql one, although I specifically
> specified the datasource
> JP> element of EJB 2.0 CMP each entity bean. On top
> I cannot specify the
> JP>  element in the relation (It is
> specified in the
> 
> JP> element although but that seems to be ignored in
> the relationship
> JP> elements that uses these entities). Both
> entities that are parts of
> the
> JP> relation are in the same datasource (read
> database).
> JP> I can of course also include a 
> element in the
> JP> jbosscmp-jdbc.xml file in the deployed unit but
> there again that
> would
> JP> be for the whole deployable unit (which could
> contain may different
> JP> entity beans which would not necessarily all use
> the same datastore.
> My
> JP> guess is that the relationships should
> automatically inherit
> whatever
> JP> datastore specification the entity bean to which
> the relationship
> JP> belongs has. This seems logic as I cannot
> understand where the data
> JP> should be stored elsewhere as in the same
> database as the rest of
> the
> JP> data of the bean.
> 
> JP> Has anyone an Idea of how to overcome this
> problem.
> 
> JP> Thanks for any advance.
> 
> JP> Percy Christian
> 
> JP> [EMAIL PROTECTED]
> 
> 
> 
> 
>
---
> This SF.net email is sponsored by: ValueWeb: 
> Dedicated Hosting for just $79/mo with 500 GB of
> bandwidth! 
> No other company gives more support or power for
> your dedicated 

RE: [JBoss-user] CMR uses the default datasource in stead of the one specifically specified for the CMP 2.0 EJB entity beans concerned

2003-03-31 Thread Jboss Percy
I use the normal download (with Tomcat integrated) from the Jboss Site
jboss-3.0.6_tomcat-4.1.18.
Here is the release log.
JBoss Release: JBoss-3.0.6 CVSTag=JBoss_3_0_6
How and where can I get that latewst release? Is that build or do I have
to retrieve the sources and build 
My own version from a merge?


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Alex
Loubyansky
Sent: maandag 31 maart 2003 13:40
To: Jboss Percy
Subject: Re: [JBoss-user] CMR uses the default datasource in stead of
the one specifically specified for the CMP 2.0 EJB entity beans
concerned


What JBoss version are you using?
This was fixed in Branch_3_2 recently.

alex

Monday, March 31, 2003, 2:05:25 PM, Jboss Percy wrote:

JP> I am new to JBoss and to MySql (although the problem has not 
JP> specifically to do with MySql). I am trying to port a rather large 
JP> application from Borland BES 5.2 to JBoss 3.06 and ran in a little 
JP> problem. The application uses different databases, which I all 
JP> hosted to MySql. Each deployable unit has its own database with its 
JP> own tables. This situation prevents me from using the simple 
JP> solution of setting a single database a default data source (in the
JP> \server\default\conf\standardjaws.xml and 
JP> \server\default\conf\standardjbosscmp-jdbc.xml) 
JP> So I define my multiple data sources in multiple
mysql--service.xml
JP> files (one per database) and configure each of these services in the
JP> \server\default\conf\login-config.xml)

JP> All runs fine except for the CMR. When I create a new (EJB 2.0 
JP> entity
JP> bean) relation I see that the Hypersonic SQL driver is selected
in-stead
JP> of the MySql one, although I specifically specified the datasource
JP> element of EJB 2.0 CMP each entity bean. On top I cannot specify the
JP>  element in the relation (It is specified in the

JP> element although but that seems to be ignored in the relationship
JP> elements that uses these entities). Both entities that are parts of
the
JP> relation are in the same datasource (read database).
JP> I can of course also include a  element in the
JP> jbosscmp-jdbc.xml file in the deployed unit but there again that
would
JP> be for the whole deployable unit (which could contain may different
JP> entity beans which would not necessarily all use the same datastore.
My
JP> guess is that the relationships should automatically inherit
whatever
JP> datastore specification the entity bean to which the relationship
JP> belongs has. This seems logic as I cannot understand where the data
JP> should be stored elsewhere as in the same database as the rest of
the
JP> data of the bean.

JP> Has anyone an Idea of how to overcome this problem.

JP> Thanks for any advance.

JP> Percy Christian

JP> [EMAIL PROTECTED]




---
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] CMR uses the default datasource in stead of the one specifically specified for the CMP 2.0 EJB entity beans concerned

2003-03-31 Thread Alex Loubyansky
What JBoss version are you using?
This was fixed in Branch_3_2 recently.

alex

Monday, March 31, 2003, 2:05:25 PM, Jboss Percy wrote:

JP> I am new to JBoss and to MySql (although the problem has not
JP> specifically to do with MySql).
JP> I am trying to port a rather large application from Borland BES 5.2 to
JP> JBoss 3.06 and ran in a little problem.
JP> The application uses different databases, which I all hosted to MySql. 
JP> Each deployable unit has its own database with its own tables.
JP> This situation prevents me from using the simple solution of setting a
JP> single database a default data source (in the
JP> \server\default\conf\standardjaws.xml and 
JP> \server\default\conf\standardjbosscmp-jdbc.xml) 
JP> So I define my multiple data sources in multiple mysql--service.xml
JP> files (one per database) and configure each of these services in the
JP> \server\default\conf\login-config.xml)

JP> All runs fine except for the CMR. When I create a new (EJB 2.0 entity
JP> bean) relation I see that the Hypersonic SQL driver is selected in-stead
JP> of the MySql one, although I specifically specified the datasource
JP> element of EJB 2.0 CMP each entity bean. On top I cannot specify the
JP>  element in the relation (It is specified in the 
JP> element although but that seems to be ignored in the relationship
JP> elements that uses these entities). Both entities that are parts of the
JP> relation are in the same datasource (read database).
JP> I can of course also include a  element in the
JP> jbosscmp-jdbc.xml file in the deployed unit but there again that would
JP> be for the whole deployable unit (which could contain may different
JP> entity beans which would not necessarily all use the same datastore. My
JP> guess is that the relationships should automatically inherit whatever
JP> datastore specification the entity bean to which the relationship
JP> belongs has. This seems logic as I cannot understand where the data
JP> should be stored elsewhere as in the same database as the rest of the
JP> data of the bean.

JP> Has anyone an Idea of how to overcome this problem. 

JP> Thanks for any advance.

JP> Percy Christian

JP> [EMAIL PROTECTED]




---
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user