Hi,

If you want to add constants, please do not do it in the core.  There's
a big problem currently with the amount of effort needed to add
additional Listeners (as Gavin and Kabhir discovered while doing the
ejb3 stuff).  An extra class to modify to add a new constant is not the
right direction to fix that :)

ok - i'll have a private constant party in the console then ,)

And as for building the SessionEventListenerConfig manually and passing
it to the config; that was essentially what the old code did and that
was the problem because the SessionEventListenerConfig gets passed
through (think: I build a SessionEventListenerConfig and pass it to the
Configuration, build SessionFactory, then modify the
SessionEventListenerConfig...).  Aside from forcing
SessionEventListenerConfig to be cloneable or something like that,
there's not a good way to achieve this approach.

Well - currently we do a 'if "xxx".equals(typekey) then selc.setXXXListener(create(listenervalue))'
couldn't we just as well do 'if userselc.getXXXListener()!=null then selcsetXXXListener(userselc.getXXXListener())'
?


That would still keep it safe.

/max


-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Max Rydahl Andersen Sent: Friday, January 07, 2005 5:57 AM To: Hibernate development Subject: [Hibernate] SessionEventListenerConfig no longer programatically configurable ;(

Hi guys,

The configuration of SessionEventListenerConfig was changed
recently to avoid users to mutate it after session factory creation.

This broke hibernate console (only swing version at the moment, but
mainly
the build :).

I can see there is a "TODO: ugh!" in the now new setListener() in
Configuration
which I could use instead to configure it programatically.

Does anyone have any thoughts on what that "TODO: ugh!" should be
replaced
with ?

I would like to at least add constants for all those types of even
listener
simply to avoid "mis-types" because there sure is *alot*!

But before i'll go do that - anyone with info on the TODO ? ;)




-- Max Rydahl Andersen callto://max.rydahl.andersen

Hibernate
[EMAIL PROTECTED]
http://hibernate.org

JBoss Inc
[EMAIL PROTECTED]
http://jboss.com


------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to