Thanks for that. It'll probably come as no surprise to you that the
resource adapter I am looking at does not have a no-arg constructor for its
ManagedConnection object (JmsSession). I have attempted to make this work,
but would appreciate another pair of eyes. I'm specifically curious as to
whether there is a "better" way. I'm not mad keen on using Unsafe, but will
note that all our no-interface proxy code uses it, so if we wanted to
eliminate it, we'd need to work in that area too. I also had a go at
extending the test to cover this, and would appreciate any thoughts there
too.

Here's my attempt:
https://github.com/apache/tomee/pull/80/commits/4e69b3fe8d640445cf90a9a94d8c132e52535939

Thanks

Jon

On Wed, Jun 28, 2017 at 11:02 PM, Romain Manni-Bucau <[email protected]>
wrote:

> +1, think hazelcast was doing it too at some point (never got why it was
> often done with a spec making interfaces the first citizen ;))
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://blog-rmannibucau.rhcloud.com> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/
> rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
> <https://javaeefactory-rmannibucau.rhcloud.com>
>
> 2017-06-29 0:00 GMT+02:00 Jonathan Gallimore <[email protected]
> >:
>
> > Hi
> >
> > Does anyone have any objections to this change being backported to
> > tomee-1.7.x:
> > https://github.com/apache/tomee/commit/64ca1f3e9f7965d35e7a70a06ae604
> > 41d026c9a1
> > ?
> >
> > I'm specifically looking to use this resource adapter:
> > https://github.com/jms-ra/generic-jms-ra/tree/1.x with 1.7.x which
> > requires
> > this change as it tries to cast a ManagedConnection object back to the
> > actual class.
> >
> > My specific backport with merge issues and J7 -> J6 issues resolved is
> here
> > for review: https://github.com/apache/tomee/pull/80
> >
> > The original patch and issue details are here:
> > https://issues.apache.org/jira/browse/TOMEE-1908
> >
> > Thanks,
> >
> > Jon
> >
>

Reply via email to