jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "alessandro.cosenza@itkey.it" <alessandro.cose...@itkey.it>
Subject Re: session.getAttributes( ) doesn't return any attribute
Date Fri, 09 Jan 2009 14:55:17 GMT
oh yes, apologize, but I forgot setting of attributes.
if i write
SimpleCredentials cred =
SimpleCredentials("alex","surname".toCharArray());
cred.setAttribute("anAttribute","aValue");
Session ses = repository.login(cred, "workspace");
String[]attr=ses.getAttributeNames();
attr is empty.

if i write attr=cred.getAttributes() instead it works
and returns me only the anAttribute attribute.
i thought it returns me also username and password.

so why ses.getAttributeNames() doesn't return any
attributes?

thanks



----- Original Message -----
Da : "Todd Seiber" <todd.seiber@gmail.com>
A : users@jackrabbit.apache.org
Oggetto : Re: session.getAttributes( ) doesn't return any
attribute
Data : Fri, 9 Jan 2009 09:41:06 -0500

> This would return attributes that you set with
> setAttribute. Use getUserID and/or getPassword if you want
> those properties.
> 
> On Fri, Jan 9, 2009 at 9:29 AM,
> alessandro.cosenza@itkey.it < alessandro.cosenza@itkey.it>
> wrote:
> 
> > Repository repository = new
> >
> RMIRemoteRepository("//localhost:1099/jackrabbit.repositor
> > y"); SimpleCredentials c = new
> > SimpleCredentials("alex","surname".toCharArray());
> > Session s = repository.login(c, "workspace");
> > String[]attr=s.getAttributeNames();
> >
> > the array is empty. why?
> >
> > what kind of attributes should be returned?I guess
> > username and password
> > specified in the SimpleCredentials object.
> >
> 

Mime
View raw message