[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2201) include <generic-type> in components.xml

Dan Hinojosa (JIRA) jira-events at lists.jboss.org
Fri Nov 2 00:42:44 EDT 2007


include <generic-type> in components.xml
----------------------------------------

                 Key: JBSEAM-2201
                 URL: http://jira.jboss.com/jira/browse/JBSEAM-2201
             Project: JBoss Seam
          Issue Type: Feature Request
            Reporter: Dan Hinojosa


I would like a generic-type allowed in components.xml so that we can have genericized beans.

For example
    <component name="productManagerBean"
               scope="SESSION"
               class="com.xyzcorp.session.SimplePersistenceManagementBean"
               generic-type="com.xyzcorp.entity.Product"
    />

This would be great so we could do some kick ass stuff like this
@Stateful
public class SimplePersistenceManagementBean<E> {
         private E entity;

         @PersistenceContext(....)
         private EntityManager em;

         public void setEntity(E entity) {
               this.entity = entity;
         }

         public void create()  {
               em.persist(e);
         }

         public void update() {
               em.merge(e);
         }

         .......
}


Now, ain't that sexy?  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list