You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Leo Li (JIRA)" <ji...@apache.org> on 2007/07/03 10:04:04 UTC
[jira] Commented: (HARMONY-4141) [classlib][jndi]
InitialContext.getURLOrDefaultInitCtx() optimization
[ https://issues.apache.org/jira/browse/HARMONY-4141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12509778 ]
Leo Li commented on HARMONY-4141:
---------------------------------
Hi, Sergey:
The javax.naming.InitialContext has been modified and your patch cannot be applied now.
So could you help to give a new patch?
Thanks,
Leo.
> [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.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.