<div dir="ltr"><div><div>It depends if you are going to shade all the javassist classes or just the "javassist.util.proxy" package (not sure if this is actually possible with the shade plugin). <br><br></div>The main advantage is that you can upgrade javassist to get fixes to issues that affect bytecode generation. So if JDK9 comes out with new bytecodes that the current version of Javassist does not understand then upgrading javassist will allow the older version of hibernate to work with classes compiled against the newer JDK version. If all of javassist is shaded into hibernate then that version of hibernate will never work with the newer bytecodes.<br><br></div><div>I think this is less of an issue if you are still publishing the non-Javassist shaded hibernate as well as a shaded version, but if the only published artifact has javassist shaded in then it may limit forward compatibility.<br></div><div><br></div>Stuart<br><div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, 12 Feb 2016 at 12:53 Steve Ebersole <<a href="mailto:steve@hibernate.org">steve@hibernate.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Ugh. That is an awful lot of classes copied over. What exactly was the benefit of this over shading again? I mean both case lose the ability to simply drop in fixes from upstream Javassist. So what does this "clone" approach gain versus shadowing?</div><div><br></div><div><br></div></div><br><div class="gmail_quote"></div><div class="gmail_quote"><div dir="ltr">On Thu, Feb 11, 2016 at 7:13 PM Scott Marlow <<a href="mailto:smarlow@redhat.com" target="_blank">smarlow@redhat.com</a>> wrote:<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">>><br>
>> On 02/11/2016 03:02 PM, Stuart Douglas wrote:<br>
>> > Have you considered a 3rd alternative, which is to use a custom<br>
>> > ProxyFactory instead of javassists built in one?<br>
>> ><br>
>> > AFAIK the main issue is that javassist proxies require access to the<br>
>> > 'javassist.util.proxy.MethodHandler|RuntimeSupport' classes. You<br>
>> could<br>
>> > create a similar org.hibernate interface, and a proxy factory<br>
>> that uses<br>
>> > this method handler instead.<br>
>> ><br>
>> > Basically you just copy the code from javassist.util.proxy into<br>
>> > hibernate. This is a relatively small amount of code, so it<br>
>> should not<br>
>> > really add any maintenance burden.<br>
>><br>
>> We talked about this as well via [1]. I understand the concept but have<br>
>> not tried doing this. I like this approach as well, if it works. One<br>
>> of the cons with cloning that Steve Ebersole pointed out (see response<br>
>> on Feb-03-2016 9:01am), is that that users lose the ability to drop a<br>
>> different version of Javassist in (since we maintain our own cloned copy<br>
>> of the Javassist proxy/runtime code).<br>
>><br>
>><br>
>> The proxy code is a relatively small part of javassist, so unless a bug<br>
>> is in the proxy code itself this should not be that big a deal.<br>
><br>
> Thanks for the encouragement to go down this path. :)<br>
><br>
<br>
Started a hack attempt at the clone via<br>
<a href="https://github.com/scottmarlow/hibernate-orm/tree/javassistproxy" rel="noreferrer" target="_blank">https://github.com/scottmarlow/hibernate-orm/tree/javassistproxy</a>. Seems<br>
to pass the Hibernate ORM unit tests.<br>
<br>
Scott<br></blockquote></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
_______________________________________________<br>
wildfly-dev mailing list<br>
<a href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.jboss.org</a><br>
</blockquote></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a><br>
</blockquote></div>
</blockquote></div>