harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Dmitriev (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-4141) [classlib][jndi] InitialContext.getURLOrDefaultInitCtx() optimization
Date Wed, 04 Jul 2007 10:07:04 GMT

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

Sergey Dmitriev commented on HARMONY-4141:
------------------------------------------

Hi, Leo. Actually this is not what this patch has been filed for! :)

I thought I warned enough that this is not an actual patch by this: :)

  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. 

The actual fix is not quite straightforward that is why this workaround (only) has been filed.

This fix should be rolled back. And this issue should be re-opened.


> [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,
MyInitialContext.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.


Mime
View raw message