These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Comment mapper un singleton ?
PostPosted: Thu Nov 23, 2006 6:00 am 
Beginner
Beginner

Joined: Tue Mar 07, 2006 8:50 am
Posts: 20
Salut

Je rencontre un petit problème quand j'essaye de mapper un singleton en utilisant Hibernate.
En fait, il n'y aucun moyen de spécifier une méthode statique à utiliser (du genre "GetInstance"), parce que Hibernate essaye toujours d'appeller le constructeur par défaut de la classe mappée.
Qqn voit une solution pour que ça fonctionne ?

Merci


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 23, 2006 12:16 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Un singleton ne peut pas être mappé parce que cela voudrait dire que ton objet est partagé par plusieurs sessions. Ce va a l'encontre du design d'Hibernate et l'ACIDité de tes données

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.