Hi,

This should definitely NOT be how they work....

Okay, on second thought, this was not a particulary good idea ;)


I will have another workover tomorrow evening, and try to make them Configuration-Local somehow. I am not sure however this works without some refactoring of the TypeFactory/SimpleValue structure.

Michael

..but they do! ;)

The following line is called on each <typedef> in hbm.xml: TypeFactory.addTypeDef(typeName, typeClass, paramMap);

I guess it because most of the other code go look via TypeFactory.heursistType() to decide stuff....

I've worked around this suttlety by having the typedefs as part of the configuration and when it is deserialized it re-registers the TypeDef's.
I know this is definitly not how it should be done ideally, but it makes configuration seriializable.


I guess someone should go have a second look at the Typedef stuff to see if it could be made Configuration/sessionfactory-local instead of java vm global.

/max


Max Rydahl Andersen wrote:


Hi all,

While trying to make Configuration serializable I bumped into the new <typedef> feature (because the typedef's are not part of the configuration, thus not very "findable" after a deserialization)

Is it really intentional that the typedef's are going to be added to the VM-wide TypeFactory static variables ?
That does not "feel" very safe in my book ;)


Is there no other alternative ? Like having them local to the configuraiton/sessionfactory ?

Best regards,
Max


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel








-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel




-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to