You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Deepal Jayasinghe (JIRA)" <ji...@apache.org> on 2007/07/04 08:22:05 UTC

[jira] Assigned: (AXIS2-2899) "Too many open files" exception when hotdeployment set to true, after loading configurationContext multiple times

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

Deepal Jayasinghe reassigned AXIS2-2899:
----------------------------------------

    Assignee: Deepal Jayasinghe

> "Too many open files" exception when hotdeployment set to true, after loading configurationContext multiple times
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2899
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2899
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 1.2
>         Environment: Windows XP, 
> Sun JRE 1.4.2 or IBM JRE 1.4.2,
> running JUnit test from within Eclipse 3.2.2
>            Reporter: Greg Lee-Shoy
>            Assignee: Deepal Jayasinghe
>            Priority: Minor
>         Attachments: axis2.zip
>
>
> -When configuration context is loaded about 400 times using createConfigurationContextFromFileSystem( ), and hotdeployment is set to true, the following error occurs: java.io.IOException: Too many open files.  
> -if hotdeployment is set to false, this error does not occur even after loading configurationContext 100,000 times
> -if there is a check in getURLsForAllJars() in org.apache.axis2.deployment.util.Utils to see if a URL has file protocol (and not creating a temp file if it does) the threshold is raised to 2826 times, after which an OutOfMemoryError occurs.
> The JUnit test is:
> import org.apache.axis2.context.ConfigurationContext;
> import org.apache.axis2.context.ConfigurationContextFactory;
> import junit.framework.TestCase;
> public class LoadConfigFromFileTest extends TestCase {
> 	public LoadConfigFromFileTest(String name)
> 	{
> 		super(name);
> 	}
> 	
> 	public void testLoadConfig1000Times()
> 	{
> 		try
> 		{
> 			
> 			ConfigurationContext configContext = null;
> 			
> 			String axis2Conf = "C:\\Java\\axis2\\conf\\axis2.xml";
> 			String repoDir = "C:\\Java\\axis2";
> 		
> 			for( int i = 0; i < 1000; i++)
> 			{
> 				System.out.println("Iteration " + i);
> 				configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(
> 					repoDir, axis2Conf);
> 				configContext = null;
> 			}
> 		}
> 		catch (Exception e)
> 		{
> 			e.printStackTrace();
> 		}
> 	}
> }

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org