[
https://jira.jboss.org/jira/browse/JBSEAM-3404?page=com.atlassian.jira.pl...
]
Luis Tama commented on JBSEAM-3404:
-----------------------------------
With or without my extended identity component, I can notice this in the Initialization
log:
When using Seam 2.1.0.BETA1, during Seam Initialization we have:
...
15:33:56,796 INFO [Initialization] initializing Seam
15:33:57,046 INFO [Initialization] two components with same name, higher precedence wins:
org.jboss.seam.core.manager
15:33:57,046 INFO [Initialization] two components with same name, higher precedence wins:
org.jboss.seam.transaction.synchronizations
15:33:57,078 INFO [Initialization] two components with same name, higher precedence wins:
org.jboss.seam.core.expressions
15:33:57,093 INFO [Initialization] two components with same name, higher precedence wins:
org.jboss.seam.core.resourceLoader
15:33:57,093 INFO [Initialization] two components with same name, higher precedence wins:
org.jboss.seam.web.parameters
15:33:57,109 INFO [Initialization] two components with same name, higher precedence wins:
org.jboss.seam.core.locale
15:33:57,109 INFO [Initialization] two components with same name, higher precedence wins:
org.jboss.seam.core.locale
15:33:57,109 INFO [Initialization] two components with same name, higher precedence wins:
org.jboss.seam.persistence.persistenceProvider
15:33:57,109 INFO [Initialization] two components with same name, higher precedence wins:
org.jboss.seam.web.isUserInRole
15:33:57,125 INFO [Initialization] two components with same name, higher precedence wins:
org.jboss.seam.web.userPrincipal
15:33:57,140 INFO [Component] Component: org.jboss.seam.core.init, scope: APPLICATION,
type: JAVA_BEAN, class: org.jboss.seam.core.Init
15:33:57,187 INFO [Initialization] Installing components...
15:33:57,250 INFO [Component] Component: entityManager, scope: CONVERSATION, type:
JAVA_BEAN, class: org.jboss.seam.persistence.ManagedPersistenceContext
...
And when using Seam.2.1.0-SNAPSHOT # 309, we have:
...
15:26:09,593 INFO [Initialization] initializing Seam
15:26:09,718 INFO [Initialization] two components with same name, higher precedence wins:
org.jboss.seam.core.expressions
15:26:09,718 INFO [Initialization] two components with same name, higher precedence wins:
org.jboss.seam.core.locale
15:26:09,734 INFO [Initialization] two components with same name, higher precedence wins:
org.jboss.seam.web.parameters
15:26:09,750 INFO [Initialization] two components with same name, higher precedence wins:
org.jboss.seam.core.resourceLoader
15:26:09,750 INFO [Initialization] two components with same name, higher precedence wins:
org.jboss.seam.core.manager
15:26:09,750 INFO [Initialization] two components with same name, higher precedence wins:
org.jboss.seam.web.userPrincipal
15:26:09,765 INFO [Initialization] two components with same name, higher precedence wins:
org.jboss.seam.core.locale
15:26:09,765 INFO [Initialization] two components with same name, higher precedence wins:
org.jboss.seam.persistence.persistenceProvider
15:26:09,765 INFO [Initialization] two components with same name, higher precedence wins:
org.jboss.seam.web.isUserInRole
15:26:09,765 INFO [Initialization] two components with same name, higher precedence wins:
org.jboss.seam.transaction.synchronizations
15:26:09,796 INFO [Component] Component: org.jboss.seam.core.init, scope: APPLICATION,
type: JAVA_BEAN, class: org.jboss.seam.core.Init
15:26:09,859 INFO [Initialization] Installing components...
15:26:09,921 INFO [Component] Component: entityManager, scope: CONVERSATION, type:
JAVA_BEAN, class: org.jboss.seam.persistence.ManagedPersistenceContext
...
Note that org.jboss.seam.cache.cacheProvider and org.jboss.seam.security.identity do not
appear in the Initialization log for SNAPSHOT... May that have something to do with the
issue? Why is this happening?
Extended Identity component is not being loaded during Initialization
process
-----------------------------------------------------------------------------
Key: JBSEAM-3404
URL:
https://jira.jboss.org/jira/browse/JBSEAM-3404
Project: Seam
Issue Type: Bug
Components: Core, Security
Affects Versions: 2.1.0.BETA1
Environment: Windows XP SP2, JDK 1.5.0_16, JBoss AS 4.2.2.GA, Eclipse JEE Europa
Winter (3.3.2), JBoss Tools 2.1.2.GA, JBoss Seam 2.1.0.BETA1 and 2.1.0-SNAPSHOT # 309
Reporter: Luis Tama
Assignee: Shane Bryzak
Attachments: home.page.xml, Identity.java
I have this Extended Identity component, which lets me render different home pages
according to the user roles:
@Name("org.jboss.seam.security.identity")
@Scope(ScopeType.SESSION)
@Install(precedence = Install.APPLICATION)
@BypassInterceptors
@Startup
public class Identity extends org.jboss.seam.security.Identity {
private static final String DEFAULT_HOME_PAGE = "/home/home.xhtml";
private String homePage = DEFAULT_HOME_PAGE;
// getter and setter for homePage, and business logic
// and some other important properties related to my business model...
}
In Seam 2.1.0.BETA1, it works fine:
...
21:53:16,159 INFO [Initialization] Installing components...
...
21:53:16,921 INFO [Component] Component: org.jboss.seam.security.identity, scope:
SESSION, type: JAVA_BEAN, class: org.ostion.siplacad.session.Identity
...
In Seam 2.1.0-SNAPSHOT # 303, it's not being loaded:
...
21:55:54,125 INFO [Initialization] Installing components...
...
21:55:55,500 INFO [Component] Component: org.jboss.seam.security.identity, scope:
SESSION, type: JAVA_BEAN, class: org.jboss.seam.security.Identity
...
21:55:56,765 INFO [Initialization] two components with same name, higher precedence
wins: org.jboss.seam.security.identity
...
So I can't access identity.homePage from my webapp. I can see this exception in
debug.seam:
Exception during request processing:
Caused by javax.el.MethodNotFoundException with message: "Method not found:
org.jboss.seam.security.Identity(a)9527ee.renderHomePage()"
...
I will not post the full stack trace, because the obvious reason for the problem is that
the extended component is not being loaded by Seam.
I checked Seam source code, comparing versions BETA1 and SNAPSHOT # 303:
Class org.jboss.seam.Component has no changes between versions.
Class org.jboss.seam.security.Identity has changed, but i don't think there is a
problem there.
Class org.jboss.seam.init.Initialization does have some changes, specially regarding
hotDeploymentStrategy. I guess there is a problem is with the hacks over there.
Please check this. I must tell I switched to the SNAPSHOT to not have the "NPE with
hot Redeployment" issue, but now I can't even see my webapp!!
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira