aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hao Zhong (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ARIES-1704) JNDI implementation does not follow the specification
Date Fri, 17 Mar 2017 01:39:41 GMT
Hao Zhong created ARIES-1704:
--------------------------------

             Summary: JNDI implementation does not follow the specification
                 Key: ARIES-1704
                 URL: https://issues.apache.org/jira/browse/ARIES-1704
             Project: Aries
          Issue Type: Bug
          Components: JNDI
    Affects Versions: jndi-url-1.1.0
            Reporter: Hao Zhong


The ObjectFactoryHelper.getObjectInstance method does not follow the specification. Jarek
Gawor reported and fixed a similar bug in ARIES-311.
The fixed code in that bug report is as follow:
 public Object getObjectInstance(final Object obj,
                                    final Name name,
                                    final Context nameCtx,
                                    final Hashtable<?, ?> environment,
                                    final Attributes attrs) throws Exception {
        return Utils.doPrivileged(new PrivilegedExceptionAction<Object>() {
            public Object run() throws Exception {
                return doGetObjectInstance(obj, name, nameCtx, environment, attrs);
            }            
        });
    }
    
    private Object doGetObjectInstance(Object obj,
                                       Name name,
                                       Context nameCtx,
                                       Hashtable<?, ?> environment,
                                       Attributes attrs) throws Exception {

I believe that similar fixes work for this bug report. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message