User: d_jencks
Date: 01/11/11 22:52:17
Modified: src/main/org/jboss/naming ExternalContext.java
NamingService.java
Log:
Changes to move toward eliminating init and destroy from Service interface, and make
J2eeDeployer use mbean-refs. (2nd try at committing - is cvs acting weird?
Revision Changes Path
1.11 +1 -4 jboss/src/main/org/jboss/naming/ExternalContext.java
Index: ExternalContext.java
===================================================================
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/naming/ExternalContext.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ExternalContext.java 2001/09/11 18:35:03 1.10
+++ ExternalContext.java 2001/11/12 06:52:17 1.11
@@ -44,7 +44,7 @@
@see org.jboss.naming.NonSerializableFactory
@author [EMAIL PROTECTED]
-@version $Revision: 1.10 $
+@version $Revision: 1.11 $
*/
public class ExternalContext extends ServiceMBeanSupport implements
ExternalContextMBean
{
@@ -144,9 +144,6 @@
return "ExternalContext(" + contextInfo.getJndiName() + ")";
}
- public void initService() throws Exception
- {
- }
/** Start the service by binding the external context into the
JBoss InitialContext.
1.18 +5 -11 jboss/src/main/org/jboss/naming/NamingService.java
Index: NamingService.java
===================================================================
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/naming/NamingService.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- NamingService.java 2001/09/11 18:35:03 1.17
+++ NamingService.java 2001/11/12 06:52:17 1.18
@@ -28,7 +28,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Rickard �berg</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Scott Stark</a>.
- * @version $Revision: 1.17 $
+ * @version $Revision: 1.18 $
*
* Revisions:
* 20010622 scott.stark: Report IntialContext env for problem tracing
@@ -121,7 +121,8 @@
return "Naming";
}
- public void initService()
+
+ public void startService()
throws Exception
{
// Read jndi.properties into system properties
@@ -132,19 +133,13 @@
Properties props = new Properties();
props.load(is);
- Enumeration keys = props.propertyNames();
- while( keys.hasMoreElements() )
+ for (Enumeration keys = props.propertyNames(); keys.hasMoreElements(); )
{
String key = (String) keys.nextElement();
String value = props.getProperty(key);
log.debug("System.setProperty, key="+key+", value="+value);
System.setProperty(key, value);
}
- }
-
- public void startService()
- throws Exception
- {
naming.start();
/* Create a default InitialContext and dump out its env to show what
properties
were used in its creation. If we find a Context.PROVIDER_URL property
@@ -152,10 +147,9 @@
*/
InitialContext iniCtx = new InitialContext();
Hashtable env = iniCtx.getEnvironment();
- Enumeration keys = env.keys();
log.info("InitialContext Environment:");
String providerURL = null;
- while( keys.hasMoreElements() )
+ for (Enumeration keys = env.keys(); keys.hasMoreElements(); )
{
String key = (String) keys.nextElement();
String value = (String) env.get(key);
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development