tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vince Stewart <stewart.vi...@gmail.com>
Subject unwanted tcp6 protocol in tribes listener socket;
Date Mon, 04 Feb 2013 01:39:08 GMT
Using Tomcat 7.0.35 embedded in Java standalone application. Java SE 1.7.0.
Ubuntu 12.04

Hi All,

I have an experimental class below. The aim is just to open a listening
port on port 4000 in the "localhost" address.
When this has run, the address for the listener is "127.0.0.1" in other
words an IPv4 address.
However the SocksSocketImpl object representing the real socket continues
to display the* useV4* property as *false*
and my Ubuntu system displays the listening socket as "tpc6".

I suspect there is some configuration issue somewhere and if anyone can
help with this, I would be most grateful.

I have also noted that the java.nio.channels.spi.SelectorProvider cannot
return a Provider from loadProviderFromProperty() or loadProviderAsService()
so therefore issues *provider =
sun.nio.ch.DefaultSelectorProvider.create()*resulting in a
ServerSocketChannel that is of type
*sun.nio.ch.ServerSocketChannelImpl*
and a ServerSocket of type *sun.nio.ch.ServerSocketAdapter*. I'm not sure
that these are intended and may be I need a system property named
"java.nio.channels.spi.SelectorProvider" to ensure some other
SelectorProvider and therefore different ServerSocketChannel and
ServerSocket types.

public class TribalAfiliations{
 Channel myChannel;
 private static class MyMemberListener implements MembershipListener{...}
 private static class MyMessageListener implements ChannelListener{...}

 TribalAfiliations() throws SocketException{
 this.myChannel=new GroupChannel();
 ChannelListener msgListener = new TribalAfiliations.MyMessageListener();
 MembershipListener mbrListener = new TribalAfiliations.MyMemberListener();
 myChannel.addMembershipListener(mbrListener);
 myChannel.addChannelListener(msgListener);
   try{

myChannel.start(Channel.MBR_TX_SEQ|Channel.MBR_RX_SEQ|Channel.SND_TX_SEQ|Channel.SND_RX_SEQ);
   /// same problem, with    myChannel.start(Channel.DEFAULT);
   }
   catch(ChannelException e){
   System.out.println(e.getMessage());
   }
 }






-- 
Vince Stewart

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message