Re: [hibernate-dev] Bytecode enhancement

2012-10-05 Thread Hardy Ferentschik
On 4 Jan 2012, at 5:00 PM, Steve Ebersole wrote: > Looking for input about how to best design this. All three use cases seem useful. Right now I am not familiar enough with the code to give concrete design tips. > First, is Javassist the best choice? AFAIK it is still one of the most popula

Re: [hibernate-dev] Accessing annotation properties values

2012-10-05 Thread Hardy Ferentschik
On 5 Jan 2012, at 4:05 AM, Steve Ebersole wrote: > Probably you can cache it by AnnotationInstance, so maybe something > like this instead: > > class AnnotationProxyBuilder { >private final Map annotationProxyMap = new ...; > >public T getAnnotationProxy(final AnnotationInstance > an

Re: [hibernate-dev] Documentation on OGM + JBoss AS

2012-10-05 Thread Sanne Grinovero
Thanks Scott, that documentation arrived just in time: https://forum.hibernate.org/viewtopic.php?f=31&t=1024476 It looks like we could simplify things by creating an AS7 module, and release it in tandem with an OGM release. What could be the best way to distribute this module? Is there a "clean"

Re: [hibernate-dev] Accessing annotation properties values

2012-10-05 Thread Steve Ebersole
I can only speak from what I have seen in the core code. And yes, there I have often seen lookup for the same annotation multiple times. Is that worth caching? I'd have to think so. Creating javassist proxies is not cheap. On Fri 05 Oct 2012 03:59:45 AM CDT, Hardy Ferentschik wrote: > > On

Re: [hibernate-dev] Accessing annotation properties values

2012-10-05 Thread Sanne Grinovero
I have no clue on the performance impact in practice, but I'd be careful in that area. Generally I'd not discard the idea of slightly more complex code if it avoids some more proxies and save some memory, but I don't know the details here. Typesafety doesn't look like a strong argument to me as an

Re: [hibernate-dev] Documentation on OGM + JBoss AS

2012-10-05 Thread Scott Marlow
On 10/05/2012 06:16 AM, Sanne Grinovero wrote: > Thanks Scott, that documentation arrived just in time: > https://forum.hibernate.org/viewtopic.php?f=31&t=1024476 > > It looks like we could simplify things by creating an AS7 module, and > release it in tandem with an OGM release. > > What could be

[hibernate-dev] ServiceLoader and @ProviderFor

2012-10-05 Thread Steve Ebersole
https://code.google.com/p/spi/ ^^ defines an annotation and processor for helping with services in the JDK ServiceLoader sense. For example, if you wanted to implement Integrator: @ProviderFor(Integrator.class) public void class MyIntegrator implements Integrator { ... } The AP then: 1) v

Re: [hibernate-dev] Documentation on OGM + JBoss AS

2012-10-05 Thread Emmanuel Bernard
If that does not slow down the test suite significantly, I'd favor a module to limit project explosion. On 5 oct. 2012, at 06:56, Scott Marlow wrote: > On 10/05/2012 06:16 AM, Sanne Grinovero wrote: >> Thanks Scott, that documentation arrived just in time: >> https://forum.hibernate.org/viewto

Re: [hibernate-dev] Accessing annotation properties values

2012-10-05 Thread Emmanuel Bernard
Because the set of annotations is well defined, I won't if you could use an actual real implementation instead of a proxy. That's mor work but this will be much faster as we would not need to build the proxy. Alternatively, I wonder if we could cache the serialized proxy somewhere or even build