... finally managed to use EntitiHome in my project, however this code works:
<factory name="user"
| value="#{userHome.instance}"/>
|
| <framework:entity-home name="userHome"
| entity-class="myPackage.User"
| entity-manager="#{entityManager}" />
while this one does not:
@Name("userHome")
| @Scope(ScopeType.CONVERSATION)
| public class UserHome extends EntityHome<User> {
|
| @In EntityManager entityManager ;
|
| @RequestParameter Long userId ;
|
| @Factory("user")
| public User initUser() { return getInstance() ; }
|
| @End
| public String persist() {
| super.persist() ;
| return "users" ;
| }
|
| @End
| public String update() {
| setId( userId ) ;
| super.update() ;
| return "users" ;
| }
|
| @End
| public String remove() {
| setId( userId ) ;
| super.remove() ;
| return "users" ;
| }
|
| @Destroy @Remove
| public void destroy() {}
|
| }
... everything else is the same.
... is this a bug ? or am I missing something ? I believe it's better to use
inheritance to add some extra features by hand, but I can't :(
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4019144#4019144
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4019144
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user