Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » teneo - two different hibernate databases in one ResourceSet
teneo - two different hibernate databases in one ResourceSet [message #62757] |
Sun, 26 November 2006 14:21  |
Eclipse User |
|
|
|
Hi (Martin),
I would like to create a ResourceSet in my editor having two connections to two
different datasources. Basically I have two databases, one for static low volume
and another one for dynamic, high volume data. The objects in the static
resource should do queries in the other resource and create temporary
associations (transient).
As far as I understand, it should be easy to use two different datasources using
a dsName=... in the resource URL, but I wonder how do I tell teneo or the
hibernate layer which connection URLs to use in each of the different
datasources? How is such a scenario initialized? Any quick suggestions?
Regards
Andre
|
|
|
Re: teneo - two different hibernate databases in one ResourceSet [message #62779 is a reply to message #62757] |
Sun, 26 November 2006 17:17   |
Eclipse User |
|
|
|
Hi Andre,
To accomplish this you can initialize two different HbDataStores and use their names in the uri (as
value of the dsname parameter).
gr. Martin
Andre Pareis wrote:
> Hi (Martin),
>
> I would like to create a ResourceSet in my editor having two connections
> to two different datasources. Basically I have two databases, one for
> static low volume and another one for dynamic, high volume data. The
> objects in the static resource should do queries in the other resource
> and create temporary associations (transient).
>
> As far as I understand, it should be easy to use two different
> datasources using a dsName=... in the resource URL, but I wonder how do
> I tell teneo or the hibernate layer which connection URLs to use in each
> of the different datasources? How is such a scenario initialized? Any
> quick suggestions?
>
> Regards
> Andre
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: teneo - two different hibernate databases in one ResourceSet [message #62812 is a reply to message #62779] |
Sun, 26 November 2006 20:13   |
Eclipse User |
|
|
|
Hi Martin,
that's the part which is more or less clear to me.
However, the HbDataStore initializes its hibernate session factory using a
hibernate.properties file found in the classpath. There can be only one
hibernate.properties, and it does also tell the SF exactly one URL for
connecting to a DB, but I need two different URLs.
I know that there is the option to intercept the creation of HbDataStoreS using
a factory, but what to set there? Is the hibernate.properties loaded by
hibernate or by teneo? How can I pass in a different JDBC URL for each HbDataStore?
Thanks
Andre
Martin Taal wrote:
> Hi Andre,
> To accomplish this you can initialize two different HbDataStores and use
> their names in the uri (as value of the dsname parameter).
>
> gr. Martin
>
> Andre Pareis wrote:
>> Hi (Martin),
>>
>> I would like to create a ResourceSet in my editor having two
>> connections to two different datasources. Basically I have two
>> databases, one for static low volume and another one for dynamic, high
>> volume data. The objects in the static resource should do queries in
>> the other resource and create temporary associations (transient).
>>
>> As far as I understand, it should be easy to use two different
>> datasources using a dsName=... in the resource URL, but I wonder how
>> do I tell teneo or the hibernate layer which connection URLs to use in
>> each of the different datasources? How is such a scenario initialized?
>> Any quick suggestions?
>>
>> Regards
>> Andre
>
>
|
|
|
Re: teneo - two different hibernate databases in one ResourceSet [message #62828 is a reply to message #62812] |
Sun, 26 November 2006 23:32   |
Eclipse User |
|
|
|
Hi Andre,
The hibernate.properties file is read by Hibernate. For your case the easiest would be to set the
properties directly in the hbDataStore by calling setHibernateProperties(Properties hibernateProperties)
(and remove the hibernate.properties file in the root of the classpath).
then you can decide yourselve where to read the (jdbc) properties from and have different properties
for different datastores.
gr. Martin
Andre Pareis wrote:
> Hi Martin,
>
> that's the part which is more or less clear to me.
>
> However, the HbDataStore initializes its hibernate session factory using
> a hibernate.properties file found in the classpath. There can be only
> one hibernate.properties, and it does also tell the SF exactly one URL
> for connecting to a DB, but I need two different URLs.
>
> I know that there is the option to intercept the creation of
> HbDataStoreS using a factory, but what to set there? Is the
> hibernate.properties loaded by hibernate or by teneo? How can I pass in
> a different JDBC URL for each HbDataStore?
>
> Thanks
> Andre
>
>
>
>
> Martin Taal wrote:
>> Hi Andre,
>> To accomplish this you can initialize two different HbDataStores and
>> use their names in the uri (as value of the dsname parameter).
>>
>> gr. Martin
>>
>> Andre Pareis wrote:
>>> Hi (Martin),
>>>
>>> I would like to create a ResourceSet in my editor having two
>>> connections to two different datasources. Basically I have two
>>> databases, one for static low volume and another one for dynamic,
>>> high volume data. The objects in the static resource should do
>>> queries in the other resource and create temporary associations
>>> (transient).
>>>
>>> As far as I understand, it should be easy to use two different
>>> datasources using a dsName=... in the resource URL, but I wonder how
>>> do I tell teneo or the hibernate layer which connection URLs to use
>>> in each of the different datasources? How is such a scenario
>>> initialized? Any quick suggestions?
>>>
>>> Regards
>>> Andre
>>
>>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: teneo - two different hibernate databases in one ResourceSet [message #62884 is a reply to message #62828] |
Tue, 28 November 2006 14:22  |
Eclipse User |
|
|
|
Hi Martin,
cool, that sounds doable ;)
Thanks,
Andre
Martin Taal wrote:
> Hi Andre,
> The hibernate.properties file is read by Hibernate. For your case the
> easiest would be to set the properties directly in the hbDataStore by
> calling setHibernateProperties(Properties hibernateProperties)
> (and remove the hibernate.properties file in the root of the classpath).
>
> then you can decide yourselve where to read the (jdbc) properties from
> and have different properties for different datastores.
>
> gr. Martin
>
> Andre Pareis wrote:
>> Hi Martin,
>>
>> that's the part which is more or less clear to me.
>>
>> However, the HbDataStore initializes its hibernate session factory
>> using a hibernate.properties file found in the classpath. There can be
>> only one hibernate.properties, and it does also tell the SF exactly
>> one URL for connecting to a DB, but I need two different URLs.
>>
>> I know that there is the option to intercept the creation of
>> HbDataStoreS using a factory, but what to set there? Is the
>> hibernate.properties loaded by hibernate or by teneo? How can I pass
>> in a different JDBC URL for each HbDataStore?
>>
>> Thanks
>> Andre
>>
>>
>>
>>
>> Martin Taal wrote:
>>> Hi Andre,
>>> To accomplish this you can initialize two different HbDataStores and
>>> use their names in the uri (as value of the dsname parameter).
>>>
>>> gr. Martin
>>>
>>> Andre Pareis wrote:
>>>> Hi (Martin),
>>>>
>>>> I would like to create a ResourceSet in my editor having two
>>>> connections to two different datasources. Basically I have two
>>>> databases, one for static low volume and another one for dynamic,
>>>> high volume data. The objects in the static resource should do
>>>> queries in the other resource and create temporary associations
>>>> (transient).
>>>>
>>>> As far as I understand, it should be easy to use two different
>>>> datasources using a dsName=... in the resource URL, but I wonder how
>>>> do I tell teneo or the hibernate layer which connection URLs to use
>>>> in each of the different datasources? How is such a scenario
>>>> initialized? Any quick suggestions?
>>>>
>>>> Regards
>>>> Andre
>>>
>>>
>
>
|
|
|
Re: teneo - two different hibernate databases in one ResourceSet [message #596173 is a reply to message #62757] |
Sun, 26 November 2006 17:17  |
Eclipse User |
|
|
|
Hi Andre,
To accomplish this you can initialize two different HbDataStores and use their names in the uri (as
value of the dsname parameter).
gr. Martin
Andre Pareis wrote:
> Hi (Martin),
>
> I would like to create a ResourceSet in my editor having two connections
> to two different datasources. Basically I have two databases, one for
> static low volume and another one for dynamic, high volume data. The
> objects in the static resource should do queries in the other resource
> and create temporary associations (transient).
>
> As far as I understand, it should be easy to use two different
> datasources using a dsName=... in the resource URL, but I wonder how do
> I tell teneo or the hibernate layer which connection URLs to use in each
> of the different datasources? How is such a scenario initialized? Any
> quick suggestions?
>
> Regards
> Andre
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: teneo - two different hibernate databases in one ResourceSet [message #596198 is a reply to message #62779] |
Sun, 26 November 2006 20:13  |
Eclipse User |
|
|
|
Hi Martin,
that's the part which is more or less clear to me.
However, the HbDataStore initializes its hibernate session factory using a
hibernate.properties file found in the classpath. There can be only one
hibernate.properties, and it does also tell the SF exactly one URL for
connecting to a DB, but I need two different URLs.
I know that there is the option to intercept the creation of HbDataStoreS using
a factory, but what to set there? Is the hibernate.properties loaded by
hibernate or by teneo? How can I pass in a different JDBC URL for each HbDataStore?
Thanks
Andre
Martin Taal wrote:
> Hi Andre,
> To accomplish this you can initialize two different HbDataStores and use
> their names in the uri (as value of the dsname parameter).
>
> gr. Martin
>
> Andre Pareis wrote:
>> Hi (Martin),
>>
>> I would like to create a ResourceSet in my editor having two
>> connections to two different datasources. Basically I have two
>> databases, one for static low volume and another one for dynamic, high
>> volume data. The objects in the static resource should do queries in
>> the other resource and create temporary associations (transient).
>>
>> As far as I understand, it should be easy to use two different
>> datasources using a dsName=... in the resource URL, but I wonder how
>> do I tell teneo or the hibernate layer which connection URLs to use in
>> each of the different datasources? How is such a scenario initialized?
>> Any quick suggestions?
>>
>> Regards
>> Andre
>
>
|
|
|
Re: teneo - two different hibernate databases in one ResourceSet [message #596203 is a reply to message #62812] |
Sun, 26 November 2006 23:32  |
Eclipse User |
|
|
|
Hi Andre,
The hibernate.properties file is read by Hibernate. For your case the easiest would be to set the
properties directly in the hbDataStore by calling setHibernateProperties(Properties hibernateProperties)
(and remove the hibernate.properties file in the root of the classpath).
then you can decide yourselve where to read the (jdbc) properties from and have different properties
for different datastores.
gr. Martin
Andre Pareis wrote:
> Hi Martin,
>
> that's the part which is more or less clear to me.
>
> However, the HbDataStore initializes its hibernate session factory using
> a hibernate.properties file found in the classpath. There can be only
> one hibernate.properties, and it does also tell the SF exactly one URL
> for connecting to a DB, but I need two different URLs.
>
> I know that there is the option to intercept the creation of
> HbDataStoreS using a factory, but what to set there? Is the
> hibernate.properties loaded by hibernate or by teneo? How can I pass in
> a different JDBC URL for each HbDataStore?
>
> Thanks
> Andre
>
>
>
>
> Martin Taal wrote:
>> Hi Andre,
>> To accomplish this you can initialize two different HbDataStores and
>> use their names in the uri (as value of the dsname parameter).
>>
>> gr. Martin
>>
>> Andre Pareis wrote:
>>> Hi (Martin),
>>>
>>> I would like to create a ResourceSet in my editor having two
>>> connections to two different datasources. Basically I have two
>>> databases, one for static low volume and another one for dynamic,
>>> high volume data. The objects in the static resource should do
>>> queries in the other resource and create temporary associations
>>> (transient).
>>>
>>> As far as I understand, it should be easy to use two different
>>> datasources using a dsName=... in the resource URL, but I wonder how
>>> do I tell teneo or the hibernate layer which connection URLs to use
>>> in each of the different datasources? How is such a scenario
>>> initialized? Any quick suggestions?
>>>
>>> Regards
>>> Andre
>>
>>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: teneo - two different hibernate databases in one ResourceSet [message #596271 is a reply to message #62828] |
Tue, 28 November 2006 14:22  |
Eclipse User |
|
|
|
Hi Martin,
cool, that sounds doable ;)
Thanks,
Andre
Martin Taal wrote:
> Hi Andre,
> The hibernate.properties file is read by Hibernate. For your case the
> easiest would be to set the properties directly in the hbDataStore by
> calling setHibernateProperties(Properties hibernateProperties)
> (and remove the hibernate.properties file in the root of the classpath).
>
> then you can decide yourselve where to read the (jdbc) properties from
> and have different properties for different datastores.
>
> gr. Martin
>
> Andre Pareis wrote:
>> Hi Martin,
>>
>> that's the part which is more or less clear to me.
>>
>> However, the HbDataStore initializes its hibernate session factory
>> using a hibernate.properties file found in the classpath. There can be
>> only one hibernate.properties, and it does also tell the SF exactly
>> one URL for connecting to a DB, but I need two different URLs.
>>
>> I know that there is the option to intercept the creation of
>> HbDataStoreS using a factory, but what to set there? Is the
>> hibernate.properties loaded by hibernate or by teneo? How can I pass
>> in a different JDBC URL for each HbDataStore?
>>
>> Thanks
>> Andre
>>
>>
>>
>>
>> Martin Taal wrote:
>>> Hi Andre,
>>> To accomplish this you can initialize two different HbDataStores and
>>> use their names in the uri (as value of the dsname parameter).
>>>
>>> gr. Martin
>>>
>>> Andre Pareis wrote:
>>>> Hi (Martin),
>>>>
>>>> I would like to create a ResourceSet in my editor having two
>>>> connections to two different datasources. Basically I have two
>>>> databases, one for static low volume and another one for dynamic,
>>>> high volume data. The objects in the static resource should do
>>>> queries in the other resource and create temporary associations
>>>> (transient).
>>>>
>>>> As far as I understand, it should be easy to use two different
>>>> datasources using a dsName=... in the resource URL, but I wonder how
>>>> do I tell teneo or the hibernate layer which connection URLs to use
>>>> in each of the different datasources? How is such a scenario
>>>> initialized? Any quick suggestions?
>>>>
>>>> Regards
>>>> Andre
>>>
>>>
>
>
|
|
|
Goto Forum:
Current Time: Wed May 07 19:16:24 EDT 2025
Powered by FUDForum. Page generated in 0.03958 seconds
|