-->
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: hibernate annotations in java EE environment
PostPosted: Thu May 22, 2008 3:19 pm 
Beginner
Beginner

Joined: Fri Jun 29, 2007 11:12 am
Posts: 25
Hello,
if i deploy all annotated classes with JPA and hibernate extensions in an Java EE server ( and include all hibernate libraries) and model DAO layer with entityManager, will be able to take advantage of hibernate extesion annotations, such as
Code:
...
@GenericGenerator (
   name = "hibernate-increment",
   strategy = "increment"
)
...
@CollectionOfElements
   @JoinTable(
   name = "USER_PHONE",
   joinColumns = @JoinColumn(name = "USER_ID"))
@CollectionId(
   columns = @Column(name = "USER_PHONE_ID"),
   type = @Type(type = "long"),
   generator = "hibernate-increment")
private Collection<Phone> phones = new ArrayList<Phone>();
...
etc

say if i deploy it on jboss 5 vs glassfish. Or would i have to get rid of all hibernate features and just keep it JPA. I really do want to keep hibernate extensions and at the same time make use of managed environment.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 23, 2008 8:03 am 
Newbie

Joined: Fri May 23, 2008 5:43 am
Posts: 13
Location: Switzerland
You can use all Hibernate features as long as you stick to Hibernate as you persistance provider. If you want to switch to TopLink than Hibernate specific features will not work. Glassfish comes with TopLink by default, but you can use Hibernate just the same.


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.