Revision: 15389
Author: [email protected]
Date: Thu Nov 18 15:10:03 2010
Log: [No log message]
http://code.google.com/p/mobicents/source/detail?r=15389
Modified:
/branches/servers/sip-servlets/2.0/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/SipStandardContext.java
=======================================
---
/branches/servers/sip-servlets/2.0/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/SipStandardContext.java
Thu Nov 18 07:10:37 2010
+++
/branches/servers/sip-servlets/2.0/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/SipStandardContext.java
Thu Nov 18 15:10:03 2010
@@ -213,8 +213,8 @@
// setState(LifecycleState.INITIALIZING);
super.initInternal();
- // Post work directory
- postWorkDirectory();
+// // Post work directory
+// postWorkDirectory();
prepareServletContext();
@@ -301,6 +301,7 @@
// ok = false;
}
}
+ //Initialize resources
if (!resourcesStart()) {
logger.error( "Error in resourceStart()");
}
@@ -330,8 +331,6 @@
&& (useNamingProperty.equals("false"))) {
setUseNaming(false);
}
-
-
//activating our custom naming context to be able to set the sip
factory in JNDI
if (isUseNaming()) {
@@ -345,12 +344,6 @@
}
// Start our subordinate components, if any
- if ((loader != null) && (loader instanceof Lifecycle))
- ((Lifecycle) loader).start();
-
- if ((resources != null) && (resources instanceof Lifecycle))
- ((Lifecycle) resources).start();
-
// fireLifecycleEvent(Lifecycle.CONFIGURE_START_EVENT, null);
@@ -360,12 +353,12 @@
// normal lookup method - in the default naming context.
//tomcat naming
-// Map<String, Map<String, String>> injectionMap =
buildInjectionMap(
-// getIgnoreAnnotations() ? new NamingResources():
getNamingResources());
-// setInstanceManager(
-// new DefaultSipInstanceManager(
-//
getNamingContextListener().getEnvContext(),
-// injectionMap, this,
this.getClass().getClassLoader(),this));
+ Map<String, Map<String, String>> injectionMap =
buildInjectionMap(
+ getIgnoreAnnotations() ? new NamingResources():
getNamingResources());
+ setInstanceManager(
+ new DefaultSipInstanceManager(
+
getNamingContextListener().getEnvContext(),
+ injectionMap, this,
this.getClass().getClassLoader(),this));
// } else {
// // jboss or other kind of naming
// try {
@@ -386,6 +379,17 @@
//and call load on startup which is equivalent to
//JSR 289 Section 2.1.1 Step 2.Invoke servlet.init(), the initialization
method on the Servlet. Invoke the init() on all the load-on-startup
Servlets in the application
+ // Post work directory
+ postWorkDirectory();
+
+ if ((loader != null) && (loader instanceof Lifecycle))
+ ((Lifecycle) loader).start();
+
+ if ((resources != null) && (resources instanceof Lifecycle))
+ ((Lifecycle) resources).start();
+//
+// fireLifecycleEvent(Lifecycle.CONFIGURE_START_EVENT, null);
+
super.startInternal();
if(getAvailable()) {