|
Ok, after spending half my weekend prowling through old
archive lists I think I've found how to programmatically log in a user and
manage user configurations from a stand-alone client (in theory at least).
Now if it can just get it working ...
First of all, what do you have to do to get an instance of
RoleManager? I've tried the code below as recommended in a couple emails,
but I always get a naming exception - NameNotFoundException. I'm guessing
that I have to explicitly deploy this thing, but I don't have a clue how to
since it's buried in the orion.jar file and does not contain a ejb-jar.xml
file. (Possibly, do I have to add some reference to the
application-client.xml file?) This is basically the same question as
http://www.mail-archive.com/[email protected]/msg06969.html
which never got a good answer.
RoleManager roleMgr =
(RoleManager)
(new InitialContext()).lookup( "java:comp/RoleManager" ); If I can get the RoleManager working properly, I'll be happy
for a while. By the way, I assume that the RoleManager is how the Orion
web server manages to maintain the principal for the current user ... I'm trying
to manage user sessions the same way Orion does on the web server side where a
user request comes in asynchronously with a session ID, and the request gets
mapped over to the proper Principal before any bean methods are
called.
The other question has to do with using the User
Manager. When I add the following to my orion-application.xml I get the
NamingException when it is deployed. What is the trick to doing
this? According to one poster, the atm example demonstrated this, but I
must have a different version of the atm example.
<user-manager
class="com.evermind.ejb.EJBUserManager">
<property name="home" value="com.evermind.ejb.EJBUser" /> <property name="defaultGroups" value="users" /> </user-manager>" Finally, a tutorial for usermanager stuff was started over at
Orionsupport.com, but never finished. Is there a new version of
this? Here is the url I have: http://www.orionsupport.com/tutorials/usermanager/intro.jsp
Thanks,
John
I get "Error updating application estore: Error initializing userManager 'com.evermind. ejb.EJBUserManager': NamingException: com.evermind.ejb.EJBUser not found" when I try it. |
- RE: How to get RoleManager / setup UserManager John Pletka
- RE: How to get RoleManager / setup UserManager Marcel Schutte
- RE: How to get RoleManager / setup UserManager Marcel Schutte
