Well, when I follow the lintk the last line on the page says go here to
unsubscribe.
On 2001.07.19 16:23:00 -0400 [EMAIL PROTECTED] wrote:
> unsubscribe from this list?
>
> and before you send some smart alec response like follow the link,
> realize
> that at the end of the link there is no info on unsubscribing.
>
> thanks,
> Dave Blankley
>
> -- Original Message --
>
> >Send Jboss-development mailing list submissions to
> > [EMAIL PROTECTED]
> >
> >To subscribe or unsubscribe via the World Wide Web, visit
> > http://lists.sourceforge.net/lists/listinfo/jboss-development
> >or, via email, send a message with subject or body 'help' to
> > [EMAIL PROTECTED]
> >
> >You can reach the person managing the list at
> > [EMAIL PROTECTED]
> >
> >When replying, please edit your Subject line so it is more specific
> >than "Re: Contents of Jboss-development digest..."
> >
> >
> >Today's Topics:
> >
> > 1. CVS update: jboss/src/client jnp-client.jar (Scott M Stark)
> > 2. CVS update: jboss/src/lib jnpserver.jar (Scott M Stark)
> > 3. CVS update: jboss/src/main/org/jboss Main.java (Scott M Stark)
> > 4. CVS update: jboss/src/main/org/jboss/ejb/plugins/jrmp/server
> DefaultSocketFactory.java
> >JRMPContainerInvoker.java (Scott M Stark)
> >
> >--__--__--
> >
> >Message: 1
> >To: [EMAIL PROTECTED]
> >From: Scott M Stark <[EMAIL PROTECTED]>
> >Date: Thu, 19 Jul 2001 13:13:07 -0700
> >Subject: [JBoss-dev] CVS update: jboss/src/client jnp-client.jar
> >Reply-To: [EMAIL PROTECTED]
> >
> > User: starksm
> > Date: 01/07/19 13:13:07
> >
> > Modified: src/client Tag: Branch_2_4 jnp-client.jar
> > Log:
> > Add support for binding the JRMP/RMI objects on a specific address
> > Integrate the jnp changes to support binding the name service on a
> specific
> >address
> >
> > Revision Changes Path
> > No revision
> >
> >
> > No revision
> >
> >
> > 1.11.4.2 +21 -21 jboss/src/client/jnp-client.jar
> >
> > <<Binary file>>
> >
> >
> >
> >
> >--__--__--
> >
> >Message: 2
> >To: [EMAIL PROTECTED]
> >From: Scott M Stark <[EMAIL PROTECTED]>
> >Date: Thu, 19 Jul 2001 13:13:07 -0700
> >Subject: [JBoss-dev] CVS update: jboss/src/lib jnpserver.jar
> >Reply-To: [EMAIL PROTECTED]
> >
> > User: starksm
> > Date: 01/07/19 13:13:07
> >
> > Modified: src/lib Tag: Branch_2_4 jnpserver.jar
> > Log:
> > Add support for binding the JRMP/RMI objects on a specific address
> > Integrate the jnp changes to support binding the name service on a
> specific
> >address
> >
> > Revision Changes Path
> > No revision
> >
> >
> > No revision
> >
> >
> > 1.13.4.2 +40 -34 jboss/src/lib/jnpserver.jar
> >
> > <<Binary file>>
> >
> >
> >
> >
> >--__--__--
> >
> >Message: 3
> >To: [EMAIL PROTECTED]
> >From: Scott M Stark <[EMAIL PROTECTED]>
> >Date: Thu, 19 Jul 2001 13:13:07 -0700
> >Subject: [JBoss-dev] CVS update: jboss/src/main/org/jboss Main.java
> >Reply-To: [EMAIL PROTECTED]
> >
> > User: starksm
> > Date: 01/07/19 13:13:07
> >
> > Modified: src/main/org/jboss Tag: Branch_2_4 Main.java
> > Log:
> > Add support for binding the JRMP/RMI objects on a specific address
> > Integrate the jnp changes to support binding the name service on a
> specific
> >address
> >
> > Revision Changes Path
> > No revision
> >
> >
> > No revision
> >
> >
> > 1.35.2.5 +241 -241 jboss/src/main/org/jboss/Main.java
> >
> > Index: Main.java
> > ===================================================================
> > RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/Main.java,v
> > retrieving revision 1.35.2.4
> > retrieving revision 1.35.2.5
> > diff -u -r1.35.2.4 -r1.35.2.5
> > --- Main.java 2001/07/09 08:33:26 1.35.2.4
> > +++ Main.java 2001/07/19 20:13:07 1.35.2.5
> > @@ -1,242 +1,242 @@
> > -/*
> > - * JBoss, the OpenSource EJB server
> > - *
> > - * Distributable under LGPL license.
> > - * See terms of license at gnu.org.
> > - */
> > -
> > -package org.jboss;
> > -
> > -import java.io.File;
> > -import java.io.IOException;
> > -import java.io.InputStream;
> > -import java.io.PrintStream;
> > -import java.io.BufferedReader;
> > -import java.io.InputStreamReader;
> > -import java.io.PrintWriter;
> > -import java.io.FileWriter;
> > -import java.net.URL;
> > -import java.security.*;
> > -import java.util.*;
> > -
> > -import javax.management.*;
> > -import javax.management.loading.*;
> > -
> > -/**
> > - *
> > - * @see <related>
> > - * @author Rickard �berg ([EMAIL PROTECTED])
> > - * @author <a href="mailto:[EMAIL PROTECTED]">Daniel
> O'Connor</a>.
> > - * @author [EMAIL PROTECTED]
> > - * @version $Revision: 1.35.2.4 $
> > - */
> > -public class Main
> > -{
> > - // Constants -----------------------------------------------------
> > -
> > - String versionIdentifier = "2.4 BETA(Rel_2_4_0_14)";
> > - // Attributes ----------------------------------------------------
> > -
> > - // Static --------------------------------------------------------
> > - public static void main(final String[] args)
> > - throws Exception
> > - {
> > +/*
> > + * JBoss, the OpenSource EJB server
> > + *
> > + * Distributable under LGPL license.
> > + * See terms of license at gnu.org.
> > + */
> > +
> > +package org.jboss;
> > +
> > +import java.io.File;
> > +import java.io.IOException;
> > +import java.io.InputStream;
> > +import java.io.PrintStream;
> > +import java.io.BufferedReader;
> > +import java.io.InputStreamReader;
> > +import java.io.PrintWriter;
> > +import java.io.FileWriter;
> > +import java.net.URL;
> > +import java.security.*;
> > +import java.util.*;
> > +
> > +import javax.management.*;
> > +import javax.management.loading.*;
> > +
> > +/**
> > + *
> > + * @see <related>
> > + * @author Rickard �berg ([EMAIL PROTECTED])
> > + * @author <a href="mailto:[EMAIL PROTECTED]">Daniel
> O'Connor</a>.
> > + * @author [EMAIL PROTECTED]
> > + * @version $Revision: 1.35.2.5 $
> > + */
> > +public class Main
> > +{
> > + // Constants -----------------------------------------------------
> > +
> > + String versionIdentifier = "2.4 BETA(Rel_2_4_0_23)";
> > + // Attributes ----------------------------------------------------
> > +
> > + // Static --------------------------------------------------------
> > + public static void main(final String[] args)
> > + throws Exception
> > + {
> > Thread.currentThread().setName("JBossMain");
> > - String cn = "default"; // Default configuration name is
> "default",
> >i.e. all conf files are in "/conf/default"
> > - String patchDir = null;
> > - // Given conf name?
> > - if (args.length == 1)
> > - cn = args[0];
> > - for(int a = 0; a < args.length; a ++)
> > - {
> > - if( args[a].startsWith("-p") )
> > - patchDir = args[a+1];
> > - }
> > - final String confName = cn;
> > - final String patchDirName = patchDir;
> > -
> > - // Load system properties
> > - URL jbossProps =
>Main.class.getClassLoader().getResource(confName+"/jboss.properties");
> > - InputStream propertiesIn =
> Main.class.getClassLoader().getResourceAsStream(confName+"/jboss.properties");
> > - if ( propertiesIn == null )
> > - {
> > - throw new IOException("jboss.properties missing");
> > - }
> > -
> > - System.getProperties().load(propertiesIn);
> > -
> > - /* Set a jboss.home property from the location of the
> Main.class
> >jar
> > - if the property does not exist.
> > - */
> > - if( System.getProperty("jboss.home") == null )
> > - {
> > - String path =
>Main.class.getProtectionDomain().getCodeSource().getLocation().getFile();
> > - File runJar = new File(path);
> > - // Home dir should be the parent of the dir containing
> run.jar
> > - File homeDir = new File(runJar.getParent(), "..");
> > - System.setProperty("jboss.home",
> homeDir.getCanonicalPath());
> > - }
> > - System.out.println("jboss.home =
> "+System.getProperty("jboss.home"));
> > -
> > - // Set the JAAS login config file if not already set
> > - if( System.getProperty("java.security.auth.login.config") ==
> null
> >)
> > - {
> > - URL loginConfig =
>Main.class.getClassLoader().getResource(confName+"/auth.conf");
> > - if( loginConfig != null )
> > - {
> > - System.setProperty("java.security.auth.login.config",
> loginConfig.toExternalForm());
> > - System.out.println("Using JAAS LoginConfig:
> "+loginConfig.toExternalForm());
> > - }
> > - else
> > - {
> > - System.out.println("Warning: no auth.conf found in
> config="+confName);
> > - }
> > - }
> > -
> > - // Set security
> > - URL serverPolicy =
>Main.class.getClassLoader().getResource(confName+"/server.policy");
> > -
> > - if ( serverPolicy == null )
> > - {
> > - throw new IOException("server.policy missing");
> > - }
> > -
> > - System.setProperty("java.security.policy",
> serverPolicy.getFile());
> > -
> > - // Set security manager
> > - // Optional for better performance
> > - if (System.getProperty("java.security.manager") != null)
> > -
>System.setSecurityManager((SecurityManager)Class.forName(System.getProperty("java.security.manager")).newInstance());
> > -
> > - // Start server - Main does not have the proper permissions
> > - AccessController.doPrivileged(new PrivilegedAction()
> > - {
> > - public Object run()
> > - {
> > - new Main(confName, patchDirName);
> > - return null;
> > - }
> > - });
> > - }
> > -
> > - // Constructors --------------------------------------------------
> > - public Main(String confName, String patchDir)
> > - {
> > - Date startTime = new Date();
> > -
> > - try
> > - {
> > - System.out.println("Using configuration \""+confName+"\"");
> > -
> > - final PrintStream err = System.err;
> > -
> > - com.sun.management.jmx.Trace.parseTraceProperties();
> > -
> > - // Give feedback about from where jndi.properties is read
> > - URL jndiLocation = this.getClass().getResource("/jndi.properties");
> > - if (jndiLocation instanceof URL) {
> > - System.out.println("Please make sure the following is
> intended
> >(check your CLASSPATH):");
> > - System.out.println(" jndi.properties is read from
> "+jndiLocation);
> > - }
> > -
> > - // Create MBeanServer
> > - final MBeanServer server =
> MBeanServerFactory.createMBeanServer();
> > -
> > - // Add configuration directory to MLet
> > - URL confDirectory = new
> File("../conf/"+confName).getCanonicalFile().toURL();
> > - URL[] urls = {confDirectory};
> > - // Add any patch jars to the MLet so they are seen ahead of
> >the JBoss jars
> > - if( patchDir != null )
> > - {
> > - File dir = new File(patchDir);
> > - ArrayList tmp = new ArrayList();
> > - File[] jars = dir.listFiles(new java.io.FileFilter()
> > - {
> > - public boolean accept(File pathname)
> > - {
> > - String name = pathname.getName();
> > - return name.endsWith(".jar") ||
> name.endsWith(".zip");
> > - }
> > - }
> > - );
> > - tmp.add(confDirectory);
> > - for(int j = 0; jars != null && j < jars.length; j ++)
> > - {
> > - File jar = jars[j];
> > - URL u = jar.getCanonicalFile().toURL();
> > - tmp.add(u);
> > - }
> > - urls = new URL[tmp.size()];
> > - tmp.toArray(urls);
> > - }
> > -
> > - // Create MLet
> > - MLet mlet = new MLet(urls);
> > - server.registerMBean(mlet, new
> ObjectName(server.getDefaultDomain(),
> >"service", "MLet"));
> > -
> > - // Set MLet as classloader for this app
> > - Thread.currentThread().setContextClassLoader(mlet);
> > -
> > - // Load configuration
> > - URL mletConf = mlet.getResource("jboss.conf");
> > - Set beans = (Set)mlet.getMBeansFromURL(mletConf);
> > - Iterator enum = beans.iterator();
> > - while (enum.hasNext())
> > - {
> > - Object obj = enum.next();
> > - if (obj instanceof RuntimeOperationsException)
> > -
>((RuntimeOperationsException)obj).getTargetException().printStackTrace(err);
> > - else if (obj instanceof RuntimeErrorException)
> > -
>((RuntimeErrorException)obj).getTargetError().printStackTrace(err);
> > - else if (obj instanceof MBeanException)
> > - ((MBeanException)obj).getTargetException().printStackTrace(err);
> > - else if (obj instanceof RuntimeMBeanException)
> > -
>((RuntimeMBeanException)obj).getTargetException().printStackTrace(err);
> > - else if (obj instanceof ReflectionException)
> > -
>((ReflectionException)obj).getTargetException().printStackTrace(err);
> > - else if (obj instanceof Throwable)
> > - ((Throwable)obj).printStackTrace(err);
> > - }
> > -
> > - // Load configuration
> > - server.invoke(new ObjectName(":service=Configuration"),
> "loadConfiguration",
> >new Object[0], new String[0]);
> > -
> > - // Store configuration
> > - // This way, the config will always contain a complete
> mirror
> >of what's in the server
> > - server.invoke(new ObjectName(":service=Configuration"),
> "saveConfiguration",
> >new Object[0] , new String[0]);
> > -
> > - // Init and Start MBeans
> > - server.invoke(new ObjectName(":service=ServiceControl"),
> "init",
> >new Object[0] , new String[0]);
> > - server.invoke(new ObjectName(":service=ServiceControl"),
> "start",
> >new Object[0] , new String[0]);
> > -
> > - }
> > - catch (RuntimeOperationsException e)
> > - {
> > - System.out.println("Runtime error");
> > - e.getTargetException().printStackTrace();
> > - }
> > - catch (RuntimeErrorException e)
> > - {
> > - System.out.println("Runtime error");
> > - e.getTargetError().printStackTrace();
> > - }
> > - catch (MBeanException e)
> > - {
> > - e.getTargetException().printStackTrace();
> > - }
> > - catch (RuntimeMBeanException e)
> > - {
> > - e.getTargetException().printStackTrace();
> > - }
> > - catch (Exception e)
> > - {
> > - e.printStackTrace();
> > - }
> > -
> > - // Done
> > - Date stopTime = new Date();
> > - Date lapsedTime = new Date(stopTime.getTime()-startTime.getTime());
> > - System.out.println("JBoss "+versionIdentifier+" Started in
> "+lapsedTime.getMinutes()+"m:"+lapsedTime.getSeconds()+"s");
> > - }
> > -}
> > -
> > + String cn = "default"; // Default configuration name is
> "default",
> >i.e. all conf files are in "/conf/default"
> > + String patchDir = null;
> > + // Given conf name?
> > + if (args.length == 1)
> > + cn = args[0];
> > + for(int a = 0; a < args.length; a ++)
> > + {
> > + if( args[a].startsWith("-p") )
> > + patchDir = args[a+1];
> > + }
> > + final String confName = cn;
> > + final String patchDirName = patchDir;
> > +
> > + // Load system properties
> > + URL jbossProps =
>Main.class.getClassLoader().getResource(confName+"/jboss.properties");
> > + InputStream propertiesIn =
> Main.class.getClassLoader().getResourceAsStream(confName+"/jboss.properties");
> > + if ( propertiesIn == null )
> > + {
> > + throw new IOException("jboss.properties missing");
> > + }
> > +
> > + System.getProperties().load(propertiesIn);
> > +
> > + /* Set a jboss.home property from the location of the
> Main.class
> >jar
> > + if the property does not exist.
> > + */
> > + if( System.getProperty("jboss.home") == null )
> > + {
> > + String path =
>Main.class.getProtectionDomain().getCodeSource().getLocation().getFile();
> > + File runJar = new File(path);
> > + // Home dir should be the parent of the dir containing
> run.jar
> > + File homeDir = new File(runJar.getParent(), "..");
> > + System.setProperty("jboss.home",
> homeDir.getCanonicalPath());
> > + }
> > + System.out.println("jboss.home =
> "+System.getProperty("jboss.home"));
> > +
> > + // Set the JAAS login config file if not already set
> > + if( System.getProperty("java.security.auth.login.config") ==
> null
> >)
> > + {
> > + URL loginConfig =
>Main.class.getClassLoader().getResource(confName+"/auth.conf");
> > + if( loginConfig != null )
> > + {
> > + System.setProperty("java.security.auth.login.config",
> loginConfig.toExternalForm());
> > + System.out.println("Using JAAS LoginConfig:
> "+loginConfig.toExternalForm());
> > + }
> > + else
> > + {
> > + System.out.println("Warning: no auth.conf found in
> config="+confName);
> > + }
> > + }
> > +
> > + // Set security
> > + URL serverPolicy =
>Main.class.getClassLoader().getResource(confName+"/server.policy");
> > +
> > + if ( serverPolicy == null )
> > + {
> > + throw new IOException("server.policy missing");
> > + }
> > +
> > + System.setProperty("java.security.policy",
> serverPolicy.getFile());
> > +
> > + // Set security manager
> > + // Optional for better performance
> > + if (System.getProperty("java.security.manager") != null)
> > +
>System.setSecurityManager((SecurityManager)Class.forName(System.getProperty("java.security.manager")).newInstance());
> > +
> > + // Start server - Main does not have the proper permissions
> > + AccessController.doPrivileged(new PrivilegedAction()
> > + {
> > + public Object run()
> > + {
> > + new Main(confName, patchDirName);
> > + return null;
> > + }
> > + });
> > + }
> > +
> > + // Constructors --------------------------------------------------
> > + public Main(String confName, String patchDir)
> > + {
> > + Date startTime = new Date();
> > +
> > + try
> > + {
> > + System.out.println("Using configuration \""+confName+"\"");
> > +
> > + final PrintStream err = System.err;
> > +
> > + com.sun.management.jmx.Trace.parseTraceProperties();
> > +
> > + // Give feedback about from where jndi.properties is read
> > + URL jndiLocation = this.getClass().getResource("/jndi.properties");
> > + if (jndiLocation instanceof URL) {
> > + System.out.println("Please make sure the following is
> intended
> >(check your CLASSPATH):");
> > + System.out.println(" jndi.properties is read from
> "+jndiLocation);
> > + }
> > +
> > + // Create MBeanServer
> > + final MBeanServer server =
> MBeanServerFactory.createMBeanServer();
> > +
> > + // Add configuration directory to MLet
> > + URL confDirectory = new
> File("../conf/"+confName).getCanonicalFile().toURL();
> > + URL[] urls = {confDirectory};
> > + // Add any patch jars to the MLet so they are seen ahead of
> >the JBoss jars
> > + if( patchDir != null )
> > + {
> > + File dir = new File(patchDir);
> > + ArrayList tmp = new ArrayList();
> > + File[] jars = dir.listFiles(new java.io.FileFilter()
> > + {
> > + public boolean accept(File pathname)
> > + {
> > + String name = pathname.getName();
> > + return name.endsWith(".jar") ||
> name.endsWith(".zip");
> > + }
> > + }
> > + );
> > + tmp.add(confDirectory);
> > + for(int j = 0; jars != null && j < jars.length; j ++)
> > + {
> > + File jar = jars[j];
> > + URL u = jar.getCanonicalFile().toURL();
> > + tmp.add(u);
> > + }
> > + urls = new URL[tmp.size()];
> > + tmp.toArray(urls);
> > + }
> > +
> > + // Create MLet
> > + MLet mlet = new MLet(urls);
> > + server.registerMBean(mlet, new
> ObjectName(server.getDefaultDomain(),
> >"service", "MLet"));
> > +
> > + // Set MLet as classloader for this app
> > + Thread.currentThread().setContextClassLoader(mlet);
> > +
> > + // Load configuration
> > + URL mletConf = mlet.getResource("jboss.conf");
> > + Set beans = (Set)mlet.getMBeansFromURL(mletConf);
> > + Iterator enum = beans.iterator();
> > + while (enum.hasNext())
> > + {
> > + Object obj = enum.next();
> > + if (obj instanceof RuntimeOperationsException)
> > +
>((RuntimeOperationsException)obj).getTargetException().printStackTrace(err);
> > + else if (obj instanceof RuntimeErrorException)
> > +
>((RuntimeErrorException)obj).getTargetError().printStackTrace(err);
> > + else if (obj instanceof MBeanException)
> > + ((MBeanException)obj).getTargetException().printStackTrace(err);
> > + else if (obj instanceof RuntimeMBeanException)
> > +
>((RuntimeMBeanException)obj).getTargetException().printStackTrace(err);
> > + else if (obj instanceof ReflectionException)
> > +
>((ReflectionException)obj).getTargetException().printStackTrace(err);
> > + else if (obj instanceof Throwable)
> > + ((Throwable)obj).printStackTrace(err);
> > + }
> > +
> > + // Load configuration
> > + server.invoke(new ObjectName(":service=Configuration"),
> "loadConfiguration",
> >new Object[0], new String[0]);
> > +
> > + // Store configuration
> > + // This way, the config will always contain a complete
> mirror
> >of what's in the server
> > + server.invoke(new ObjectName(":service=Configuration"),
> "saveConfiguration",
> >new Object[0] , new String[0]);
> > +
> > + // Init and Start MBeans
> > + server.invoke(new ObjectName(":service=ServiceControl"),
> "init",
> >new Object[0] , new String[0]);
> > + server.invoke(new ObjectName(":service=ServiceControl"),
> "start",
> >new Object[0] , new String[0]);
> > +
> > + }
> > + catch (RuntimeOperationsException e)
> > + {
> > + System.out.println("Runtime error");
> > + e.getTargetException().printStackTrace();
> > + }
> > + catch (RuntimeErrorException e)
> > + {
> > + System.out.println("Runtime error");
> > + e.getTargetError().printStackTrace();
> > + }
> > + catch (MBeanException e)
> > + {
> > + e.getTargetException().printStackTrace();
> > + }
> > + catch (RuntimeMBeanException e)
> > + {
> > + e.getTargetException().printStackTrace();
> > + }
> > + catch (Exception e)
> > + {
> > + e.printStackTrace();
> > + }
> > +
> > + // Done
> > + Date stopTime = new Date();
> > + Date lapsedTime = new Date(stopTime.getTime()-startTime.getTime());
> > + System.out.println("JBoss "+versionIdentifier+" Started in
> "+lapsedTime.getMinutes()+"m:"+lapsedTime.getSeconds()+"s");
> > + }
> > +}
> > +
> >
> >
> >
> >
> >
> >--__--__--
> >
> >Message: 4
> >To: [EMAIL PROTECTED]
> >From: Scott M Stark <[EMAIL PROTECTED]>
> >Date: Thu, 19 Jul 2001 13:13:07 -0700
> >Subject: [JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins/jrmp/server
> >DefaultSocketFactory.java JRMPContainerInvoker.java
> >Reply-To: [EMAIL PROTECTED]
> >
> > User: starksm
> > Date: 01/07/19 13:13:07
> >
> > Modified: src/main/org/jboss/ejb/plugins/jrmp/server Tag:
> Branch_2_4
> > JRMPContainerInvoker.java
> > Added: src/main/org/jboss/ejb/plugins/jrmp/server Tag:
> Branch_2_4
> > DefaultSocketFactory.java
> > Log:
> > Add support for binding the JRMP/RMI objects on a specific address
> > Integrate the jnp changes to support binding the name service on a
> specific
> >address
> >
> > Revision Changes Path
> > No revision
> >
> >
> > No revision
> >
> >
> > 1.37.4.1 +62 -18
>jboss/src/main/org/jboss/ejb/plugins/jrmp/server/JRMPContainerInvoker.java
> >
> > Index: JRMPContainerInvoker.java
> > ===================================================================
> > RCS file:
>/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/jrmp/server/JRMPContainerInvoker.java,v
> > retrieving revision 1.37
> > retrieving revision 1.37.4.1
> > diff -u -r1.37 -r1.37.4.1
> > --- JRMPContainerInvoker.java 2001/05/02 03:04:15 1.37
> > +++ JRMPContainerInvoker.java 2001/07/19
> 20:13:07 1.37.4.1
> > @@ -12,6 +12,7 @@
> > import java.io.IOException;
> > import java.lang.reflect.Method;
> > import java.lang.reflect.Constructor;
> > +import java.net.UnknownHostException;
> > import java.rmi.ServerException;
> > import java.rmi.RemoteException;
> > import java.rmi.MarshalledObject;
> > @@ -69,14 +70,13 @@
> > import org.w3c.dom.Element;
> >
> > /**
> > - * <description>
> > *
> > - * @see <related>
> > - * @author Rickard �berg ([EMAIL PROTECTED])
> > - * @author <a href="mailto:[EMAIL PROTECTED]">Sebastien
> Alborini</a>
> > - * @author <a href="mailto:[EMAIL PROTECTED]">Marc
> Fleury</a>
> > - * @author <a href="mailto:[EMAIL PROTECTED]">Juha
> Lindfors</a>
> > - * @version $Revision: 1.37 $
> > + * @author Rickard �berg ([EMAIL PROTECTED])
> > + * @author <a href="mailto:[EMAIL PROTECTED]">Sebastien
> Alborini</a>
> > + * @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
> > + * @author <a href="mailto:[EMAIL PROTECTED]">Juha
> Lindfors</a>
> > + * @author <a href="mailto:[EMAIL PROTECTED]">Scott
> Stark</a>
> > + * @version $Revision: 1.37.4.1 $
> > */
> > public class JRMPContainerInvoker
> > extends RemoteServer
> > @@ -97,6 +97,8 @@
> > protected String clientSocketFactoryName;
> > /** The class name of the optional custom server socket factory */
> > protected String serverSocketFactoryName;
> > + /** The address to bind the rmi port on */
> > + protected String serverAddress;
> > protected boolean jdk122 = false;
> > protected Container container;
> > protected String jndiName;
> > @@ -176,7 +178,8 @@
> >
> > // Hash it
> > homeMethodInvokerMap.put(new
> Long(RemoteMethodInvocation.calculateHash(getEJBObjectMethod)),getEJBObjectMethod);
> > - } catch (Exception e)
> > + }
> > + catch (Exception e)
> > {
> > Logger.exception(e);
> > }
> > @@ -254,7 +257,7 @@
> > }
> >
> > public void start()
> > - throws Exception
> > + throws Exception
> > {
> > try
> > {
> > @@ -354,7 +357,7 @@
> > * Invoke a Home interface method.
> > */
> > public MarshalledObject invokeHome(MarshalledObject mimo)
> > - throws Exception
> > + throws Exception
> > {
> > ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
> > Thread.currentThread().setContextClassLoader(container.getClassLoader());
> > @@ -376,7 +379,7 @@
> > * Invoke a Remote interface method.
> > */
> > public MarshalledObject invoke(MarshalledObject mimo)
> > - throws Exception
> > + throws Exception
> > {
> > ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
> > Thread.currentThread().setContextClassLoader(container.getClassLoader());
> > @@ -401,7 +404,7 @@
> > */
> > public Object invokeHome(Method m, Object[] args, Transaction tx,
> > Principal identity, Object credential)
> > - throws Exception
> > + throws Exception
> > {
> > // Check if this call really can be optimized
> > if
>(!m.getDeclaringClass().isAssignableFrom(((ContainerInvokerContainer)container).getHomeClass()))
> > @@ -445,7 +448,7 @@
> > */
> > public Object invoke(Object id, Method m, Object[] args,
> Transaction
> >tx,
> > Principal identity, Object credential )
> > - throws Exception
> > + throws Exception
> > {
> > // Check if this call really can be optimized
> > // If parent of callers classloader is != parent of our
> classloader
> >-> not optimizable!
> > @@ -478,7 +481,8 @@
> > try
> > {
> > return container.invoke(new MethodInvocation(id, m, args,
> tx,
> >identity, credential));
> > - } finally
> > + }
> > + finally
> > {
> > Thread.currentThread().setContextClassLoader(oldCl);
> > }
> > @@ -518,10 +522,12 @@
> > String port = MetaData.getElementContent(portElement);
> > rmiPort = Integer.parseInt(port);
> > }
> > - } catch(NumberFormatException e)
> > + }
> > + catch(NumberFormatException e)
> > {
> > rmiPort = ANONYMOUS_PORT;
> > - } catch(DeploymentException e)
> > + }
> > + catch(DeploymentException e)
> > {
> > rmiPort = ANONYMOUS_PORT;
> > }
> > @@ -554,11 +560,15 @@
> > Logger.error(e);
> > serverSocketFactoryName = null;
> > }
> > + Element addrElement = MetaData.getOptionalChild(element,
> "RMIServerSocketAddr");
> > + if( addrElement != null )
> > + this.serverAddress =
MetaData.getElementContent(addrElement);
> > loadCustomSocketFactories(loader);
> >
> > Logger.debug("Container Invoker RMI Port='"+(rmiPort ==
> ANONYMOUS_PORT
> >? "Anonymous" : Integer.toString(rmiPort))+"'");
> > Logger.debug("Container Invoker Client
> SocketFactory='"+(clientSocketFactory
> >== null ? "Default" : clientSocketFactory.toString())+"'");
> > Logger.debug("Container Invoker Server
> SocketFactory='"+(serverSocketFactory
> >== null ? "Default" : serverSocketFactory.toString())+"'");
> > + Logger.debug("Container Invoker Server
> SocketAddr='"+(serverAddress
> >== null ? "Default" : serverAddress)+"'");
> > Logger.debug("Container Invoker Optimize='"+optimize+"'");
> > }
> >
> > @@ -567,7 +577,7 @@
> >
> > // Protected -----------------------------------------------------
> > protected void rebind(Context ctx, String name, Object val)
> > - throws NamingException
> > + throws NamingException
> > {
> > // Bind val to name in ctx, and make sure that all intermediate
> >contexts exist
> >
> > @@ -610,7 +620,42 @@
> > {
> > Class ssfClass =
> loader.loadClass(serverSocketFactoryName);
> > serverSocketFactory = (RMIServerSocketFactory)
> ssfClass.newInstance();
> > + if( serverAddress != null )
> > + {
> > + // See if the server socket supports
> setBindAddress(String)
> > + try
> > + {
> > + Class[] parameterTypes = {String.class};
> > + Method m = ssfClass.getMethod("setBindAddress",
> >parameterTypes);
> > + Object[] args = {serverAddress};
> > + m.invoke(serverSocketFactory, args);
> > + }
> > + catch(NoSuchMethodException e)
> > + {
> > + Logger.error("Socket factory does not support
> setBindAddress(String)");
> > + // Go with default address
> > + }
> > + catch(Exception e)
> > + {
> > + Logger.error("Failed to
> setBindAddress="+serverAddress+"
> >on socket factory");
> > + // Go with default address
> > + }
> > + }
> > }
> > + // If a bind address was specified create a
> DefaultSocketFactory
> > + else if( serverAddress != null )
> > + {
> > + DefaultSocketFactory defaultFactory = new
> DefaultSocketFactory();
> > + serverSocketFactory = defaultFactory;
> > + try
> > + {
> > + defaultFactory.setBindAddress(serverAddress);
> > + }
> > + catch(UnknownHostException e)
> > + {
> > + Logger.error("Failed to
> setBindAddress="+serverAddress+"
> >on socket factory, "+e.getMessage());
> > + }
> > + }
> > }
> > catch(Exception e)
> > {
> > @@ -621,4 +666,3 @@
> >
> > // Inner classes -------------------------------------------------
> > }
> > -
> >
> >
> >
> > No revision
> >
> >
> > No revision
> >
> >
> > 1.1.2.1 +55 -0
>jboss/src/main/org/jboss/ejb/plugins/jrmp/server/Attic/DefaultSocketFactory.java
> >
> >
> >
> >
> >
> >
> >
> >--__--__--
> >
> >_______________________________________________
> >Jboss-development mailing list
> >[EMAIL PROTECTED]
> >http://lists.sourceforge.net/lists/listinfo/jboss-development
> >
> >
> >End of Jboss-development Digest
> >
>
>
>
>
> Visit iWon.com - the Internet's largest guaranteed cash giveaway! Click
> here now for your "Thank You" gift:
> http://www.iwon.com/giftcenter/0,2612,,00.html?t_id=20157
>
>
>
>
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development
>
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development