com.sun.corba.se.spi.servicecontext.CodeSetServiceContext Java Examples
The following examples show how to use
com.sun.corba.se.spi.servicecontext.CodeSetServiceContext.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ORBConfiguratorImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private void initServiceContextRegistry( ORB orb ) { ServiceContextRegistry scr = orb.getServiceContextRegistry() ; scr.register( UEInfoServiceContext.class ) ; scr.register( CodeSetServiceContext.class ) ; scr.register( SendingContextServiceContext.class ) ; scr.register( ORBVersionServiceContext.class ) ; scr.register( MaxStreamFormatVersionServiceContext.class ) ; }
Example #2
Source File: ORBConfiguratorImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private void initServiceContextRegistry( ORB orb ) { ServiceContextRegistry scr = orb.getServiceContextRegistry() ; scr.register( UEInfoServiceContext.class ) ; scr.register( CodeSetServiceContext.class ) ; scr.register( SendingContextServiceContext.class ) ; scr.register( ORBVersionServiceContext.class ) ; scr.register( MaxStreamFormatVersionServiceContext.class ) ; }
Example #3
Source File: ORBConfiguratorImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private void initServiceContextRegistry( ORB orb ) { ServiceContextRegistry scr = orb.getServiceContextRegistry() ; scr.register( UEInfoServiceContext.class ) ; scr.register( CodeSetServiceContext.class ) ; scr.register( SendingContextServiceContext.class ) ; scr.register( ORBVersionServiceContext.class ) ; scr.register( MaxStreamFormatVersionServiceContext.class ) ; }
Example #4
Source File: ORBConfiguratorImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private void initServiceContextRegistry( ORB orb ) { ServiceContextRegistry scr = orb.getServiceContextRegistry() ; scr.register( UEInfoServiceContext.class ) ; scr.register( CodeSetServiceContext.class ) ; scr.register( SendingContextServiceContext.class ) ; scr.register( ORBVersionServiceContext.class ) ; scr.register( MaxStreamFormatVersionServiceContext.class ) ; }
Example #5
Source File: ORBConfiguratorImpl.java From JDKSourceCode1.8 with MIT License | 5 votes |
private void initServiceContextRegistry( ORB orb ) { ServiceContextRegistry scr = orb.getServiceContextRegistry() ; scr.register( UEInfoServiceContext.class ) ; scr.register( CodeSetServiceContext.class ) ; scr.register( SendingContextServiceContext.class ) ; scr.register( ORBVersionServiceContext.class ) ; scr.register( MaxStreamFormatVersionServiceContext.class ) ; }
Example #6
Source File: ORBConfiguratorImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
private void initServiceContextRegistry( ORB orb ) { ServiceContextRegistry scr = orb.getServiceContextRegistry() ; scr.register( UEInfoServiceContext.class ) ; scr.register( CodeSetServiceContext.class ) ; scr.register( SendingContextServiceContext.class ) ; scr.register( ORBVersionServiceContext.class ) ; scr.register( MaxStreamFormatVersionServiceContext.class ) ; }
Example #7
Source File: ORBConfiguratorImpl.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
private void initServiceContextRegistry( ORB orb ) { ServiceContextRegistry scr = orb.getServiceContextRegistry() ; scr.register( UEInfoServiceContext.class ) ; scr.register( CodeSetServiceContext.class ) ; scr.register( SendingContextServiceContext.class ) ; scr.register( ORBVersionServiceContext.class ) ; scr.register( MaxStreamFormatVersionServiceContext.class ) ; }
Example #8
Source File: ORBConfiguratorImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private void initServiceContextRegistry( ORB orb ) { ServiceContextRegistry scr = orb.getServiceContextRegistry() ; scr.register( UEInfoServiceContext.class ) ; scr.register( CodeSetServiceContext.class ) ; scr.register( SendingContextServiceContext.class ) ; scr.register( ORBVersionServiceContext.class ) ; scr.register( MaxStreamFormatVersionServiceContext.class ) ; }
Example #9
Source File: ORBConfiguratorImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
private void initServiceContextRegistry( ORB orb ) { ServiceContextRegistry scr = orb.getServiceContextRegistry() ; scr.register( UEInfoServiceContext.class ) ; scr.register( CodeSetServiceContext.class ) ; scr.register( SendingContextServiceContext.class ) ; scr.register( ORBVersionServiceContext.class ) ; scr.register( MaxStreamFormatVersionServiceContext.class ) ; }
Example #10
Source File: ORBConfiguratorImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
private void initServiceContextRegistry( ORB orb ) { ServiceContextRegistry scr = orb.getServiceContextRegistry() ; scr.register( UEInfoServiceContext.class ) ; scr.register( CodeSetServiceContext.class ) ; scr.register( SendingContextServiceContext.class ) ; scr.register( ORBVersionServiceContext.class ) ; scr.register( MaxStreamFormatVersionServiceContext.class ) ; }
Example #11
Source File: CorbaServerRequestDispatcherImpl.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** * Handles setting the connection's code sets if required. * Returns true if the CodeSetContext was in the request, false * otherwise. */ protected boolean processCodeSetContext( CorbaMessageMediator request, ServiceContexts contexts) { try { if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext->: " + opAndId(request)); } ServiceContext sc = contexts.get( CodeSetServiceContext.SERVICE_CONTEXT_ID); if (sc != null) { // Somehow a code set service context showed up in the local case. if (request.getConnection() == null) { return true; } // If it's GIOP 1.0, it shouldn't have this context at all. Our legacy // ORBs sent it and we need to know if it's here to make ORB versioning // decisions, but we don't use the contents. if (request.getGIOPVersion().equals(GIOPVersion.V1_0)) { return true; } CodeSetServiceContext cssc = (CodeSetServiceContext)sc ; CodeSetComponentInfo.CodeSetContext csctx = cssc.getCodeSetContext(); // Note on threading: // // getCodeSetContext and setCodeSetContext are synchronized // on the Connection. At worst, this will result in // multiple threads entering this block and calling // setCodeSetContext but not actually changing the // values on the Connection. // // Alternative would be to lock the connection for the // whole block, but it's fine either way. // The connection's codeSetContext is null until we've received a // request with a code set context with the negotiated code sets. if (((CorbaConnection)request.getConnection()) .getCodeSetContext() == null) { // Use these code sets on this connection if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext: " + opAndId(request) + ": Setting code sets to: " + csctx); } ((CorbaConnection)request.getConnection()) .setCodeSetContext(csctx); // We had to read the method name using ISO 8859-1 // (which is the default in the CDRInputStream for // char data), but now we may have a new char // code set. If it isn't ISO8859-1, we must tell // the CDR stream to null any converter references // it has created so that it will reacquire // the code sets again using the new info. // // This should probably compare with the stream's // char code set rather than assuming it's ISO8859-1. // (However, the operation name is almost certainly // ISO8859-1 or ASCII.) if (csctx.getCharCodeSet() != OSFCodeSetRegistry.ISO_8859_1.getNumber()) { ((MarshalInputStream)request.getInputObject()) .resetCodeSetConverters(); } } } // If no code set information is ever sent from the client, // the server will use ISO8859-1 for char and throw an // exception for any wchar transmissions. // // In the local case, we use ORB provided streams for // marshaling and unmarshaling. Currently, they use // ISO8859-1 for char/string and UTF16 for wchar/wstring. return sc != null ; } finally { if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext<-: " + opAndId(request)); } } }
Example #12
Source File: CorbaClientRequestDispatcherImpl.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
protected void addCodeSetServiceContext(CorbaConnection conn, ServiceContexts ctxs, GIOPVersion giopVersion) { // REVISIT. OMG issue 3318 concerning sending the code set // service context more than once was deemed too much for the // RTF. Here's our strategy for the moment: // // Send it on every request (necessary in cases of fragmentation // with multithreaded clients or when the first thing on a // connection is a LocateRequest). Provide an ORB property // to disable multiple sends. // // Note that the connection is null in the local case and no // service context is included. We use the ORB provided // encapsulation streams. // // Also, there will be no negotiation or service context // in GIOP 1.0. ISO8859-1 is used for char/string, and // wchar/wstring are illegal. // if (giopVersion.equals(GIOPVersion.V1_0) || conn == null) return; CodeSetComponentInfo.CodeSetContext codeSetCtx = null; if (conn.getBroker().getORBData().alwaysSendCodeSetServiceContext() || !conn.isPostInitialContexts()) { // Get the negotiated code sets (if any) out of the connection codeSetCtx = conn.getCodeSetContext(); } // Either we shouldn't send the code set service context, or // for some reason, the connection doesn't have its code sets. // Perhaps the server didn't include them in the IOR. Uses // ISO8859-1 for char and makes wchar/wstring illegal. if (codeSetCtx == null) return; CodeSetServiceContext cssc = new CodeSetServiceContext(codeSetCtx); ctxs.put(cssc); }
Example #13
Source File: CorbaClientRequestDispatcherImpl.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
protected void addCodeSetServiceContext(CorbaConnection conn, ServiceContexts ctxs, GIOPVersion giopVersion) { // REVISIT. OMG issue 3318 concerning sending the code set // service context more than once was deemed too much for the // RTF. Here's our strategy for the moment: // // Send it on every request (necessary in cases of fragmentation // with multithreaded clients or when the first thing on a // connection is a LocateRequest). Provide an ORB property // to disable multiple sends. // // Note that the connection is null in the local case and no // service context is included. We use the ORB provided // encapsulation streams. // // Also, there will be no negotiation or service context // in GIOP 1.0. ISO8859-1 is used for char/string, and // wchar/wstring are illegal. // if (giopVersion.equals(GIOPVersion.V1_0) || conn == null) return; CodeSetComponentInfo.CodeSetContext codeSetCtx = null; if (conn.getBroker().getORBData().alwaysSendCodeSetServiceContext() || !conn.isPostInitialContexts()) { // Get the negotiated code sets (if any) out of the connection codeSetCtx = conn.getCodeSetContext(); } // Either we shouldn't send the code set service context, or // for some reason, the connection doesn't have its code sets. // Perhaps the server didn't include them in the IOR. Uses // ISO8859-1 for char and makes wchar/wstring illegal. if (codeSetCtx == null) return; CodeSetServiceContext cssc = new CodeSetServiceContext(codeSetCtx); ctxs.put(cssc); }
Example #14
Source File: CorbaServerRequestDispatcherImpl.java From hottub with GNU General Public License v2.0 | 4 votes |
/** * Handles setting the connection's code sets if required. * Returns true if the CodeSetContext was in the request, false * otherwise. */ protected boolean processCodeSetContext( CorbaMessageMediator request, ServiceContexts contexts) { try { if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext->: " + opAndId(request)); } ServiceContext sc = contexts.get( CodeSetServiceContext.SERVICE_CONTEXT_ID); if (sc != null) { // Somehow a code set service context showed up in the local case. if (request.getConnection() == null) { return true; } // If it's GIOP 1.0, it shouldn't have this context at all. Our legacy // ORBs sent it and we need to know if it's here to make ORB versioning // decisions, but we don't use the contents. if (request.getGIOPVersion().equals(GIOPVersion.V1_0)) { return true; } CodeSetServiceContext cssc = (CodeSetServiceContext)sc ; CodeSetComponentInfo.CodeSetContext csctx = cssc.getCodeSetContext(); // Note on threading: // // getCodeSetContext and setCodeSetContext are synchronized // on the Connection. At worst, this will result in // multiple threads entering this block and calling // setCodeSetContext but not actually changing the // values on the Connection. // // Alternative would be to lock the connection for the // whole block, but it's fine either way. // The connection's codeSetContext is null until we've received a // request with a code set context with the negotiated code sets. if (((CorbaConnection)request.getConnection()) .getCodeSetContext() == null) { // Use these code sets on this connection if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext: " + opAndId(request) + ": Setting code sets to: " + csctx); } ((CorbaConnection)request.getConnection()) .setCodeSetContext(csctx); // We had to read the method name using ISO 8859-1 // (which is the default in the CDRInputStream for // char data), but now we may have a new char // code set. If it isn't ISO8859-1, we must tell // the CDR stream to null any converter references // it has created so that it will reacquire // the code sets again using the new info. // // This should probably compare with the stream's // char code set rather than assuming it's ISO8859-1. // (However, the operation name is almost certainly // ISO8859-1 or ASCII.) if (csctx.getCharCodeSet() != OSFCodeSetRegistry.ISO_8859_1.getNumber()) { ((MarshalInputStream)request.getInputObject()) .resetCodeSetConverters(); } } } // If no code set information is ever sent from the client, // the server will use ISO8859-1 for char and throw an // exception for any wchar transmissions. // // In the local case, we use ORB provided streams for // marshaling and unmarshaling. Currently, they use // ISO8859-1 for char/string and UTF16 for wchar/wstring. return sc != null ; } finally { if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext<-: " + opAndId(request)); } } }
Example #15
Source File: CorbaClientRequestDispatcherImpl.java From hottub with GNU General Public License v2.0 | 4 votes |
protected void addCodeSetServiceContext(CorbaConnection conn, ServiceContexts ctxs, GIOPVersion giopVersion) { // REVISIT. OMG issue 3318 concerning sending the code set // service context more than once was deemed too much for the // RTF. Here's our strategy for the moment: // // Send it on every request (necessary in cases of fragmentation // with multithreaded clients or when the first thing on a // connection is a LocateRequest). Provide an ORB property // to disable multiple sends. // // Note that the connection is null in the local case and no // service context is included. We use the ORB provided // encapsulation streams. // // Also, there will be no negotiation or service context // in GIOP 1.0. ISO8859-1 is used for char/string, and // wchar/wstring are illegal. // if (giopVersion.equals(GIOPVersion.V1_0) || conn == null) return; CodeSetComponentInfo.CodeSetContext codeSetCtx = null; if (conn.getBroker().getORBData().alwaysSendCodeSetServiceContext() || !conn.isPostInitialContexts()) { // Get the negotiated code sets (if any) out of the connection codeSetCtx = conn.getCodeSetContext(); } // Either we shouldn't send the code set service context, or // for some reason, the connection doesn't have its code sets. // Perhaps the server didn't include them in the IOR. Uses // ISO8859-1 for char and makes wchar/wstring illegal. if (codeSetCtx == null) return; CodeSetServiceContext cssc = new CodeSetServiceContext(codeSetCtx); ctxs.put(cssc); }
Example #16
Source File: CorbaServerRequestDispatcherImpl.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** * Handles setting the connection's code sets if required. * Returns true if the CodeSetContext was in the request, false * otherwise. */ protected boolean processCodeSetContext( CorbaMessageMediator request, ServiceContexts contexts) { try { if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext->: " + opAndId(request)); } ServiceContext sc = contexts.get( CodeSetServiceContext.SERVICE_CONTEXT_ID); if (sc != null) { // Somehow a code set service context showed up in the local case. if (request.getConnection() == null) { return true; } // If it's GIOP 1.0, it shouldn't have this context at all. Our legacy // ORBs sent it and we need to know if it's here to make ORB versioning // decisions, but we don't use the contents. if (request.getGIOPVersion().equals(GIOPVersion.V1_0)) { return true; } CodeSetServiceContext cssc = (CodeSetServiceContext)sc ; CodeSetComponentInfo.CodeSetContext csctx = cssc.getCodeSetContext(); // Note on threading: // // getCodeSetContext and setCodeSetContext are synchronized // on the Connection. At worst, this will result in // multiple threads entering this block and calling // setCodeSetContext but not actually changing the // values on the Connection. // // Alternative would be to lock the connection for the // whole block, but it's fine either way. // The connection's codeSetContext is null until we've received a // request with a code set context with the negotiated code sets. if (((CorbaConnection)request.getConnection()) .getCodeSetContext() == null) { // Use these code sets on this connection if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext: " + opAndId(request) + ": Setting code sets to: " + csctx); } ((CorbaConnection)request.getConnection()) .setCodeSetContext(csctx); // We had to read the method name using ISO 8859-1 // (which is the default in the CDRInputStream for // char data), but now we may have a new char // code set. If it isn't ISO8859-1, we must tell // the CDR stream to null any converter references // it has created so that it will reacquire // the code sets again using the new info. // // This should probably compare with the stream's // char code set rather than assuming it's ISO8859-1. // (However, the operation name is almost certainly // ISO8859-1 or ASCII.) if (csctx.getCharCodeSet() != OSFCodeSetRegistry.ISO_8859_1.getNumber()) { ((MarshalInputStream)request.getInputObject()) .resetCodeSetConverters(); } } } // If no code set information is ever sent from the client, // the server will use ISO8859-1 for char and throw an // exception for any wchar transmissions. // // In the local case, we use ORB provided streams for // marshaling and unmarshaling. Currently, they use // ISO8859-1 for char/string and UTF16 for wchar/wstring. return sc != null ; } finally { if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext<-: " + opAndId(request)); } } }
Example #17
Source File: CorbaServerRequestDispatcherImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
/** * Handles setting the connection's code sets if required. * Returns true if the CodeSetContext was in the request, false * otherwise. */ protected boolean processCodeSetContext( CorbaMessageMediator request, ServiceContexts contexts) { try { if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext->: " + opAndId(request)); } ServiceContext sc = contexts.get( CodeSetServiceContext.SERVICE_CONTEXT_ID); if (sc != null) { // Somehow a code set service context showed up in the local case. if (request.getConnection() == null) { return true; } // If it's GIOP 1.0, it shouldn't have this context at all. Our legacy // ORBs sent it and we need to know if it's here to make ORB versioning // decisions, but we don't use the contents. if (request.getGIOPVersion().equals(GIOPVersion.V1_0)) { return true; } CodeSetServiceContext cssc = (CodeSetServiceContext)sc ; CodeSetComponentInfo.CodeSetContext csctx = cssc.getCodeSetContext(); // Note on threading: // // getCodeSetContext and setCodeSetContext are synchronized // on the Connection. At worst, this will result in // multiple threads entering this block and calling // setCodeSetContext but not actually changing the // values on the Connection. // // Alternative would be to lock the connection for the // whole block, but it's fine either way. // The connection's codeSetContext is null until we've received a // request with a code set context with the negotiated code sets. if (((CorbaConnection)request.getConnection()) .getCodeSetContext() == null) { // Use these code sets on this connection if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext: " + opAndId(request) + ": Setting code sets to: " + csctx); } ((CorbaConnection)request.getConnection()) .setCodeSetContext(csctx); // We had to read the method name using ISO 8859-1 // (which is the default in the CDRInputStream for // char data), but now we may have a new char // code set. If it isn't ISO8859-1, we must tell // the CDR stream to null any converter references // it has created so that it will reacquire // the code sets again using the new info. // // This should probably compare with the stream's // char code set rather than assuming it's ISO8859-1. // (However, the operation name is almost certainly // ISO8859-1 or ASCII.) if (csctx.getCharCodeSet() != OSFCodeSetRegistry.ISO_8859_1.getNumber()) { ((MarshalInputStream)request.getInputObject()) .resetCodeSetConverters(); } } } // If no code set information is ever sent from the client, // the server will use ISO8859-1 for char and throw an // exception for any wchar transmissions. // // In the local case, we use ORB provided streams for // marshaling and unmarshaling. Currently, they use // ISO8859-1 for char/string and UTF16 for wchar/wstring. return sc != null ; } finally { if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext<-: " + opAndId(request)); } } }
Example #18
Source File: CorbaClientRequestDispatcherImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
protected void addCodeSetServiceContext(CorbaConnection conn, ServiceContexts ctxs, GIOPVersion giopVersion) { // REVISIT. OMG issue 3318 concerning sending the code set // service context more than once was deemed too much for the // RTF. Here's our strategy for the moment: // // Send it on every request (necessary in cases of fragmentation // with multithreaded clients or when the first thing on a // connection is a LocateRequest). Provide an ORB property // to disable multiple sends. // // Note that the connection is null in the local case and no // service context is included. We use the ORB provided // encapsulation streams. // // Also, there will be no negotiation or service context // in GIOP 1.0. ISO8859-1 is used for char/string, and // wchar/wstring are illegal. // if (giopVersion.equals(GIOPVersion.V1_0) || conn == null) return; CodeSetComponentInfo.CodeSetContext codeSetCtx = null; if (conn.getBroker().getORBData().alwaysSendCodeSetServiceContext() || !conn.isPostInitialContexts()) { // Get the negotiated code sets (if any) out of the connection codeSetCtx = conn.getCodeSetContext(); } // Either we shouldn't send the code set service context, or // for some reason, the connection doesn't have its code sets. // Perhaps the server didn't include them in the IOR. Uses // ISO8859-1 for char and makes wchar/wstring illegal. if (codeSetCtx == null) return; CodeSetServiceContext cssc = new CodeSetServiceContext(codeSetCtx); ctxs.put(cssc); }
Example #19
Source File: CorbaClientRequestDispatcherImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
protected void addCodeSetServiceContext(CorbaConnection conn, ServiceContexts ctxs, GIOPVersion giopVersion) { // REVISIT. OMG issue 3318 concerning sending the code set // service context more than once was deemed too much for the // RTF. Here's our strategy for the moment: // // Send it on every request (necessary in cases of fragmentation // with multithreaded clients or when the first thing on a // connection is a LocateRequest). Provide an ORB property // to disable multiple sends. // // Note that the connection is null in the local case and no // service context is included. We use the ORB provided // encapsulation streams. // // Also, there will be no negotiation or service context // in GIOP 1.0. ISO8859-1 is used for char/string, and // wchar/wstring are illegal. // if (giopVersion.equals(GIOPVersion.V1_0) || conn == null) return; CodeSetComponentInfo.CodeSetContext codeSetCtx = null; if (conn.getBroker().getORBData().alwaysSendCodeSetServiceContext() || !conn.isPostInitialContexts()) { // Get the negotiated code sets (if any) out of the connection codeSetCtx = conn.getCodeSetContext(); } // Either we shouldn't send the code set service context, or // for some reason, the connection doesn't have its code sets. // Perhaps the server didn't include them in the IOR. Uses // ISO8859-1 for char and makes wchar/wstring illegal. if (codeSetCtx == null) return; CodeSetServiceContext cssc = new CodeSetServiceContext(codeSetCtx); ctxs.put(cssc); }
Example #20
Source File: CorbaServerRequestDispatcherImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * Handles setting the connection's code sets if required. * Returns true if the CodeSetContext was in the request, false * otherwise. */ protected boolean processCodeSetContext( CorbaMessageMediator request, ServiceContexts contexts) { try { if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext->: " + opAndId(request)); } ServiceContext sc = contexts.get( CodeSetServiceContext.SERVICE_CONTEXT_ID); if (sc != null) { // Somehow a code set service context showed up in the local case. if (request.getConnection() == null) { return true; } // If it's GIOP 1.0, it shouldn't have this context at all. Our legacy // ORBs sent it and we need to know if it's here to make ORB versioning // decisions, but we don't use the contents. if (request.getGIOPVersion().equals(GIOPVersion.V1_0)) { return true; } CodeSetServiceContext cssc = (CodeSetServiceContext)sc ; CodeSetComponentInfo.CodeSetContext csctx = cssc.getCodeSetContext(); // Note on threading: // // getCodeSetContext and setCodeSetContext are synchronized // on the Connection. At worst, this will result in // multiple threads entering this block and calling // setCodeSetContext but not actually changing the // values on the Connection. // // Alternative would be to lock the connection for the // whole block, but it's fine either way. // The connection's codeSetContext is null until we've received a // request with a code set context with the negotiated code sets. if (((CorbaConnection)request.getConnection()) .getCodeSetContext() == null) { // Use these code sets on this connection if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext: " + opAndId(request) + ": Setting code sets to: " + csctx); } ((CorbaConnection)request.getConnection()) .setCodeSetContext(csctx); // We had to read the method name using ISO 8859-1 // (which is the default in the CDRInputStream for // char data), but now we may have a new char // code set. If it isn't ISO8859-1, we must tell // the CDR stream to null any converter references // it has created so that it will reacquire // the code sets again using the new info. // // This should probably compare with the stream's // char code set rather than assuming it's ISO8859-1. // (However, the operation name is almost certainly // ISO8859-1 or ASCII.) if (csctx.getCharCodeSet() != OSFCodeSetRegistry.ISO_8859_1.getNumber()) { ((MarshalInputStream)request.getInputObject()) .resetCodeSetConverters(); } } } // If no code set information is ever sent from the client, // the server will use ISO8859-1 for char and throw an // exception for any wchar transmissions. // // In the local case, we use ORB provided streams for // marshaling and unmarshaling. Currently, they use // ISO8859-1 for char/string and UTF16 for wchar/wstring. return sc != null ; } finally { if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext<-: " + opAndId(request)); } } }
Example #21
Source File: CorbaClientRequestDispatcherImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
protected void addCodeSetServiceContext(CorbaConnection conn, ServiceContexts ctxs, GIOPVersion giopVersion) { // REVISIT. OMG issue 3318 concerning sending the code set // service context more than once was deemed too much for the // RTF. Here's our strategy for the moment: // // Send it on every request (necessary in cases of fragmentation // with multithreaded clients or when the first thing on a // connection is a LocateRequest). Provide an ORB property // to disable multiple sends. // // Note that the connection is null in the local case and no // service context is included. We use the ORB provided // encapsulation streams. // // Also, there will be no negotiation or service context // in GIOP 1.0. ISO8859-1 is used for char/string, and // wchar/wstring are illegal. // if (giopVersion.equals(GIOPVersion.V1_0) || conn == null) return; CodeSetComponentInfo.CodeSetContext codeSetCtx = null; if (conn.getBroker().getORBData().alwaysSendCodeSetServiceContext() || !conn.isPostInitialContexts()) { // Get the negotiated code sets (if any) out of the connection codeSetCtx = conn.getCodeSetContext(); } // Either we shouldn't send the code set service context, or // for some reason, the connection doesn't have its code sets. // Perhaps the server didn't include them in the IOR. Uses // ISO8859-1 for char and makes wchar/wstring illegal. if (codeSetCtx == null) return; CodeSetServiceContext cssc = new CodeSetServiceContext(codeSetCtx); ctxs.put(cssc); }
Example #22
Source File: CorbaServerRequestDispatcherImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
/** * Handles setting the connection's code sets if required. * Returns true if the CodeSetContext was in the request, false * otherwise. */ protected boolean processCodeSetContext( CorbaMessageMediator request, ServiceContexts contexts) { try { if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext->: " + opAndId(request)); } ServiceContext sc = contexts.get( CodeSetServiceContext.SERVICE_CONTEXT_ID); if (sc != null) { // Somehow a code set service context showed up in the local case. if (request.getConnection() == null) { return true; } // If it's GIOP 1.0, it shouldn't have this context at all. Our legacy // ORBs sent it and we need to know if it's here to make ORB versioning // decisions, but we don't use the contents. if (request.getGIOPVersion().equals(GIOPVersion.V1_0)) { return true; } CodeSetServiceContext cssc = (CodeSetServiceContext)sc ; CodeSetComponentInfo.CodeSetContext csctx = cssc.getCodeSetContext(); // Note on threading: // // getCodeSetContext and setCodeSetContext are synchronized // on the Connection. At worst, this will result in // multiple threads entering this block and calling // setCodeSetContext but not actually changing the // values on the Connection. // // Alternative would be to lock the connection for the // whole block, but it's fine either way. // The connection's codeSetContext is null until we've received a // request with a code set context with the negotiated code sets. if (((CorbaConnection)request.getConnection()) .getCodeSetContext() == null) { // Use these code sets on this connection if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext: " + opAndId(request) + ": Setting code sets to: " + csctx); } ((CorbaConnection)request.getConnection()) .setCodeSetContext(csctx); // We had to read the method name using ISO 8859-1 // (which is the default in the CDRInputStream for // char data), but now we may have a new char // code set. If it isn't ISO8859-1, we must tell // the CDR stream to null any converter references // it has created so that it will reacquire // the code sets again using the new info. // // This should probably compare with the stream's // char code set rather than assuming it's ISO8859-1. // (However, the operation name is almost certainly // ISO8859-1 or ASCII.) if (csctx.getCharCodeSet() != OSFCodeSetRegistry.ISO_8859_1.getNumber()) { ((MarshalInputStream)request.getInputObject()) .resetCodeSetConverters(); } } } // If no code set information is ever sent from the client, // the server will use ISO8859-1 for char and throw an // exception for any wchar transmissions. // // In the local case, we use ORB provided streams for // marshaling and unmarshaling. Currently, they use // ISO8859-1 for char/string and UTF16 for wchar/wstring. return sc != null ; } finally { if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext<-: " + opAndId(request)); } } }
Example #23
Source File: CorbaClientRequestDispatcherImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
protected void addCodeSetServiceContext(CorbaConnection conn, ServiceContexts ctxs, GIOPVersion giopVersion) { // REVISIT. OMG issue 3318 concerning sending the code set // service context more than once was deemed too much for the // RTF. Here's our strategy for the moment: // // Send it on every request (necessary in cases of fragmentation // with multithreaded clients or when the first thing on a // connection is a LocateRequest). Provide an ORB property // to disable multiple sends. // // Note that the connection is null in the local case and no // service context is included. We use the ORB provided // encapsulation streams. // // Also, there will be no negotiation or service context // in GIOP 1.0. ISO8859-1 is used for char/string, and // wchar/wstring are illegal. // if (giopVersion.equals(GIOPVersion.V1_0) || conn == null) return; CodeSetComponentInfo.CodeSetContext codeSetCtx = null; if (conn.getBroker().getORBData().alwaysSendCodeSetServiceContext() || !conn.isPostInitialContexts()) { // Get the negotiated code sets (if any) out of the connection codeSetCtx = conn.getCodeSetContext(); } // Either we shouldn't send the code set service context, or // for some reason, the connection doesn't have its code sets. // Perhaps the server didn't include them in the IOR. Uses // ISO8859-1 for char and makes wchar/wstring illegal. if (codeSetCtx == null) return; CodeSetServiceContext cssc = new CodeSetServiceContext(codeSetCtx); ctxs.put(cssc); }
Example #24
Source File: CorbaServerRequestDispatcherImpl.java From JDKSourceCode1.8 with MIT License | 4 votes |
/** * Handles setting the connection's code sets if required. * Returns true if the CodeSetContext was in the request, false * otherwise. */ protected boolean processCodeSetContext( CorbaMessageMediator request, ServiceContexts contexts) { try { if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext->: " + opAndId(request)); } ServiceContext sc = contexts.get( CodeSetServiceContext.SERVICE_CONTEXT_ID); if (sc != null) { // Somehow a code set service context showed up in the local case. if (request.getConnection() == null) { return true; } // If it's GIOP 1.0, it shouldn't have this context at all. Our legacy // ORBs sent it and we need to know if it's here to make ORB versioning // decisions, but we don't use the contents. if (request.getGIOPVersion().equals(GIOPVersion.V1_0)) { return true; } CodeSetServiceContext cssc = (CodeSetServiceContext)sc ; CodeSetComponentInfo.CodeSetContext csctx = cssc.getCodeSetContext(); // Note on threading: // // getCodeSetContext and setCodeSetContext are synchronized // on the Connection. At worst, this will result in // multiple threads entering this block and calling // setCodeSetContext but not actually changing the // values on the Connection. // // Alternative would be to lock the connection for the // whole block, but it's fine either way. // The connection's codeSetContext is null until we've received a // request with a code set context with the negotiated code sets. if (((CorbaConnection)request.getConnection()) .getCodeSetContext() == null) { // Use these code sets on this connection if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext: " + opAndId(request) + ": Setting code sets to: " + csctx); } ((CorbaConnection)request.getConnection()) .setCodeSetContext(csctx); // We had to read the method name using ISO 8859-1 // (which is the default in the CDRInputStream for // char data), but now we may have a new char // code set. If it isn't ISO8859-1, we must tell // the CDR stream to null any converter references // it has created so that it will reacquire // the code sets again using the new info. // // This should probably compare with the stream's // char code set rather than assuming it's ISO8859-1. // (However, the operation name is almost certainly // ISO8859-1 or ASCII.) if (csctx.getCharCodeSet() != OSFCodeSetRegistry.ISO_8859_1.getNumber()) { ((MarshalInputStream)request.getInputObject()) .resetCodeSetConverters(); } } } // If no code set information is ever sent from the client, // the server will use ISO8859-1 for char and throw an // exception for any wchar transmissions. // // In the local case, we use ORB provided streams for // marshaling and unmarshaling. Currently, they use // ISO8859-1 for char/string and UTF16 for wchar/wstring. return sc != null ; } finally { if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext<-: " + opAndId(request)); } } }
Example #25
Source File: CorbaClientRequestDispatcherImpl.java From JDKSourceCode1.8 with MIT License | 4 votes |
protected void addCodeSetServiceContext(CorbaConnection conn, ServiceContexts ctxs, GIOPVersion giopVersion) { // REVISIT. OMG issue 3318 concerning sending the code set // service context more than once was deemed too much for the // RTF. Here's our strategy for the moment: // // Send it on every request (necessary in cases of fragmentation // with multithreaded clients or when the first thing on a // connection is a LocateRequest). Provide an ORB property // to disable multiple sends. // // Note that the connection is null in the local case and no // service context is included. We use the ORB provided // encapsulation streams. // // Also, there will be no negotiation or service context // in GIOP 1.0. ISO8859-1 is used for char/string, and // wchar/wstring are illegal. // if (giopVersion.equals(GIOPVersion.V1_0) || conn == null) return; CodeSetComponentInfo.CodeSetContext codeSetCtx = null; if (conn.getBroker().getORBData().alwaysSendCodeSetServiceContext() || !conn.isPostInitialContexts()) { // Get the negotiated code sets (if any) out of the connection codeSetCtx = conn.getCodeSetContext(); } // Either we shouldn't send the code set service context, or // for some reason, the connection doesn't have its code sets. // Perhaps the server didn't include them in the IOR. Uses // ISO8859-1 for char and makes wchar/wstring illegal. if (codeSetCtx == null) return; CodeSetServiceContext cssc = new CodeSetServiceContext(codeSetCtx); ctxs.put(cssc); }
Example #26
Source File: CorbaServerRequestDispatcherImpl.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** * Handles setting the connection's code sets if required. * Returns true if the CodeSetContext was in the request, false * otherwise. */ protected boolean processCodeSetContext( CorbaMessageMediator request, ServiceContexts contexts) { try { if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext->: " + opAndId(request)); } ServiceContext sc = contexts.get( CodeSetServiceContext.SERVICE_CONTEXT_ID); if (sc != null) { // Somehow a code set service context showed up in the local case. if (request.getConnection() == null) { return true; } // If it's GIOP 1.0, it shouldn't have this context at all. Our legacy // ORBs sent it and we need to know if it's here to make ORB versioning // decisions, but we don't use the contents. if (request.getGIOPVersion().equals(GIOPVersion.V1_0)) { return true; } CodeSetServiceContext cssc = (CodeSetServiceContext)sc ; CodeSetComponentInfo.CodeSetContext csctx = cssc.getCodeSetContext(); // Note on threading: // // getCodeSetContext and setCodeSetContext are synchronized // on the Connection. At worst, this will result in // multiple threads entering this block and calling // setCodeSetContext but not actually changing the // values on the Connection. // // Alternative would be to lock the connection for the // whole block, but it's fine either way. // The connection's codeSetContext is null until we've received a // request with a code set context with the negotiated code sets. if (((CorbaConnection)request.getConnection()) .getCodeSetContext() == null) { // Use these code sets on this connection if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext: " + opAndId(request) + ": Setting code sets to: " + csctx); } ((CorbaConnection)request.getConnection()) .setCodeSetContext(csctx); // We had to read the method name using ISO 8859-1 // (which is the default in the CDRInputStream for // char data), but now we may have a new char // code set. If it isn't ISO8859-1, we must tell // the CDR stream to null any converter references // it has created so that it will reacquire // the code sets again using the new info. // // This should probably compare with the stream's // char code set rather than assuming it's ISO8859-1. // (However, the operation name is almost certainly // ISO8859-1 or ASCII.) if (csctx.getCharCodeSet() != OSFCodeSetRegistry.ISO_8859_1.getNumber()) { ((MarshalInputStream)request.getInputObject()) .resetCodeSetConverters(); } } } // If no code set information is ever sent from the client, // the server will use ISO8859-1 for char and throw an // exception for any wchar transmissions. // // In the local case, we use ORB provided streams for // marshaling and unmarshaling. Currently, they use // ISO8859-1 for char/string and UTF16 for wchar/wstring. return sc != null ; } finally { if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext<-: " + opAndId(request)); } } }
Example #27
Source File: CorbaClientRequestDispatcherImpl.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
protected void addCodeSetServiceContext(CorbaConnection conn, ServiceContexts ctxs, GIOPVersion giopVersion) { // REVISIT. OMG issue 3318 concerning sending the code set // service context more than once was deemed too much for the // RTF. Here's our strategy for the moment: // // Send it on every request (necessary in cases of fragmentation // with multithreaded clients or when the first thing on a // connection is a LocateRequest). Provide an ORB property // to disable multiple sends. // // Note that the connection is null in the local case and no // service context is included. We use the ORB provided // encapsulation streams. // // Also, there will be no negotiation or service context // in GIOP 1.0. ISO8859-1 is used for char/string, and // wchar/wstring are illegal. // if (giopVersion.equals(GIOPVersion.V1_0) || conn == null) return; CodeSetComponentInfo.CodeSetContext codeSetCtx = null; if (conn.getBroker().getORBData().alwaysSendCodeSetServiceContext() || !conn.isPostInitialContexts()) { // Get the negotiated code sets (if any) out of the connection codeSetCtx = conn.getCodeSetContext(); } // Either we shouldn't send the code set service context, or // for some reason, the connection doesn't have its code sets. // Perhaps the server didn't include them in the IOR. Uses // ISO8859-1 for char and makes wchar/wstring illegal. if (codeSetCtx == null) return; CodeSetServiceContext cssc = new CodeSetServiceContext(codeSetCtx); ctxs.put(cssc); }
Example #28
Source File: CorbaServerRequestDispatcherImpl.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
/** * Handles setting the connection's code sets if required. * Returns true if the CodeSetContext was in the request, false * otherwise. */ protected boolean processCodeSetContext( CorbaMessageMediator request, ServiceContexts contexts) { try { if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext->: " + opAndId(request)); } ServiceContext sc = contexts.get( CodeSetServiceContext.SERVICE_CONTEXT_ID); if (sc != null) { // Somehow a code set service context showed up in the local case. if (request.getConnection() == null) { return true; } // If it's GIOP 1.0, it shouldn't have this context at all. Our legacy // ORBs sent it and we need to know if it's here to make ORB versioning // decisions, but we don't use the contents. if (request.getGIOPVersion().equals(GIOPVersion.V1_0)) { return true; } CodeSetServiceContext cssc = (CodeSetServiceContext)sc ; CodeSetComponentInfo.CodeSetContext csctx = cssc.getCodeSetContext(); // Note on threading: // // getCodeSetContext and setCodeSetContext are synchronized // on the Connection. At worst, this will result in // multiple threads entering this block and calling // setCodeSetContext but not actually changing the // values on the Connection. // // Alternative would be to lock the connection for the // whole block, but it's fine either way. // The connection's codeSetContext is null until we've received a // request with a code set context with the negotiated code sets. if (((CorbaConnection)request.getConnection()) .getCodeSetContext() == null) { // Use these code sets on this connection if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext: " + opAndId(request) + ": Setting code sets to: " + csctx); } ((CorbaConnection)request.getConnection()) .setCodeSetContext(csctx); // We had to read the method name using ISO 8859-1 // (which is the default in the CDRInputStream for // char data), but now we may have a new char // code set. If it isn't ISO8859-1, we must tell // the CDR stream to null any converter references // it has created so that it will reacquire // the code sets again using the new info. // // This should probably compare with the stream's // char code set rather than assuming it's ISO8859-1. // (However, the operation name is almost certainly // ISO8859-1 or ASCII.) if (csctx.getCharCodeSet() != OSFCodeSetRegistry.ISO_8859_1.getNumber()) { ((MarshalInputStream)request.getInputObject()) .resetCodeSetConverters(); } } } // If no code set information is ever sent from the client, // the server will use ISO8859-1 for char and throw an // exception for any wchar transmissions. // // In the local case, we use ORB provided streams for // marshaling and unmarshaling. Currently, they use // ISO8859-1 for char/string and UTF16 for wchar/wstring. return sc != null ; } finally { if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext<-: " + opAndId(request)); } } }
Example #29
Source File: CorbaClientRequestDispatcherImpl.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
protected void addCodeSetServiceContext(CorbaConnection conn, ServiceContexts ctxs, GIOPVersion giopVersion) { // REVISIT. OMG issue 3318 concerning sending the code set // service context more than once was deemed too much for the // RTF. Here's our strategy for the moment: // // Send it on every request (necessary in cases of fragmentation // with multithreaded clients or when the first thing on a // connection is a LocateRequest). Provide an ORB property // to disable multiple sends. // // Note that the connection is null in the local case and no // service context is included. We use the ORB provided // encapsulation streams. // // Also, there will be no negotiation or service context // in GIOP 1.0. ISO8859-1 is used for char/string, and // wchar/wstring are illegal. // if (giopVersion.equals(GIOPVersion.V1_0) || conn == null) return; CodeSetComponentInfo.CodeSetContext codeSetCtx = null; if (conn.getBroker().getORBData().alwaysSendCodeSetServiceContext() || !conn.isPostInitialContexts()) { // Get the negotiated code sets (if any) out of the connection codeSetCtx = conn.getCodeSetContext(); } // Either we shouldn't send the code set service context, or // for some reason, the connection doesn't have its code sets. // Perhaps the server didn't include them in the IOR. Uses // ISO8859-1 for char and makes wchar/wstring illegal. if (codeSetCtx == null) return; CodeSetServiceContext cssc = new CodeSetServiceContext(codeSetCtx); ctxs.put(cssc); }
Example #30
Source File: CorbaServerRequestDispatcherImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
/** * Handles setting the connection's code sets if required. * Returns true if the CodeSetContext was in the request, false * otherwise. */ protected boolean processCodeSetContext( CorbaMessageMediator request, ServiceContexts contexts) { try { if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext->: " + opAndId(request)); } ServiceContext sc = contexts.get( CodeSetServiceContext.SERVICE_CONTEXT_ID); if (sc != null) { // Somehow a code set service context showed up in the local case. if (request.getConnection() == null) { return true; } // If it's GIOP 1.0, it shouldn't have this context at all. Our legacy // ORBs sent it and we need to know if it's here to make ORB versioning // decisions, but we don't use the contents. if (request.getGIOPVersion().equals(GIOPVersion.V1_0)) { return true; } CodeSetServiceContext cssc = (CodeSetServiceContext)sc ; CodeSetComponentInfo.CodeSetContext csctx = cssc.getCodeSetContext(); // Note on threading: // // getCodeSetContext and setCodeSetContext are synchronized // on the Connection. At worst, this will result in // multiple threads entering this block and calling // setCodeSetContext but not actually changing the // values on the Connection. // // Alternative would be to lock the connection for the // whole block, but it's fine either way. // The connection's codeSetContext is null until we've received a // request with a code set context with the negotiated code sets. if (((CorbaConnection)request.getConnection()) .getCodeSetContext() == null) { // Use these code sets on this connection if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext: " + opAndId(request) + ": Setting code sets to: " + csctx); } ((CorbaConnection)request.getConnection()) .setCodeSetContext(csctx); // We had to read the method name using ISO 8859-1 // (which is the default in the CDRInputStream for // char data), but now we may have a new char // code set. If it isn't ISO8859-1, we must tell // the CDR stream to null any converter references // it has created so that it will reacquire // the code sets again using the new info. // // This should probably compare with the stream's // char code set rather than assuming it's ISO8859-1. // (However, the operation name is almost certainly // ISO8859-1 or ASCII.) if (csctx.getCharCodeSet() != OSFCodeSetRegistry.ISO_8859_1.getNumber()) { ((MarshalInputStream)request.getInputObject()) .resetCodeSetConverters(); } } } // If no code set information is ever sent from the client, // the server will use ISO8859-1 for char and throw an // exception for any wchar transmissions. // // In the local case, we use ORB provided streams for // marshaling and unmarshaling. Currently, they use // ISO8859-1 for char/string and UTF16 for wchar/wstring. return sc != null ; } finally { if (orb.subcontractDebugFlag) { dprint(".processCodeSetContext<-: " + opAndId(request)); } } }