Results 1 to 5 of 5

Thread: How to disable Hibernate serialization/deserialization support??

  1. #1
    Join Date
    Jun 2010
    Posts
    3

    Question How to disable Hibernate serialization/deserialization support??

    Hi all,

    I just need to disable Hibernate serialization/deserialization support?

    We are using Hibernate with DTO pattern and we don't want serializing model entities.

    I don't understand why the Hibernate serialization/deserialization support is automatically configured. It should be done on demand inside messageBroker configuration:

    <flex:message-broker>
    <flex:config-processor /> <!-- enable defaut jpa processor -->
    </flex:message-broker>

    Should I create a Jira issue for that?

    Best regards,

    Remi

  2. #2
    Join Date
    Jun 2010
    Posts
    3

    Default

    Jeremy ? Any idea about this problem?

  3. #3
    Join Date
    Jan 2012
    Posts
    4

    Default

    I had the same problem and I solved it by extending HibernateConfigProcessor:

    Code:
    public class DisableHibernateConfigProcessor extends HibernateConfigProcessor
    {
    	@Override
    	public void afterPropertiesSet() throws Exception
    	{
    		// do nothing
    	}
    }
    and setting it as a config-processor to the message-broker:

    Code:
    	<flex:message-broker
    		services-config-path="classpath:flex/services-config.xml"
    		disable-default-mapping="false"
    	>
    		<flex:config-processor ref="disableHibernateProcessor"/>
    		<flex:remoting-service default-channels="mainChannel,messagingChannel"/>
    		<flex:secured />
    	</flex:message-broker>
    
    	<bean id="disableHibernateProcessor" class="your.package.DisableHibernateConfigProcessor">
    	</bean>
    Regards,
    Markus

  4. #4
    Join Date
    Feb 2012
    Posts
    1

    Thumbs up

    Hello,

    I also had the same problem and the solution given by pappnas worked perfectly, so thank you very much.
    I agree with the fact that the hibernate serialization support should not be automatically enabled just by scanning the classpath for the hibernate libraries availability...
    I also use DTOs so there is no need to carry hibernate entities through AMF.
    More important: I use hibernate 4 and this automatic initialization simply... fails!

    Well, maybe this support for hibernate/JPA should not be activated automatically and maybe the spring-flex support should be upgraded to support hibernate 4.

    Regards,

    Benoit

  5. #5
    Join Date
    Nov 2005
    Posts
    5

    Default

    I provided a opensource for Hibernate lazy loading issue.
    http://code.google.com/p/rich-hibernate-lazy/

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •