[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1670) allow multiple scopes for @In annotation
by Dan Allen (JIRA)
allow multiple scopes for @In annotation
----------------------------------------
Key: JBSEAM-1670
URL: http://jira.jboss.com/jira/browse/JBSEAM-1670
Project: JBoss Seam
Issue Type: Patch
Components: Core
Affects Versions: 2.0.0.BETA1
Reporter: Dan Allen
Priority: Minor
Fix For: 2.0.0.CR1, 2.0.0.GA, 2.0.1.GA
Right now, your only option for the scope on the @In annotation is an explicit scope or a hierarchical search of all the scopes. I can imagine that there are times when you want to look in a handful of scopes, but not all of them. For instance, anything within a conversation, but not above. Additionally, by making this a multi-value attribute, the developer can override the order in which the scopes are searched. They are searched in the order specified.
ScopeType[] scope() default {};
This would also eliminate the need for the UNSPECIFIED scope since no scopes would assume a hierarchical search. The logic that would have to change is Component#getValueToInject()
--
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
14 years, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1710) Support multiple life cycle methods (per inheritance) on JavaBean classes
by Dan Allen (JIRA)
Support multiple life cycle methods (per inheritance) on JavaBean classes
-------------------------------------------------------------------------
Key: JBSEAM-1710
URL: http://jira.jboss.com/jira/browse/JBSEAM-1710
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.0.BETA1, 2.0.0.CR1
Reporter: Dan Allen
Priority: Minor
EJB supports multiple life cycle methods for a bean, as long as two life cycle methods do not appear in the same class in the inheritance hierarchy. Thus, you can define a @PostConstruct method on the concrete class, and a different @PostConstruct method on its superclass.
As per the EJB specification (with minor corrections for clarity):
"Life cycle callback interceptor methods may be defined on super classes of the bean class, the bean class itself, or interceptor classes. However, a given class may not have more than one life cycle callback interceptor method for the same life cycle event."
The following comment is found in Component.java regarding this issue:
// TODO: check the EJB3 spec, I think you are allowed to have multiple life cycle methods on a bean!
The comment is correct in that multiple life cycle methods are not allowed on a single bean class. However, through inheritance, it is possible to have two different life cycle methods for the same Seam component.
Currently, Component#initMembers() works backwards up the inheritance chain while scanning methods. Therefore, the life cycle method on the highest member of the hierarchy currently wins. So, as it stands now, the handling of life cycle callbacks for JavaBeans is inconsistent with how they are handled by the EJB container on session and message-driven beans. I was able to verify this with a simple demonstration I conducted.
This incompatibility shouldn't be too difficult to fix. Just switch the life cycle method properties to an array and ensure that superclass methods are called first.
--
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
14 years, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1389) Please make the methods parse and createPage protected instead of private.
by Chris Rudd (JIRA)
Please make the methods parse and createPage protected instead of private.
--------------------------------------------------------------------------
Key: JBSEAM-1389
URL: http://jira.jboss.com/jira/browse/JBSEAM-1389
Project: JBoss Seam
Issue Type: Feature Request
Components: Core
Reporter: Chris Rudd
We have a dynamic routine that locates pages xml files from multiple locations. Since parse and createPage are private methods we cannot override and extend the Pages component without lifting the entire source and replicating it, or using reflection to get at those methods. Neither of these are good long term aproaches.
In general it seems that lots of the core components that one might want to extend to hook in additional functionality cannot be due to the use of private instead of protected methods.
The extended funtionality provided by the resolution to JBSEAM-715 does not rectify my issue as that relies on explitly defining the pages xml files. I believe there are several other people who are looking for a way to use an algorithm to locate them rather than a fixed list. Making those methods protected solves the problem as it allows anyone to extend the functionaliry of the Pages component to provide extended rules / algorithms for locating pages xml files, while not affecting the functionality of the core at all.
--
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
14 years, 10 months