[hibernate-dev] Jandex 2.0 Beta - Java 8 Type Annotations, Generics, & Offline Reflection

Hardy Ferentschik hardy at hibernate.org
Tue Dec 2 05:29:50 EST 2014


Hi,

> > In Search we have been talking for a long time to get rid of Commons
> > Annotations. It is basically already possible
> > now (using Jandex 1), but it got pushed back so far. Now with Jandex 2 we
> > definitely should make the switch. Maybe Search 5.1?
> >
> 
> Out of interest, what would be the benefit for Search?

Getting rid of Commons Annotations. That is a long standing task. The annotation
processing code could be simplified a fair bit in this case. 

The other advantage would be that in the case where Search is running in the container,
we could just take an existing Jandex index at bootstrap (instead of building one ourselves).
This would give a bit of boot speed-up. 

> > Last but not least Validator, there we have been talking about Jandex for
> > a while as well. The new version would not have
> > the benefit of being able to remove the dependency to classmate.
> 
> I guess you mean it *would have* the benefit, right?

sure :-)

> Of course that comes at the price of adding another dependency, so that's
> not really an advantage per se for me :)

Not per se, but we already talked about consuming a Jandex index as part of the 
Bean Validation integration into Wildfly using CDI. In fact you seemed to be quite 
keen back then to give it a go. Now we could do it without increasing the amount of
dependencies. 

> I think we should have a look at this Beta and provide feedback to Jason if
> > we find any problems. I am for sure to have a look
> > at it in the context of Validator.
> >
> 
> I find being able to re-use the index generated by the application
> container very useful. It would give a nice performance boost out of the
> box when using HV on WildFly/EAP.

Exactly.

> The type annotation stuff may be useful, but it's not that this information
> cannot be accessed via reflection at all. There are known issues with
> corner cases, though. So Jandex may improve the situation for us.

My hope is that code would be simpler by using a single library for doing all
reflection stuff including Java 8 type annotations, generic type resolution, etc

> I'm asking to make sure we're on the same page regarding what we expect
> from using Jandex in terms of user-visible features/improvements.

Right, this is not about adding new features for the user. The user might get some 
speed-up and maybe less memory consumption, but otherwise we are talking about 
internal changes.

--Hardy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 496 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/hibernate-dev/attachments/20141202/ffc1ba52/attachment-0001.bin 


More information about the hibernate-dev mailing list