Thank you, elephantwalker!

2002-02-26 Thread Min-Hua Luo

Hi elephantwalker,

  I greatly appreciate for your answer. I want to say
that you have helped a lot of users in this communiy.
It's great to have an outstanding source like you. I'd
like to recommend your site to my friends.

  According to your answer, I think I need to implment
addToGroup method in my UserManager class. I am using
a custom UserManager (define to  tag in
orion-application.xml) that only implements
userExists, checkPassword, and inGroup methods (as in
http://kb.atlassian.com/content/orionsupport/articles/usermanager.html).
Since in my UserManager (extends SimpleUserManager)
does not implement addToGroup, I think I'll get error
if I use RoleManager.addToGroup(), right?

  Last question, in UserManager, a method named
getPassword() - it does not have username as
parameter, how do I know what username (or principal)
I need to look for password? 

  Thanks a lot for your help.


  
--- The elephantwalker <[EMAIL PROTECTED]>
wrote:
> RoleManager is a facade interface to UserManager. It
> goes something like
> this:
> 
> RoleManager <---> UserManager <> LDAP
> 
> So when you add a role, it is added to the LDAP
> datastore, not just for the
> session. You can of course remove the role when you
> log the user out, and it
> has the effect of only adding the role during the
> session.
> 
> Regards,
> 
> the elephantwalker
> www.elephantwalker.com
> 
> 
> -----Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On
> Behalf Of Min-Hua Luo
> Sent: Monday, February 25, 2002 2:09 PM
> To: Orion-Interest
> Subject: RE:
> 
> 
> Hi,
> 
>   Thanks a lot for your response. The username,
> password, and group information are stored in LDAP
> server for my project. Does roleManager.addToRole
> update LDAP server group information at the same
> time?
> Or it is just add this user to a role for current
> session only? (That is, once session is gone, this
> user still does not belongs to gold_account role).
> Thank you very much.
> 
> 
> --- The elephantwalker <[EMAIL PROTECTED]>
> wrote:
> > The addToRole() function will add a principal to
> > another role. For example,
> > if you have a gold_account role, and all your user
> > (principal)  is only a in
> > the user_account role, you can add them to the
> > gold_account role with
> > something like this...
> >
> > roleManager.addToRole(principal,"gold_account");
> >
> > you will get an error if the role "gold_account"
> > does not exist in your
> > web.xml or application.xml or ejb-jar.xml.
> >
> > Regards,
> >
> > the elephantwalker
> > www.elephantwalker.com
> >
> >
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On
> > Behalf Of Min-Hua Luo
> > Sent: Friday, February 15, 2002 4:28 PM
> > To: Orion-Interest
> > Subject:
> >
> >
> > Hi,
> >
> >   I am confused by RoleManager.addToRole()
> function.
> > It says "Adds a principal to the specified role,
> in
> > practice this usually implies adding the principal
> > to
> > the legacy groups the role encompasses". Since all
> > roles are defined in web.xml (
> tag),
> > does addToRole() function will actually update my
> > web.xml file and add a new role to
> ?
> > If
> > not, what file(s) does addToRole() will update?
> > Thanks
> > a lot.
> >
> > __
> > Do You Yahoo!?
> > Yahoo! Sports - Coverage of the 2002 Olympic Games
> > http://sports.yahoo.com
> >
> >
> >
> 
> 
> __
> Do You Yahoo!?
> Yahoo! Sports - Coverage of the 2002 Olympic Games
> http://sports.yahoo.com
> 
> 


__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com




RE:

2002-02-25 Thread Min-Hua Luo

Hi,

  Thanks a lot for your response. The username,
password, and group information are stored in LDAP
server for my project. Does roleManager.addToRole
update LDAP server group information at the same time?
Or it is just add this user to a role for current
session only? (That is, once session is gone, this
user still does not belongs to gold_account role).
Thank you very much.


--- The elephantwalker <[EMAIL PROTECTED]>
wrote:
> The addToRole() function will add a principal to
> another role. For example,
> if you have a gold_account role, and all your user
> (principal)  is only a in
> the user_account role, you can add them to the
> gold_account role with
> something like this...
> 
> roleManager.addToRole(principal,"gold_account");
> 
> you will get an error if the role "gold_account"
> does not exist in your
> web.xml or application.xml or ejb-jar.xml.
> 
> Regards,
> 
> the elephantwalker
> www.elephantwalker.com
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On
> Behalf Of Min-Hua Luo
> Sent: Friday, February 15, 2002 4:28 PM
> To: Orion-Interest
> Subject:
> 
> 
> Hi,
> 
>   I am confused by RoleManager.addToRole() function.
> It says "Adds a principal to the specified role, in
> practice this usually implies adding the principal
> to
> the legacy groups the role encompasses". Since all
> roles are defined in web.xml ( tag),
> does addToRole() function will actually update my
> web.xml file and add a new role to ?
> If
> not, what file(s) does addToRole() will update?
> Thanks
> a lot.
> 
> __
> Do You Yahoo!?
> Yahoo! Sports - Coverage of the 2002 Olympic Games
> http://sports.yahoo.com
> 
> 
> 


__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com




[no subject]

2002-02-15 Thread Min-Hua Luo

Hi,

  I am confused by RoleManager.addToRole() function.
It says "Adds a principal to the specified role, in
practice this usually implies adding the principal to
the legacy groups the role encompasses". Since all
roles are defined in web.xml ( tag),
does addToRole() function will actually update my
web.xml file and add a new role to ? If
not, what file(s) does addToRole() will update? Thanks
a lot.

__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com




getClass().getClassLoader().getResource(fileName) problem

2002-02-14 Thread Min-Hua Luo

Hi,

  I tried to open a property file from within my
custom UserManager program, however, Orion was unable
to find my file. I just don't know where should I put
my property file so it can be located by the following
command:

props_ = new Properties();
try {
  URL aURL =
getClass().getClassLoader().getResource(fileName);
  InputStream in = (InputStream)aURL.openStream();
  props_.load(in);

Thanks a lot.

__
Do You Yahoo!?
Got something to say? Say it better with Yahoo! Video Mail 
http://mail.yahoo.com




load-balancer problem

2001-10-05 Thread Min-Hua Luo

Hi,

  I have three islands and 2 orion instances per
island for clustering. In my javabean, I have a hash
table that needs to be synchronized within the same
JVM. This hash table stores information global to the
whole application. When one connection lock this
table, no other connections are allowed to access it.
This works fine if the application runs in a SINGLE
JVM. However, when I deploy this application to
multiple islands, each islands and orion within the
islands have independent JVM, thus I cannot lock a
SINGLE hash table anymore. Different connections to
different islands and/or orions will have their own
hash table within their JVM.
  So the question is, how can I configure orion load
balancer and cluster so all orion instances among all
islands share the same hash table object so I can
guarantee the single hash table locking? Thanks a lot.

James

__
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1




Re: Reading Properties File

2001-08-27 Thread Min-Hua Luo

Karl,

  I had the same problem as you. The way I solved it
was: I use new File() to create a file in the same
java program which I try to load properties. I did not
specify and directory, just a filename. Then, I search
my disk and found if you do not specify directory
name, the default directory is ORION_HOME\j2ee\home.
Therefore, I put all of my property file onto
ORION_HOME\j2ee\home and make sure I do not specify
directory path for my property files. All the
properties were loaded. 

  Whenever you have any questions, try to search
internet first, never, never try to contact Oracle.
You are just about waste your time.

  Good luck.


--- karl ng <[EMAIL PROTECTED]> wrote:
> Hi Paolo,
> 
> I have search thru the site but found nothing
> substantial useful to solve my problem.  Also, I did
> raise a tar for this problem and got no support from
> your people.  I am really getting tired of asking
> for help from oracle support.Please would
> anybody help me!
> 
> Karl.
> -Original Message-
> From: Paolo Ramasso <[EMAIL PROTECTED]>
> Date: Mon, 27 Aug 2001 08:31:23 +0200
> To: Orion-Interest <[EMAIL PROTECTED]>
> Subject: Re: Reading Properties File
> 
> 
> > ciao Karl
> > did you check the otn.oracle.com site search
> keywork oc4j or bc4j i know there are some docs
> about using bc4j with oc4j.
> > ciao
> > Paolo
> > 
> > karl ng wrote:
> > 
> > > Dear all,
> > > The following jsp demostrates the problem I
> encountered when properties file is accessed.  When
> ClassLoader is used, the properties file cannot be
> retrieved but when I use the resourcebundle class. 
> the properties get be retrieved without problems. 
> since the classloader call is used by a third party
> product bc4j and i couldn't do a modification on
> this and to change the mechanism.  I have tried to
> put all the properties into the ./lib directory as
> well as specifying them in the server.xml lib tag. 
> please help!  Please email to me if u have any
> solution.!  Many many thanks!
> > >
> > > Karl.
> > >
> > > <%@ page language = "java"
> contentType="text/html;charset=BIG5"%>
> > > <%@ page import = "java.io.*, java.util.*,
> oracle.jbo.*, javax.naming.*,
> oracle.jdeveloper.html.*,
> oracle.jbo.html.databeans.*"%>
> > > <%
> > >String result = "" ;
> > >String result1 = "" ;
> > >
> > >try {
> > >ResourceBundle bundle =
> ResourceBundle.getBundle(
> > >"connections");
> > >   
> result1=bundle.getString("CM_Connection1") ;
> > >InputStream  in =
> ClassLoader.getSystemResourceAsStream(
> > >   
> "connections.properties");
> > >
> > >if(in == null) {
> > >result = "ClassLoader is
> wrong" ;
> > >}else {
> > >result = "ClassLoader is
> correct" ;
> > >}
> > >} catch (Exception ex) {
> > >}
> > > %>
> > >
> > > -Original Message-
> > > From: "Michael J. Cannon"
> <[EMAIL PROTECTED]>
> > > Date: Wed, 22 Aug 2001 15:28:58 -0500
> > > To: Orion-Interest
> <[EMAIL PROTECTED]>
> > > Subject: Re: Reading Properties File
> > >
> > > > Excellent solution for all of our toolkits.  A
> great service.  Thank you,
> > > > Marcel.
> > > > - Original Message -
> > > > From: "Marcel Schutte" <[EMAIL PROTECTED]>
> > > > To: "Orion-Interest"
> <[EMAIL PROTECTED]>
> > > > Sent: Wednesday, August 22, 2001 12:57 PM
> > > > Subject: Re: Reading Properties File
> > > >
> > > >
> > > > > See the attached files. We use them to read
> properties files off the
> > > > > applications classpath. The properties files
> should be in the same
> > > > directory
> > > > > as the ProjectPropertiesHelper class.
> > > > > This method works in both orion1.5.2 and
> weblogic6.1
> > > > >
> > > > > Hope this helps,
> > > > > Marcel
> > > > >
> > > > > - Original Message -
> > > > > From: "Naresh Sharma" <[EMAIL PROTECTED]>
> > > > > To: "Orion-Interest"
> <[EMAIL PROTECTED]>
> > > > > Sent: Wednesday, August 22, 2001 8:50 AM
> > > > > Subject: Reading Properties File
> > > > >
> > > > >
> > > > > > Hello Everybody,
> > > > > >
> > > > > >
> > > > > > I have to read a properties file inside my
> EJB's method(I know the about
> > > > > > EJB specs. restriction).
> > > > > >
> > > > > > As far as I know, to read a properties
> file in Orion we can specify the
> > > > > > name of properties file with -p switch at
> orion server starting, or copy
> > > > > > the properties file in \lib
> directory(this directory is
> > > > > > included in classpath setting through the
> manifest file).
> > > > > >
> > > > > > This solution works for me only if i
> read the properties file using
> > > > > > getResource method of
> java.lang.Classloader for getting the
> > > > > > URL of the resource, but if i use
> getSystemResource it fails.
> > > > > >
> > > > > > 1) So what's the difference in between
> getResource and getSystem