[hibernate-dev] Release Connection provider resources
Steve Ebersole
steve at hibernate.org
Wed Jun 1 05:13:34 EDT 2011
Have a look at the latest sources in git...
On Jun 1, 2011 4:12 AM, "Dmitry Geraskov" <dgeraskov at exadel.com> wrote:
> Sorry, Steven I didn't understand, could you please rephrase.
>
> PS. I use hibernate-release-4.0.0.Alpha3.
>
> 01/06/2011 12:08, Steve Ebersole wrote:
>>
>> The current state of master is no longer using proxies for services.
>>
>> But regardless this usage here was never the intent of Unwrappable
>> which is instead meant to give you access to wrapped objects (the
>> datasource of a datasource connection provider, e.g.).
>>
>> On Jun 1, 2011 3:37 AM, "Dmitry Geraskov" <dgeraskov at exadel.com
>> <mailto:dgeraskov at exadel.com>> wrote:
>> > Sure the proxy implements Service as actually it implements
>> > ConnectionProder which is a rg.hibernate.service.Service and
>> > org.hibernate.service.spi.Wrapped.
>> >
>> > 01/06/2011 11:25, Sanne Grinovero wrote:
>> >> 2011/6/1 Dmitry Geraskov<dgeraskov at exadel.com
>> <mailto:dgeraskov at exadel.com>>:
>> >>> Hey, guys,
>> >>>
>> >>> in Hibernate 3 you had ConnectionProvider#close() method which
>> releases
>> >>> all the resources used by the connection provider.
>> >>> In hibernate 4 ConnectionProvider is a service without this
>> method, but
>> >>> you have Stoppable interface with stop() method which I guess do
>> this work.
>> >>> But the problem is I can't use instanceof to determine whether
current
>> >>> connection provider is Stoppable, because internally hibernate
>> uses proxyes.
>> >> I'd expect this proxy to implement the service interface, is that
>> not the case?
>> >>
>> >>> What is right way to replace old ConnectionProvider#close()?
>> >>>
>> >>> Dmitry Geraskov
>> >>> _______________________________________________
>> >>> hibernate-dev mailing list
>> >>> hibernate-dev at lists.jboss.org <mailto:hibernate-dev at lists.jboss.org>
>> >>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>> >>>
>> > _______________________________________________
>> > hibernate-dev mailing list
>> > hibernate-dev at lists.jboss.org <mailto:hibernate-dev at lists.jboss.org>
>> > https://lists.jboss.org/mailman/listinfo/hibernate-dev
More information about the hibernate-dev
mailing list