[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3404) Extended Identity component is not being loaded during Initialization process

Luis Tama (JIRA) jira-events at lists.jboss.org
Thu Sep 18 08:21:20 EDT 2008


    [ https://jira.jboss.org/jira/browse/JBSEAM-3404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12430189#action_12430189 ] 

Luis Tama commented on JBSEAM-3404:
-----------------------------------

Thanks Shane,

I just deleted Initialization.class from jboss-seam.jar, made the changes by hand to Initialization.java and added it to my source code so it is part of my project in package org.jboss.seam.init (all this because there is no nightly build yet, and I really don't know yet how to use SVN, Maven, etc. :-). I think this is not a big problem, is it?

So, It works fine, the components are deployed and are resolved. But there is a new issue... (should I reopen this issue or create a new one?)

When I make any little change in my xhtml pages, the whole app gets redeployed (or at least some components). As I can remember, Seam redeploys the whole app only when the session is quite dirty or the app is using old code. But that is not the case with every xhtml page.

Try this and you'll see:

- Still using my extended Identity component and the home.page.xml that uses my Identity#renderHomePage() method.
- Also using Eclipse with JBoss Tools and all the environment I listed (maybe not everything is important).
- Deploy the app. My components get loaded fine.
- Navigate to http://localhost:8080/siplacad2/. We get this log:
07:03:19,790 INFO  [Identity] Rendering Home Page: /home.xhtml
- Login with any user and password. Everything fine up to here. We get this log:
07:04:01,555 INFO  [Authenticator] authenticating luiggitama
07:04:01,602 INFO  [Identity] Rendering Home Page: /home.xhtml
- Make any small change in home.xhtml, e.g. add any word in the description of "This empty shell application includes:", maybe "...includes a lot of things:". Wait until the changes are automatically published/redeployed to JBoss AS. The problem is that my components get redeployed and the session is invalidated, so I must login again. This is the log:
07:08:32,790 INFO  [Initialization] redeploying
07:08:32,899 INFO  [Initialization] Installing components...
07:08:32,899 INFO  [Component] Component: authenticator, scope: EVENT, type: JAVA_BEAN, class: org.ostion.siplacad2.session.Authenticator
07:08:32,899 INFO  [Component] Component: org.jboss.seam.security.identity, scope: SESSION, type: JAVA_BEAN, class: org.ostion.siplacad2.session.Identity
07:08:32,899 INFO  [Initialization] done redeploying
07:08:32,915 INFO  [Identity] Rendering Home Page: /home.xhtml
- This happens even when making the same kind of small changes to any other page, say "test.xhtml" which could be a copy of home.xhtml. I do not need to be navigating to that page to get the problem. So the problem is not in the home.page.xml. I thinks it is still a problem with component hot (re)deployment...

So, with this new bug, my app or at least my components get redeployed and the session gets invalidated, so I lose a lot of time in the development process, having to login every time I make a change to my pages. BTW, testing in my real project depends on a real session working, so turning off security is not an option.

I'll wait for your comments... Thanks in advance...


> 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
>             Fix For: 2.1.0.CR1
>
>         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 at 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

        



More information about the seam-issues mailing list