Good point. However, our User and Group EJBs are exclusively CMP - we don't
get any DataSources outside of the constructor or inside it. We'll give the
delegate-to-parent-UserManager trick a shot, but I still think that such
things should be unnecessary. Why should the fact that a client is an
Application Client Module rather than a Web Module make any difference to
the way UserManager implementations work?

P. Pontbriand
Canlink Interactive Technologies Inc.

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Cc: "Orion-Interest" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Friday, March 16, 2001 11:51 AM
Subject: Re: Custom UserManager.


>
> When using a custom user manager with an application, you must make sure
> you are getting your DataSource references in the constructor.
> This is extremely important.  If you try to lookup the DataSource outside
> of the constructor, you will have all sorts of problems.  Do something
> like this...
>
> private DataSource ds;
>
> public MyUserManager() {
>      ...
>    try {
>             InitialContext context = new InitialContext();
>             ds = (DataSource) context.lookup("jdbc/OraclePooledDS");
>         }
>         catch (NamingException ne) {
>             ne.printStackTrace();
>         }
> }
>
> public Connection getConnection() throws SQLException {
>      return ds.getConnection();
> }
>
> James Birchfield
>
> Ironmax
> maximizing your construction equipment assets
> 5 Corporate Center
> 9960 Corporate Campus Drive,
> Suite 2000
> Louisville, KY 40223
>
>
>
>                     "Peter Pontbriand"
>                     <peter.pontbriand@canlink.        To:
Orion-Interest <[EMAIL PROTECTED]>
>                     com>                              cc:
>                     Sent by:                          Subject:     Re:
Custom UserManager.
>                     owner-orion-interest@orion
>                     server.com
>
>
>                     03/16/01 10:14 AM
>                     Please respond to
>                     Orion-Interest
>
>
>
>
>
>
> The DataSourceUserManager that is provided with Orion exhibits this same
> problem - the principals.xml must still contain the group declarations.
> We've created out own custom UserManager that uses our User and Group
EJBs.
> This custom user manager will work fine for EJB and Web modules without
> anything in the principals.xml, but it fails miserably with Application
> Client modules. It is impossible to login with Application Clients no
> matter
> what's in the DB or in principals.xml.
>
> P. Pontbriand
> Canlink Interactive Technologies Inc.
>
>
> ----- Original Message -----
> From: "Christian Billen" <[EMAIL PROTECTED]>
> To: "Orion-Interest" <[EMAIL PROTECTED]>
> Sent: Friday, March 16, 2001 2:17 AM
> Subject: RE: Custom UserManager.
>
>
> > I don't know what type of User manager you made, but I had problems
using
> > EJBUserManager, I had to leave the principals.xml containing all my
> groups
> > (not my users) and the link to it in orion-application.xml.  I struggled
> for
> > a while on this since it doesn't make sense as all my users are in the
> > database. Maybe it is something related somehow and you could try it
out?
> >
> > Christian
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED]]On Behalf Of Michael
Gantz
> > > Sent: Thursday, March 15, 2001 11:40 PM
> > > To: Orion-Interest
> > > Subject: Custom UserManager.
> > >
> > >
> > > Server : Orion-1.4.5
> > >
> > > I've created a custom UserManager and referenced it in
application.xml,
> > > I've taken out the principal tags in all the other files.  Here is my
> > > problem: my custom user manager loads up and the init method gets
> called
> > > but that's it.  The server never calls getUser on my user manager.
I'm
> > > very sure I'm missing something really silly and simple but I can't
> find
> > > it due to the complete lack of adequate documentation.
> > >
> > > Thanks in advance.
> > >
> > > Michael L. Gantz
> > >
> > >
> > >
> > >
> >
> >
> >
>
>
>
>
>
>
>
>


Reply via email to