-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: 1.2.0GA Reflection Optimizer And Explicit Interfaces
PostPosted: Thu May 17, 2007 11:57 am 
Senior
Senior

Joined: Thu Feb 09, 2006 1:30 pm
Posts: 172
I ran into an issue with NHibernate 1.2.0GA when trying to use an explict interface for property access using NHibernate. It is very important that developers not set the values of our properties explicitly one of our internal structures. This is used for some of our value types which need additional information besides just the value. We do not want users assigning values to our structure, but rather should assign a new structure instantiated using a constructor.

To accomodate NHiberante (given the initial implementation was in 1.0.3) we created an interface for NHibernate, set the properties of the interface to Obsolete() and then implemented them explicitly on our structures. This then meant that only through reflection could a developer possibly set the value directly, and we so far at least trust developers not to blatantly violate our policy on setting the value by using reflection.

With NHibernate 1.2.0.GA when we try to save the structure we receive one of a few exceptions. Either we get a complaint that the memory was corrupt or we would see that there was a EngingeExecutionException thrown reporting a possible bug in the framework.

I changed the configuration options for the reflection optimizer to false and everything works just fine. I assume there is some sort of bug in the reflection optimizer where it does not work properly for explicit interface implementations.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 17, 2007 12:35 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Yes, probably. Please submit a JIRA issue with all the necessary details (exception stack trace).


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.