You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by sreepriya ramakrishnan <sr...@yahoo.com> on 2006/11/15 18:44:00 UTC

Custom Login Modules and Spring

Hi all,

I am workign in geronimo 1.0. Because of the known
problem with Logim Modules not available in the War, I
created a dummy ejb project and put my login modules
in there. My login module internally uses Spring to
talk to the delegate.

Now the login modules are identified, but at the poitn
where I try to cast the class returned by the getBean
method of ClassPathXmlApplicationContext, I get a
BeanNotofrequiredTypeException like this:

com.test.testdelegate is not of type
[com.test.testdelegate]

This delegate class is within another jar file which
is added as part of the manifest classpath of the EJB
project. I am able to do the same thing from within
say an action class,but from login module I get this
exception.

Your input will be appreciated.

Thanks,
Priya


 
____________________________________________________________________________________
Sponsored Link

Rates near historic lows - 
$200,000 mortgage for $660/ month - 
http://yahoo.ratemarketplace.com

Login Modules and Subject Public credential

Posted by sreepriya ramakrishnan <sr...@yahoo.com>.
I created a login module and put the class as part of
an ejb project and invoked the login module from a
servletFilter.

Now, I can see that the commit method has set the
public credentials to the subject , but whenI try to
retrieve it at the servletFilter end its empty .

Can someone please tell me what is happenign here?


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Custom Login Modules and Spring

Posted by sreepriya ramakrishnan <sr...@yahoo.com>.
Is there a way in geronimo 1.0 to make it use one
classloader throughout. 
My problem is this:

As theSpring was not beign identified I manually set
the classloader to be the one used by the Login Module
class using Thread.setContextClassLoader().
Now when I try to retrieve the principals at the
ServletFilter end I get a null, even though in the
commit method of the login module i can see that the
principals are loaded?
I am assuming that againa here, the classloader is
theproblem. So is there a way in geronimo 1.0 to solve
my problem?

Thanks in advance for your advice.

--- Aaron Mulder <am...@alumni.princeton.edu>
wrote:

> Probably there are two classes with the same name
> loaded from
> different class loaders -- can you print
> Foo.class.getClassLoader()
> and then the instance of
> foo.getClass().getClassLoader() and see what
> you get for the two?
> 
> Thanks,
>        Aaron
> 
> On 11/15/06, sreepriya ramakrishnan
> <sr...@yahoo.com> wrote:
> > Hi all,
> >
> > I am workign in geronimo 1.0. Because of the known
> > problem with Logim Modules not available in the
> War, I
> > created a dummy ejb project and put my login
> modules
> > in there. My login module internally uses Spring
> to
> > talk to the delegate.
> >
> > Now the login modules are identified, but at the
> poitn
> > where I try to cast the class returned by the
> getBean
> > method of ClassPathXmlApplicationContext, I get a
> > BeanNotofrequiredTypeException like this:
> >
> > com.test.testdelegate is not of type
> > [com.test.testdelegate]
> >
> > This delegate class is within another jar file
> which
> > is added as part of the manifest classpath of the
> EJB
> > project. I am able to do the same thing from
> within
> > say an action class,but from login module I get
> this
> > exception.
> >
> > Your input will be appreciated.
> >
> > Thanks,
> > Priya
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Sponsored Link
> >
> > Rates near historic lows -
> > $200,000 mortgage for $660/ month -
> > http://yahoo.ratemarketplace.com
> >
> 



 
____________________________________________________________________________________
Sponsored Link

$420k for $1,399/mo. 
Think You Pay Too Much For Your Mortgage? 
Find Out! www.LowerMyBills.com/lre

Re: Custom Login Modules and Spring

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
Probably there are two classes with the same name loaded from
different class loaders -- can you print Foo.class.getClassLoader()
and then the instance of foo.getClass().getClassLoader() and see what
you get for the two?

Thanks,
       Aaron

On 11/15/06, sreepriya ramakrishnan <sr...@yahoo.com> wrote:
> Hi all,
>
> I am workign in geronimo 1.0. Because of the known
> problem with Logim Modules not available in the War, I
> created a dummy ejb project and put my login modules
> in there. My login module internally uses Spring to
> talk to the delegate.
>
> Now the login modules are identified, but at the poitn
> where I try to cast the class returned by the getBean
> method of ClassPathXmlApplicationContext, I get a
> BeanNotofrequiredTypeException like this:
>
> com.test.testdelegate is not of type
> [com.test.testdelegate]
>
> This delegate class is within another jar file which
> is added as part of the manifest classpath of the EJB
> project. I am able to do the same thing from within
> say an action class,but from login module I get this
> exception.
>
> Your input will be appreciated.
>
> Thanks,
> Priya
>
>
>
> ____________________________________________________________________________________
> Sponsored Link
>
> Rates near historic lows -
> $200,000 mortgage for $660/ month -
> http://yahoo.ratemarketplace.com
>