Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Strange error with Custom User Registry

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I am implementing a customer user Registry for Websphere App Server 5.0 on WSAD 5.1. In the method
public List getUniqueGroupIds(String uniqueUserID)
This method is used to return the list of Groups a user may belong to. Here is a first extract of code of that method
String role1="ROLE1";
String role2="ROLE2";
groupList.add("ROLE1");
groupList.add("ROLE2");
return groupList;
Then I login a page restricted to ROLE1 only, WAS refuses access saying that the user is not granted the "ROLE1" role.
I switch to the following code:
groupList.add(Constants.ROLE1);
groupList.add(Constants.ROLE2);
return groupList;
Where Constants.ROLE1 has the declared value of "ROLE1"
Then I login a page restricted to ROLE1 only, WAS granted the user with ROLE1!
What's wrong the the groupList constructed from dynamically generated Strings?
I don't know how WAS handle String pool here? Can any body explain?
Thanks
 
Yeast devil! Back to the oven that baked you! And take this tiny ad too:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic