harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo Li (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-4141) [classlib][jndi] InitialContext.getURLOrDefaultInitCtx() optimization
Date Mon, 10 Sep 2007 07:34:29 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-4141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Leo Li resolved HARMONY-4141.

    Resolution: Fixed

Hi, Sergey
      I have applied a patch at r574157. Please verify whether it is resolved as you expected.

Good luck,

> [classlib][jndi] InitialContext.getURLOrDefaultInitCtx() optimization
> ---------------------------------------------------------------------
>                 Key: HARMONY-4141
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4141
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Sergey Dmitriev
>            Assignee: Leo Li
>         Attachments: 6minutes_dirty_fix.patch, lookup.java, MyDefaultInitialContextFactory.java,
> In process of enabling SPECjAppServer2004 on harmony on Oracle
> Application Server the following issue in JNDI has been discovered.
> While starting Oracle EJB Containers (OC4J) with SPECjAppServer2004
> onboard OC4J creates several thousands of beans. And for every such
> bean OC4J has to set the lookup context - corresponding class which is
> taken from InitialContext.getURLOrDefaultInitCtx(name).
> Actually the issue is in the way of finding the corresponding class in
> getURLOrDefaultInitCtx() method. The method searches for several
> patterns of context factory class name. Something like:
>   com.oracle.*.javaURLContextFactory
>   ...
>   com.sun.*.javaURLContextFactory
> where "java" in "javaURLContextFactory" is so called schema.
> (Please refer javax.naming.InitialContext javadoc for detailed information)
> So roughly speaking we have the following schema:
>   1 create bean
>   2 get the URL schema
>   3 get the corresponging context factory (Class.forName() for several patterns)
>   4 get the context from the factory
>   5 set the context for the bean
> So we have the 3rd step every time even if we have already found the
> factory for this schema for previous bean for example.
> The attached patch reduces triple the startup time of OC4J. Please note
> that this is NOT a fix but kind of hackish solution - just to show
> what's going on. ...and to reduce the startup time for enabling.
> Probably hash map can be one of the appropriate solutions here.

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

View raw message