You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Alexander Klimetschek (JIRA)" <ji...@apache.org> on 2009/01/12 15:21:59 UTC

[jira] Commented: (JCR-1932) Session.getAttributes( ) call always returns an empty array

    [ https://issues.apache.org/jira/browse/JCR-1932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12662964#action_12662964 ] 

Alexander Klimetschek commented on JCR-1932:
--------------------------------------------

Looking at the SessionImpl code, I see that the member "attributes", which is read by getAttributeNames() and getAttribute(String) is never written to. The solution would be to change the RepositoryImpl.login(Credentials, String) method to pass on the attributes array through to createSession() -> createSessionInstance() -> XASessionImpl constructor -> SessionImpl constructor.

> Session.getAttributes( ) call always returns an empty array
> -----------------------------------------------------------
>
>                 Key: JCR-1932
>                 URL: https://issues.apache.org/jira/browse/JCR-1932
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: JCR API
>            Reporter: alessandro cosenza
>         Attachments: bug.txt
>
>
> Repository repository = new RMIRemoteRepository("//localhost:1099/jackrabbit.repository");
> SimpleCredentials c = new SimpleCredentials("alex","ok".toCharArray());
> c.setAttribute("anAttribute", "aValue");
> Session s = repository.login(c, "aWorkspace");
> String[]attr=s.getAttributeNames();
> array attr is empty.
> according to docs it should contains attributes from the SimpleCredentials object.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.