users@glassfish.java.net

Re: Accessing GlassFish Beans

From: <glassfish_at_javadesktop.org>
Date: Sat, 12 May 2007 06:22:54 PDT

Good day!
I try to test IIOP LBFO by simple app:
ejb-jar:
----------------------
@Remote
public interface SLSB0413A
{
        public String get1();
}

@Stateless
public class SLSB0413AImpl implements SLSB0413A
{
        public String get1()
        {
                return toString();
        }
}
----------------------
client code:
----------------------
System.setProperty("com.sun.appserv.iiop.endpoints", "localhost:33700,localhost:33701");
SLSB0413A b = (SLSB0413A)(new InitialContext()).lookup(SLSB0413A.class.getCanonicalName());
System.out.println(b.get1());
----------------------

And client code works fine only if FIRST addressed instance is running. Otherwise exception occures:
-------------------------------
12.05.2007 17:05:24 com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: sinus.inter.local; port: 33700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
        at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2371)
        at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2392)
        at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:230)
        at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:243)
        at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
        at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:165)
        at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:154)
        at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:294)
        at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
        at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
        at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:127)
        at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:182)
        at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:339)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
        at com.sun.enterprise.util.Utility.lookupObject(Utility.java:145)
        at com.sun.enterprise.ServerConfiguration.<init>(ServerConfiguration.java:96)
        at com.sun.enterprise.ServerConfiguration.getConfiguration(ServerConfiguration.java:80)
        at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.createTransactionManager(J2EETransactionManagerImpl.java:294)
        at com.sun.enterprise.appclient.AppContainer.preInvoke(AppContainer.java:142)
        at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:347)
        at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:241)
        at com.sun.enterprise.appclient.Main.main(Main.java:200)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
        at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:347)
        at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:213)
        ... 19 more
Caused by: java.net.ConnectException: Connection refused: connect
        at sun.nio.ch.Net.connect(Native Method)
        at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:464)
        at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
        at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:331)
        ... 20 more
--------------------------------
Client runs either as stanalone or in the ACC (in this case iiop listeners specified in sun-acc.xml).

Can you suggest me?
Thanks.

GF2, b46
WinXP
[Message sent by forum member 'sinus' (sinus)]

http://forums.java.net/jive/thread.jspa?messageID=216591