I recently upgraded my Seam libraries from 1.0.1 GA to the 9/28/2006 build.  I 
just noticed that a session bean that I've annotated with Roles doesn't seem to 
work any more - it worked with 1.0.1 GA.  When I mean work, I mean my JSF 
markup that's referencing one of the roles somehow always defaults to 
referencing the default component.

To make this a little clearer (since I probably didn't explain myself clearly 
above), I have a session bean like this:

@Name("testDefault")
  | @Roles( { @Role(name = "testAlt1"), @Role(name = "testAlt2")})
  | @Stateful
  | public class TestBean implements TestLocal {
  |    private int testProp;
  | 
  |    public void setTestProp(int inputTestProp) {
  |       testProp = inputTestProp;
  |    }
  | 
  |    public getTestProp() {
  |       return testProp;
  |    }
  | }

The testProp value is set in my components.xml file.

When I reference testAlt1 in my JSF markup like this:

#{testAlt1.testProp}

It actually retrieves the testProp value associated with the testDefault 
component rather than the testAlt1 component.  On startup, all the components 
seem to be initialized correctly (at least the Tomcat console indicates so).  
Again, my hunch of a bug lies in the fact that this portion of my code has not 
changed since I upgraded to the Sep. 28, 2006 build from 1.0.1 GA (and it was 
working in 1.0.1 GA).

When I look in the stack trace (and forgive me, I'm not familiar at all with 
the Seam source code but I'm starting to try to look at it), I notice that when 
the Interceptor object's aroundInvoke is invoked (app. 15 frames down) has a 
Component property that actually refers to testDefault instead of testAlt1 - I 
was just trying to look for references to testAlt1 in the stack trace...  When 
I look way down at where the component is initialized (I'm assuming 
Component.newInstance()), I see a reference to testAlt1 (at least in the name 
property of the Component object.  Obviously, I didn't know what the heck I was 
doing so I'm rambling here, but I thought it might be useful. For what that's 
worth.  :)

I looked over the latest documentation and I don't notice that @Roles has 
changed in use, so is this a possible bug?  Thanks!

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976139#3976139

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976139
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to