Hi Moacir,

we worked on the same problem recently and have a moderately working
solution, but it involved a patch to DataNucleus itself.

This is how an entity is annotated:

@PersistenceCapable(identityType = IdentityType.DATASTORE, schema = 
"subscription_service", table = "subscribers")
@Extension(vendorName = "datanucleus", key = "datastore", value = 
"store-subscription")
...
public class Subscriber ...

Note the 'datastore' key with value 'store-subscription'.

Matching to that value, we have this in persistor_datanucleus.properties:

isis.persistor.datanucleus.impl.datanucleus.datastore.store-subscription=persistor_subscription.properties

and finally the file persistor_subscription.properties which contains
the usual:

javax.jdo.option.ConnectionDriverName=com.mysql.jdbc.Driver
javax.jdo.option.ConnectionURL=jdbc:mysql://localhost:3306/subscription_service
javax.jdo.option.ConnectionUserName=root
javax.jdo.option.ConnectionPassword=tiger


This is the branch containing the commit which we have tested with
datanucleus-core-4.1.2 and 4.1.7:

https://github.com/m-creations/datanucleus-core/commits/mcreations-federatedstoremanager

If you are interested in trying it out and don't want to build
datanucleus-core yourself, I could release a patched 4.1.7 version which
is compatible with Isis 1.12.1.

Hope this helps


Kambiz


On 2016-04-27 15:06 CEST, Guilherme541 Gamer <[email protected]> 
wrote:

> Sorry for bad english. In fact I want to know how to connect a particular
> entity A in a database A and another entity B in another database B. I ask
> again apologize for the e-mail nickname , my son changed. I have been using
> APACHE ISIS framework on health systems in my city because I am a public
> agent in Brasil city Porto Velho - Rondônia. I implemented the records only
> for patients SUS card, a benefit given by the Brazilian government.
> Grateful for your attention.
>
>
> Moacir Bishop Camata

Reply via email to