[
http://jira.jboss.com/jira/browse/JBSEAM-2201?page=all ]
Pete Muir updated JBSEAM-2201:
------------------------------
Component/s: Core
Priority: Minor (was: Major)
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
Components: Core
Reporter: Dan Hinojosa
Priority: Minor
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