Search in sources :

Example 1 with ServantObject

use of org.omg.CORBA.portable.ServantObject in project jdk8u_jdk by JetBrains.

the class _HelloInterface_Stub method sayHelloWithInetAddress.

public String sayHelloWithInetAddress(InetAddress arg0) throws java.rmi.RemoteException {
    if (!Util.isLocal(this)) {
        try {
            org.omg.CORBA_2_3.portable.InputStream in = null;
            try {
                org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) _request("sayHelloWithInetAddress", true);
                out.write_value(arg0, InetAddress.class);
                in = (org.omg.CORBA_2_3.portable.InputStream) _invoke(out);
                return (String) in.read_value(String.class);
            } catch (ApplicationException ex) {
                in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream();
                String $_id = in.read_string();
                throw new UnexpectedException($_id);
            } catch (RemarshalException ex) {
                return sayHelloWithInetAddress(arg0);
            } finally {
                _releaseReply(in);
            }
        } catch (SystemException ex) {
            throw Util.mapSystemException(ex);
        }
    } else {
        ServantObject so = _servant_preinvoke("sayHelloWithInetAddress", HelloInterface.class);
        if (so == null) {
            return sayHelloWithInetAddress(arg0);
        }
        try {
            InetAddress arg0Copy = (InetAddress) Util.copyObject(arg0, _orb());
            return ((HelloInterface) so.servant).sayHelloWithInetAddress(arg0Copy);
        } catch (Throwable ex) {
            Throwable exCopy = (Throwable) Util.copyObject(ex, _orb());
            throw Util.wrapException(exCopy);
        } finally {
            _servant_postinvoke(so);
        }
    }
}
Also used : UnexpectedException(java.rmi.UnexpectedException) InputStream(org.omg.CORBA.portable.InputStream) OutputStream(org.omg.CORBA.portable.OutputStream) RemarshalException(org.omg.CORBA.portable.RemarshalException) ApplicationException(org.omg.CORBA.portable.ApplicationException) SystemException(org.omg.CORBA.SystemException) ServantObject(org.omg.CORBA.portable.ServantObject) InetAddress(java.net.InetAddress)

Example 2 with ServantObject

use of org.omg.CORBA.portable.ServantObject in project jdk8u_jdk by JetBrains.

the class _HelloInterface_Stub method sayHelloWithHashMap.

public String sayHelloWithHashMap(ConcurrentHashMap arg0) throws java.rmi.RemoteException {
    if (!Util.isLocal(this)) {
        try {
            org.omg.CORBA_2_3.portable.InputStream in = null;
            try {
                org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) _request("sayHelloWithHashMap", true);
                out.write_value(arg0, ConcurrentHashMap.class);
                in = (org.omg.CORBA_2_3.portable.InputStream) _invoke(out);
                return (String) in.read_value(String.class);
            } catch (ApplicationException ex) {
                in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream();
                String $_id = in.read_string();
                throw new UnexpectedException($_id);
            } catch (RemarshalException ex) {
                return sayHelloWithHashMap(arg0);
            } finally {
                _releaseReply(in);
            }
        } catch (SystemException ex) {
            throw Util.mapSystemException(ex);
        }
    } else {
        ServantObject so = _servant_preinvoke("sayHelloWithHashMap", HelloInterface.class);
        if (so == null) {
            return sayHelloWithHashMap(arg0);
        }
        try {
            ConcurrentHashMap arg0Copy = (ConcurrentHashMap) Util.copyObject(arg0, _orb());
            return ((HelloInterface) so.servant).sayHelloWithHashMap(arg0Copy);
        } catch (Throwable ex) {
            Throwable exCopy = (Throwable) Util.copyObject(ex, _orb());
            throw Util.wrapException(exCopy);
        } finally {
            _servant_postinvoke(so);
        }
    }
}
Also used : UnexpectedException(java.rmi.UnexpectedException) InputStream(org.omg.CORBA.portable.InputStream) OutputStream(org.omg.CORBA.portable.OutputStream) RemarshalException(org.omg.CORBA.portable.RemarshalException) ApplicationException(org.omg.CORBA.portable.ApplicationException) SystemException(org.omg.CORBA.SystemException) ServantObject(org.omg.CORBA.portable.ServantObject) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap)

Example 3 with ServantObject

use of org.omg.CORBA.portable.ServantObject in project jdk8u_jdk by JetBrains.

the class _HelloInterface_Stub method sayHelloWithReentrantLock.

public String sayHelloWithReentrantLock(ReentrantLock arg0) throws java.rmi.RemoteException {
    if (!Util.isLocal(this)) {
        try {
            org.omg.CORBA_2_3.portable.InputStream in = null;
            try {
                org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) _request("sayHelloWithReentrantLock", true);
                out.write_value(arg0, ReentrantLock.class);
                in = (org.omg.CORBA_2_3.portable.InputStream) _invoke(out);
                return (String) in.read_value(String.class);
            } catch (ApplicationException ex) {
                in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream();
                String $_id = in.read_string();
                throw new UnexpectedException($_id);
            } catch (RemarshalException ex) {
                return sayHelloWithReentrantLock(arg0);
            } finally {
                _releaseReply(in);
            }
        } catch (SystemException ex) {
            throw Util.mapSystemException(ex);
        }
    } else {
        ServantObject so = _servant_preinvoke("sayHelloWithReentrantLock", HelloInterface.class);
        if (so == null) {
            return sayHelloWithReentrantLock(arg0);
        }
        try {
            ReentrantLock arg0Copy = (ReentrantLock) Util.copyObject(arg0, _orb());
            return ((HelloInterface) so.servant).sayHelloWithReentrantLock(arg0Copy);
        } catch (Throwable ex) {
            Throwable exCopy = (Throwable) Util.copyObject(ex, _orb());
            throw Util.wrapException(exCopy);
        } finally {
            _servant_postinvoke(so);
        }
    }
}
Also used : ReentrantLock(java.util.concurrent.locks.ReentrantLock) UnexpectedException(java.rmi.UnexpectedException) InputStream(org.omg.CORBA.portable.InputStream) OutputStream(org.omg.CORBA.portable.OutputStream) RemarshalException(org.omg.CORBA.portable.RemarshalException) ApplicationException(org.omg.CORBA.portable.ApplicationException) SystemException(org.omg.CORBA.SystemException) ServantObject(org.omg.CORBA.portable.ServantObject)

Example 4 with ServantObject

use of org.omg.CORBA.portable.ServantObject in project jdk8u_jdk by JetBrains.

the class _HelloInterface_Stub method sayHelloToTest.

public String sayHelloToTest(Test arg0) throws java.rmi.RemoteException {
    if (!Util.isLocal(this)) {
        try {
            org.omg.CORBA_2_3.portable.InputStream in = null;
            try {
                org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) _request("sayHelloToTest", true);
                out.write_value(arg0, Test.class);
                in = (org.omg.CORBA_2_3.portable.InputStream) _invoke(out);
                return (String) in.read_value(String.class);
            } catch (ApplicationException ex) {
                in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream();
                String $_id = in.read_string();
                throw new UnexpectedException($_id);
            } catch (RemarshalException ex) {
                return sayHelloToTest(arg0);
            } finally {
                _releaseReply(in);
            }
        } catch (SystemException ex) {
            throw Util.mapSystemException(ex);
        }
    } else {
        ServantObject so = _servant_preinvoke("sayHelloToTest", HelloInterface.class);
        if (so == null) {
            return sayHelloToTest(arg0);
        }
        try {
            Test arg0Copy = (Test) Util.copyObject(arg0, _orb());
            return ((HelloInterface) so.servant).sayHelloToTest(arg0Copy);
        } catch (Throwable ex) {
            Throwable exCopy = (Throwable) Util.copyObject(ex, _orb());
            throw Util.wrapException(exCopy);
        } finally {
            _servant_postinvoke(so);
        }
    }
}
Also used : UnexpectedException(java.rmi.UnexpectedException) InputStream(org.omg.CORBA.portable.InputStream) OutputStream(org.omg.CORBA.portable.OutputStream) RemarshalException(org.omg.CORBA.portable.RemarshalException) ApplicationException(org.omg.CORBA.portable.ApplicationException) SystemException(org.omg.CORBA.SystemException) ServantObject(org.omg.CORBA.portable.ServantObject)

Example 5 with ServantObject

use of org.omg.CORBA.portable.ServantObject in project JFramework by gugumall.

the class _ServiceBase_Stub method auth.

public String auth(String arg0, String arg1, String arg2) throws java.rmi.RemoteException {
    if (!Util.isLocal(this)) {
        try {
            org.omg.CORBA_2_3.portable.InputStream in = null;
            try {
                org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) _request("auth__CORBA_WStringValue__CORBA_WStringValue__CORBA_WStringValue", true);
                out.write_value(arg0, String.class);
                out.write_value(arg1, String.class);
                out.write_value(arg2, String.class);
                in = (org.omg.CORBA_2_3.portable.InputStream) _invoke(out);
                return (String) in.read_value(String.class);
            } catch (ApplicationException ex) {
                in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream();
                String $_id = in.read_string();
                throw new UnexpectedException($_id);
            } catch (RemarshalException ex) {
                return auth(arg0, arg1, arg2);
            } finally {
                _releaseReply(in);
            }
        } catch (SystemException ex) {
            throw Util.mapSystemException(ex);
        }
    } else {
        ServantObject so = _servant_preinvoke("auth__CORBA_WStringValue__CORBA_WStringValue__CORBA_WStringValue", ServiceBase.class);
        if (so == null) {
            return auth(arg0, arg1, arg2);
        }
        try {
            return ((ServiceBase) so.servant).auth(arg0, arg1, arg2);
        } catch (Throwable ex) {
            Throwable exCopy = (Throwable) Util.copyObject(ex, _orb());
            throw Util.wrapException(exCopy);
        } finally {
            _servant_postinvoke(so);
        }
    }
}
Also used : UnexpectedException(java.rmi.UnexpectedException) InputStream(org.omg.CORBA.portable.InputStream) OutputStream(org.omg.CORBA.portable.OutputStream) RemarshalException(org.omg.CORBA.portable.RemarshalException) ApplicationException(org.omg.CORBA.portable.ApplicationException) SystemException(org.omg.CORBA.SystemException) ServantObject(org.omg.CORBA.portable.ServantObject)

Aggregations

UnexpectedException (java.rmi.UnexpectedException)28 SystemException (org.omg.CORBA.SystemException)28 ApplicationException (org.omg.CORBA.portable.ApplicationException)28 InputStream (org.omg.CORBA.portable.InputStream)28 OutputStream (org.omg.CORBA.portable.OutputStream)28 RemarshalException (org.omg.CORBA.portable.RemarshalException)28 ServantObject (org.omg.CORBA.portable.ServantObject)28 JSession (j.app.webserver.JSession)7 HttpServletRequest (javax.servlet.http.HttpServletRequest)7 HttpServletResponse (javax.servlet.http.HttpServletResponse)7 HttpSession (javax.servlet.http.HttpSession)7 PortableRemoteObject (javax.rmi.PortableRemoteObject)5 ServiceBase (j.service.server.ServiceBase)2 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)2 InetAddress (java.net.InetAddress)1 HashMap (java.util.HashMap)1 ReentrantLock (java.util.concurrent.locks.ReentrantLock)1