BENJAMIC at uk.ibm.com
Fri Mar 8 11:29:14 EST 2019
Indeed I have tried that as an experiment, I got the following error when
Caused by: java.lang.ClassCastException: Cannot cast class
com.sun.proxy.$Proxy22 to interface
That was more or less what I expected so I didn't think much of it at the
time, but from your email it sounds like this isn't what you'd expect?
If it helps I'm running with hibernate-core-5.4.1.Final.jar - I'm not sure
what other info will help you but if you let me know I can send it over.
From: Yoann Rodiere <yoann at hibernate.org>
To: Benjamin Confino <BENJAMIC at uk.ibm.com>
Cc: Hibernate Dev <hibernate-dev at lists.jboss.org>
Date: 08/03/2019 15:52
Subject: Re: [hibernate-dev] ExtendedBeanManager
Sent by: hibernate-dev-bounces at lists.jboss.org
It's supposed to work as you described.
Have you tried making your class implement *only* ExtendedBeanManager?
It should have worked even if your class implements both, but there might
be a bug... As far as I know we only ever pass objects implementing either
BeanManager or ExtendedBeanManager, never both.
Hibernate NoORM Team
yoann at hibernate.org
On Fri, 8 Mar 2019 at 11:16, Benjamin Confino <BENJAMIC at uk.ibm.com> wrote:
> I'm attempting to write a prototype implementation for Hibernate's
> Extended Bean Manager and I seem to have hit a problem. I have placed a
> proxy class that implements both BeanManager and ExtendedBeanManager
> the property javax.persistence.bean.manager. I can see that the
> handler for the proxy is being called by hibernate, but there is no call
> to registerLifecycleListener. Instead I see hibernate trying to use the
> bean manager before it has been initialised.
> Do I need to do anything extra to configure hibernate? I was under the
> impression that if the object in javax.persistence.bean.manager
> implemented ExtendedBeanManager everything would automatically be
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
hibernate-dev mailing list
hibernate-dev at lists.jboss.org
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
More information about the hibernate-dev