Static _host and _port in IpcJndiIntialContextFactory

"Curtis Paris" <[email protected]>
Newsgroups gmane.comp.java.openjms.devel
Message-ID <[email protected]>
I was wondering if there is any reason that the _host and _port
variables are static in:
org.exolab.jms.jndi.mipc.IpcJndiInitialContextFactory 
 
I've submitted a bug on this already (921517), attached is a patch file.
But, I wanted to just raise it up incase others have this problem.
 
The snipps:

    /**
     * The server host address
     */
    private static String _host;
 
    /**
     * The port number the server is on
     */
    private static int _port;
 
Looking through the entire class, everything is referenced locally and
doesn't need a static reference.  The HTTP connector places stuff into
the environment hashtable, as does the RMI version it looks like. 
 
When I change these to be non-static, the code compiles fine.   I would
suggest the quick fix is make them non-static, the better fix is to put
them into the environment and create a getHost() and getPort() function.

 


  _____  

Curtis Paris
Software Engineer IV	  	
Metro One Telecommunications, Inc.
11200 Murray Scholls Place
Beaverton, OR 97007 	     	 Phone:	 +1 (503) 643-9500	
Fax:	 +1 (503) 643-9600	
E-Mail:	 [email protected]	
Web:	 http://www.metro1.com/
metroone_logo_gray.gif (image/gif, 2.7 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.