Re: [hibernate-dev] Datomic OGM implementation

2015-04-27 Thread Davide D'Alto
Hi Josiah,
thank you very much, that looks like great news.

Usually before changing the existing  modules we discuss the requirements
on this mailing list, on the JIRA or on the forum.

Sending a pull request with the description of the problem is probably the
fastest way to have feedback, just keep the amount of changes to a minimum
so that it's easier for the reviewer to understand what's going on.

Cheers,
Davide

On Sat, Apr 25, 2015 at 2:00 AM, Haswell, Josiah D 
wrote:

> Hi folks,
>
> How can I begin to submit a new grid dialect to the project?  I'm most of
> the way through implementing a dialect for Datomic,
> and am most of the way through the approval process to submit it back to
> the community.  I've had to make some (pretty minor) changes to
> Hibernate-ogm-core that I'd like feedback on, as well.  Do I just submit a
> pull request?
>
> Thanks!
>
> Josiah Haswell
> ___
> hibernate-dev mailing list
> hibernate-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] Multitenancy Per Schema Fails With NPE

2015-04-27 Thread Steve Ebersole
You are trying to use auto schema validation.  That is not yet supported
for multi-tenancy.  None of the auto schema tools are.  If you need to run
any of the schema tools, you will need to do so manually.

On Mon, Apr 27, 2015 at 12:35 AM, amit shah  wrote:

> I did log a blocker issue
> on jira but to get a
> quick response I posted the issue here again.
> I do not see any traction on the jira issue, neither did stackoverflow or
> the IRC chat help out.
> Any help would be appreciated.
>
> Thanks !
>
> On Wed, Apr 22, 2015 at 7:18 PM, Steve Ebersole 
> wrote:
>
>> 1) This is a list for discussing the development of Hibernate itself, not
>> for discussing usage of Hibernate.  Please use the forums, StackOverflow,
>> or #hibernate IRC for user questions.
>>
>> 2) If this really leads to a NPE in *Hibernate* (not your code) trying to
>> open a connection, then that would be a bug.  If that is the case, please
>> open a Jira, and be sure to include (a) a test case and (b) the full stack
>> trace for the NPE.
>> On Apr 22, 2015 7:07 AM, "amit shah"  wrote:
>>
>>> I'm using schema based multi-tenancy providing implementations for both
>>> MultiTenantConnectionProvider & CurrentTenantIdentifierResolver. Trying
>>> to
>>> get a hibernate session for a single tenant fails with an NPE.
>>>
>>> Looking into the source code, it seems that JDBCServicesImpl initializes
>>> the connectionProvider to null in the else block
>>>
>>> private JdbcConnectionAccess buildJdbcConnectionAccess(Map
>>> configValues) {
>>> final MultiTenancyStrategy multiTenancyStrategy =
>>> MultiTenancyStrategy.determineMultiTenancyStrategy( configValues );
>>>
>>> if ( MultiTenancyStrategy.NONE == multiTenancyStrategy )
>>> {
>>> connectionProvider = serviceRegistry.getService(
>>> ConnectionProvider.class );
>>> return new
>>> ConnectionProviderJdbcConnectionAccess( connectionProvider );
>>> }
>>> else {
>>> connectionProvider = null;
>>> final MultiTenantConnectionProvider
>>> multiTenantConnectionProvider =
>>> serviceRegistry.getService( MultiTenantConnectionProvider.class );
>>> return new
>>> MultiTenantConnectionProviderJdbcConnectionAccess(
>>> multiTenantConnectionProvider );
>>> }
>>> }
>>>
>>> Please find the test case attached to the mail. I have also logged an
>>> issue
>>> since it's blocking. Is
>>> there something basic that I am missing.
>>>
>>> Thanks,
>>> Amit.
>>>
>>> ___
>>> hibernate-dev mailing list
>>> hibernate-dev@lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>>
>>
>
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


[hibernate-dev] Quick question about PostCommitInsertEventListener

2015-04-27 Thread Haswell, Josiah D
Hi folks,


In Datomic, when you create an entity, you must give the entity a temporary ID 
before you insert it.  After the transaction completes, each entity in the 
transaction is given an actual persistence ID back from the database.  My 
initial approach was to generate the temporary identifier in the createTuple 
method of the IdentityColumnAwareGridDialect, and provide a customer persister 
implementation to handle it.  It occurred to me that it might be easier to just 
use a listener.  After a bit of fiddling around, I discovered that 
PostCommitInsertEventListener can (apparently) substitute out the ID at what 
appears to be the correct location.  From what I can tell, this both simplifies 
the code, and the generated ID seems to be propagated to everything correctly.  
Is the custom persister the preferred way to do this?  Or should this work?  Is 
there a better place to perform that substitution?

Thanks!

Josiah


___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev