incubator-yoko-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r485802 - in /incubator/yoko/trunk: core/src/main/java/org/apache/yoko/orb/OB/GIOPConnection.java rmi-impl/src/main/java/org/apache/yoko/rmi/impl/TypeRepository.java
Date Mon, 11 Dec 2006 18:39:18 GMT
Author: rickmcguire
Date: Mon Dec 11 10:39:17 2006
New Revision: 485802

URL: http://svn.apache.org/viewvc?view=rev&rev=485802
Log:
YOKO-241 The code base runtime is only getting set during reply processing, not request processing.


Modified:
    incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/GIOPConnection.java
    incubator/yoko/trunk/rmi-impl/src/main/java/org/apache/yoko/rmi/impl/TypeRepository.java

Modified: incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/GIOPConnection.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/GIOPConnection.java?view=diff&rev=485802&r1=485801&r2=485802
==============================================================================
--- incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/GIOPConnection.java (original)
+++ incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/GIOPConnection.java Mon
Dec 11 10:39:17 2006
@@ -77,7 +77,7 @@
 
     //
     // task to execute when ACM timer signal arrives
-    // 
+    //
     final class ACMTask extends java.util.TimerTask {
         GIOPConnection connection_;
 
@@ -88,7 +88,7 @@
         public void run() {
             //
             // execute the callback method
-            // 
+            //
             connection_.ACM_callback();
 
             //
@@ -104,22 +104,22 @@
 
     //
     // the ORB instance this connection is bound with
-    // 
+    //
     protected ORBInstance orbInstance_ = null;
 
     //
     // transport this connection represents
-    // 
+    //
     protected org.apache.yoko.orb.OCI.Transport transport_ = null;
 
     //
     // Client parent (null if server-side only)
-    // 
+    //
     protected GIOPClient client_ = null;
 
     //
     // Object-adapter interface (null if client-side only)
-    // 
+    //
     protected OAInterface oaInterface_ = null;
 
     //
@@ -149,7 +149,7 @@
 
     //
     // code converters used by the connection
-    // 
+    //
     protected CodeConverters codeConverters_ = null;
 
     //
@@ -185,7 +185,7 @@
     synchronized protected boolean canSendCloseConnection() {
         //
         // any GIOP versioned server can send a CloseConnection
-        // 
+        //
         if ((properties_ & Property.ServerEnabled) != 0)
             return true;
 
@@ -351,7 +351,7 @@
 
         //
         // hand off message type processing
-        // 
+        //
         switch (msg.type().value()) {
         case org.omg.GIOP.MsgType_1_1._Reply:
             processReply(msg);
@@ -462,7 +462,7 @@
         //
         if ((properties_ & Property.CreatedByClient) != 0) {
             if (setOAInterface(profileInfo) == false) {
-                // 
+                //
                 // we can't find an appropriate OAInterface in order
                 // to direct the upcall so we must simply not handle
                 // this request
@@ -471,15 +471,20 @@
             }
         }
 
-        // 
+        //
         // Parse the SCL, examining it for various codeset info
-        // 
+        //
         readCodeConverters(scl.value);
         if (codeConverters_ != null)
             in._OB_codeConverters(codeConverters_, (version.major << 8)
                     | version.minor);
 
         //
+        // read in the peer's sendig context runtime object
+        //
+        assignSendingContextRuntime(in, scl.value);
+
+        //
         // New upcall will be started
         //
         if (response.value)
@@ -530,7 +535,7 @@
         down.setReplySCL(scl.value);
         org.apache.yoko.orb.CORBA.InputStream in = msg.input();
 
-        // 
+        //
         // read in the peer's sendig context runtime object
         //
         assignSendingContextRuntime(in, scl.value);
@@ -580,7 +585,7 @@
         case org.omg.GIOP.ReplyStatusType_1_2._NEEDS_ADDRESSING_MODE:
             //
             // TODO: implement
-            // 
+            //
             processException(
                     State.Error,
                     new org.omg.CORBA.NO_IMPLEMENT(
@@ -605,10 +610,10 @@
 
     private void assignSendingContextRuntime(InputStream in, ServiceContext[] scl) {
         if (serverRuntime_ == null) {
-            serverRuntime_ 
+            serverRuntime_
                 = Util.getSendingContextRuntime (orbInstance_, scl);
         }
-        
+
         in.__setSendingContextRuntime(serverRuntime_);
 
 	}
@@ -913,7 +918,7 @@
             //
             // change the enabled/disable operations and break the
             // cyclic dependency with GIOPClient
-            // 
+            //
             switch (state) {
             case State.Error:
                 enabledOps_ &= ~(AccessOp.Read | AccessOp.Write);
@@ -937,7 +942,7 @@
 
         //
         // apply the shutdown
-        // 
+        //
         if (state == State.Error) {
             abortiveShutdown();
         } else if (state == State.Closed) {
@@ -967,7 +972,7 @@
         synchronized (this) {
             //
             // no need to do anything if we are closed
-            // 
+            //
             if (state_ == State.Closed)
                 return;
 
@@ -1046,7 +1051,7 @@
             org.apache.yoko.orb.OCI.Transport transport, GIOPClient client) {
         //
         // set member properties
-        // 
+        //
         orbInstance_ = orbInstance;
         transport_ = transport;
         client_ = client;
@@ -1056,13 +1061,13 @@
 
         //
         // read ACM properties
-        // 
+        //
         String value;
         java.util.Properties properties = orbInstance_.getProperties();
 
         //
         // the shutdown timeout for the client
-        // 
+        //
         value = properties.getProperty("yoko.orb.client_shutdown_timeout");
         if (value != null)
             shutdownTimeout_ = Integer.parseInt(value);
@@ -1093,7 +1098,7 @@
             org.apache.yoko.orb.OCI.Transport transport, OAInterface oa) {
         //
         // set members
-        // 
+        //
         orbInstance_ = orbInstance;
         transport_ = transport;
         oaInterface_ = oa;
@@ -1101,13 +1106,13 @@
 
         //
         // read ACM properties
-        // 
+        //
         String value;
         java.util.Properties properties = orbInstance_.getProperties();
 
         //
         // the shutdown timeout for the client
-        // 
+        //
         value = properties.getProperty("yoko.orb.server_shutdown_timeout");
         if (value != null)
             shutdownTimeout_ = Integer.parseInt(value);
@@ -1122,7 +1127,7 @@
 
     //
     // start populating the reply data
-    // 
+    //
     public void upcallBeginReply(Upcall upcall, org.omg.IOP.ServiceContext[] scl) {
         upcall.createOutputStream(12);
         org.apache.yoko.orb.CORBA.OutputStream out = upcall.output();
@@ -1148,7 +1153,7 @@
 
     //
     // finished reply construction; ready its return
-    // 
+    //
     public void upcallEndReply(Upcall upcall) {
         //
         // Make sure the transport can send a reply
@@ -1200,7 +1205,7 @@
 
     //
     // start populating the reply with a user exception
-    // 
+    //
     public void upcallBeginUserException(Upcall upcall,
             org.omg.IOP.ServiceContext[] scl) {
         upcall.createOutputStream(12);
@@ -1233,7 +1238,7 @@
 
     //
     // populate and send the reply with a UserException
-    // 
+    //
     public void upcallUserException(Upcall upcall,
             org.omg.CORBA.UserException ex, org.omg.IOP.ServiceContext[] scl) {
         upcall.createOutputStream(12);
@@ -1324,7 +1329,7 @@
 
     //
     // enable this connection for processing as a client
-    // 
+    //
     synchronized public void activateClientSide(GIOPClient client) {
         Assert._OB_assert(client_ == null);
 
@@ -1418,7 +1423,7 @@
             //
             // make sure to update the state since some of the actions
             // will key off this new state
-            // 
+            //
             state_ = newState;
         }
 
@@ -1427,7 +1432,7 @@
 
             //
             // set the new accessable operations
-            // 
+            //
             synchronized (this) {
                 enabledOps_ = AccessOp.Read | AccessOp.Write;
             }
@@ -1480,7 +1485,7 @@
             //
             // we can't read or write in the error state but we can
             // close ourself down
-            // 
+            //
             synchronized (this) {
                 enabledOps_ = AccessOp.Close;
             }

Modified: incubator/yoko/trunk/rmi-impl/src/main/java/org/apache/yoko/rmi/impl/TypeRepository.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/rmi-impl/src/main/java/org/apache/yoko/rmi/impl/TypeRepository.java?view=diff&rev=485802&r1=485801&r2=485802
==============================================================================
--- incubator/yoko/trunk/rmi-impl/src/main/java/org/apache/yoko/rmi/impl/TypeRepository.java
(original)
+++ incubator/yoko/trunk/rmi-impl/src/main/java/org/apache/yoko/rmi/impl/TypeRepository.java
Mon Dec 11 10:39:17 2006
@@ -13,7 +13,7 @@
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
-*/ 
+*/
 
 package org.apache.yoko.rmi.impl;
 



Mime
View raw message