|
From: <jue...@we...> - 2004-06-16 07:42:03
|
HibernateDaoSupport's protected accessors should usually be good enough =
- they allow access in subclasses, which is what you typically want.
=20
Regarding the Configuration object: You can fetch the =
LocalSessionFactoryBean itself via getBean("&sessionFactory"), i.e. a =
prefixed "&" to get the FactoryBean itself rather than the =
SessionFactory it creates. This will also work via a bean reference.
=20
The standard HibernateDaoSupport base class shouldn't have a =
Configuration property, I believe, as this is hardly ever needed. I =
suggest to expose a separate property of type LocalSessionFactoryBean in =
your DAO class, pass "&sessionFactory" in, and fetch the Configuration =
object from there.
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von snpe
Gesendet: Mi 16.06.2004 06:58
An: spr...@li...
Betreff: Re: [Springframework-developer] Hibernate Configuration and =
SessionFactory
Hi Dmitriy,
You are correect - I use spring 1.0.1, but I have current cvs
There is public method getConfiguration in LocalSessionFactoryBean, but =
I don't know how I can get instance this class
I can get hibernate metadata from SessionFactory, but I can't get =
database metadata (for instance length) without Configuration
Is it possible export Configuration to HibernateDaoSupport ?
Is current cvs stable or I have to checkout version 1.0.2 ?
Thanks
On Wednesday 16 June 2004 03:17 am, Dmitriy Kopylenko wrote:
> Haris,
>
> what version of Spring are you using? As of 1.0.2 the visibility of
> HibernateDaoSupport's resource factory accessors has been changed to
> *public*.
>
> I'm not sure about how you would get hold of Configuration instance =
though.
>
> Regards,
> Dmitriy.
>
>
> snpe wrote:
>
> >Hello,
> > I want use SessionFactory and Configuration classes for metadata =
API (property name type, database name, type, length etc)
> >I use spring's HibernateDaoSupport, but getSessionFactory is =
protected and I can't use it in my DAO (why ? - I can make method for =
get SessionFactory,
> >but I don't know why this is protected/forbiden)
> >
> >How I get instance classes Configuration and SessionFactory ?
> >
> >regards
> >Haris Peco
> >
> >
> >-------------------------------------------------------
> >This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
> >Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
> >Conference, June 28 - July 1 at the Moscone Center in San Francisco, =
CA
> >REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code =
NWMGYKND
> >_______________________________________________
> >Springframework-developer mailing list
> >Spr...@li...
> =
>https://lists.sourceforge.net/lists/listinfo/springframework-developer
> >=20
> >
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
> Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
> Conference, June 28 - July 1 at the Moscone Center in San Francisco, =
CA
> REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code =
NWMGYKND
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|