[jira] [Commented] (ISIS-2020) DataNucleus Federated Datastore functionality not used in query

2018-11-08 Thread Andi Huber (JIRA)


[ 
https://issues.apache.org/jira/browse/ISIS-2020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16680953#comment-16680953
 ] 

Andi Huber commented on ISIS-2020:
--

Hi Brian, 
thanks for the effort and findings! And you are asking great questions, which 
are noticed, but I fail to answer, because I don't yet understand our DN 
integration well enough. Maybe Dan has more insight.

With your last comment you are proposing a fine workaround, which in case of a 
FederatedStoreManager would make it the responsibility of the developer to 
properly setup the DN properties in order for schema creation to work. Whereas 
for SchemaAwareStoreManager, we do this programmatically. And I believe the 
latter is a bit hacky to deal with other issues from the past, that I'm not 
particularly aware of.

I'll implement your workaround, but still I fear that this is only the 
beginning, if we want to fully support the FederatedStoreManager. But there is 
nothing preventing us from having this as an experimental feature.

Cheers, Andi!


> DataNucleus Federated Datastore functionality not used in query
> ---
>
> Key: ISIS-2020
> URL: https://issues.apache.org/jira/browse/ISIS-2020
> Project: Isis
>  Issue Type: Bug
>  Components: Core: Objectstore: JDO
>Affects Versions: 1.16.2, 2.0.0-M1
>Reporter: Brian Kalbfus
>Assignee: Andi Huber
>Priority: Major
> Fix For: 2.0.0
>
> Attachments: datanucleus-api-jdo.patch
>
>
> Insert and Update operations work as expected, but query operations operate 
> on the primary datastore.  I see from stepping through the M1 code that 
> Insert and Update operations use a transaction that accesses a 
> FederatedDataStore.  I guess that is where the difference occurs in that the 
> query operations get a data store another way, failing to get the 
> FederatedDataStore that is configured.
> example code created from helloworld-archetype is at 
> [https://github.com/bkalbfus/isis-federatedDS-2_0_0-M1]
> Mailing list: 
> [https://lists.apache.org/thread.html/2edea2f8d802532c3672eddc83b484bbc2e31d1cac16f2759feeb95f@%3Cusers.isis.apache.org%3E]
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ISIS-2020) DataNucleus Federated Datastore functionality not used in query

2018-11-08 Thread Brian Kalbfus (JIRA)


[ 
https://issues.apache.org/jira/browse/ISIS-2020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16680647#comment-16680647
 ] 

Brian Kalbfus commented on ISIS-2020:
-

I have SimpleApp working with a federated data store.  I am working from the v2 
branch.

I had to make one change in the isis-core-plugins-jdo-datanucleus-5 module:

[https://github.com/apache/isis/blob/2f8f57c32e3a85c54c35c9d73062e8212bb4c8e5/core/plugins/jdo-datanucleus-5/src/main/java/org/apache/isis/core/runtime/system/persistence/DataNucleusApplicationComponents5.java#L124]

(from the v2 branch)

The isSchemaAwareStoreManager method assumes that hsqldb and sqlserver urls 
would render a SchemaAwareStoreManager.  This is not the case if there is a 
secondary store defined - you get a Federated data store manager. 

I suppose you could test for the presence of a 
"isis.persistor.datanucleus.impl.datanucleus.datastore.*" property to 
immediately return false.  I commented out this code so that the probePmf test 
is used.  Also, I had to change the entity listAll methods like I describe in 
my prior comment and "ignore" the unit test that calls this method.

I now understand why the build and tests succeeded but the web app failed to 
start:  the federated data store is declared in the webapp module.

What is the downside of not having a SchemaAwareStoreManager in Apache Isis?

Thanks,

Brian

> DataNucleus Federated Datastore functionality not used in query
> ---
>
> Key: ISIS-2020
> URL: https://issues.apache.org/jira/browse/ISIS-2020
> Project: Isis
>  Issue Type: Bug
>  Components: Core: Objectstore: JDO
>Affects Versions: 1.16.2, 2.0.0-M1
>Reporter: Brian Kalbfus
>Assignee: Andi Huber
>Priority: Major
> Fix For: 2.0.0
>
> Attachments: datanucleus-api-jdo.patch
>
>
> Insert and Update operations work as expected, but query operations operate 
> on the primary datastore.  I see from stepping through the M1 code that 
> Insert and Update operations use a transaction that accesses a 
> FederatedDataStore.  I guess that is where the difference occurs in that the 
> query operations get a data store another way, failing to get the 
> FederatedDataStore that is configured.
> example code created from helloworld-archetype is at 
> [https://github.com/bkalbfus/isis-federatedDS-2_0_0-M1]
> Mailing list: 
> [https://lists.apache.org/thread.html/2edea2f8d802532c3672eddc83b484bbc2e31d1cac16f2759feeb95f@%3Cusers.isis.apache.org%3E]
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)