geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r332223 - in /geronimo/trunk/sandbox/freeorb/geronimo-orb: ./ src/main/java/org/apache/geronimo/corba/ src/main/java/org/apache/geronimo/corba/cdr/ src/main/java/org/apache/geronimo/corba/channel/nio/ src/main/java/org/apache/geronimo/corba...
Date Thu, 10 Nov 2005 04:46:06 GMT
Author: adc
Date: Wed Nov  9 20:45:59 2005
New Revision: 332223

URL: http://svn.apache.org/viewcvs?rev=332223&view=rev
Log:
GERONIMO-1111

Added:
    geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/TaggedComponentSeqHelper.java
Modified:
    geronimo/trunk/sandbox/freeorb/geronimo-orb/   (props changed)
    geronimo/trunk/sandbox/freeorb/geronimo-orb/pom.xml
    geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/AbstractORB.java
    geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/SingletonORB.java
    geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/TypeCodeUtil.java
    geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/cdr/ByteBufferReader.java
    geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/cdr/CDRInputStream.java
    geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/cdr/CDROutputStream.java
    geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/cdr/InputStreamController.java
    geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/nio/SyncNIOTransport.java
    geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/nio/SyncNIOTransportManager.java
    geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/CSIClientRequestInterceptor.java
    geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/CSIInterceptorBase.java
    geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/CSIPolicyFactory.java
    geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/CSIServerRequestInterceptor.java
    geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/GSSUPIORInterceptor.java
    geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/InputStreamBase.java
    geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/ValueWriter.java
    geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/IIOPProfile.java
    geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/MultiComponentProfile.java

Propchange: geronimo/trunk/sandbox/freeorb/geronimo-orb/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Nov  9 20:45:59 2005
@@ -0,0 +1,4 @@
+target
+*.iml
+*.ipr
+*.iws

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/pom.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/pom.xml?rev=332223&r1=332222&r2=332223&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/pom.xml (original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/pom.xml Wed Nov  9 20:45:59 2005
@@ -31,7 +31,7 @@
         </dependency>
 
         <dependency>
-            <groupId>geronimo-spec</groupId>
+            <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-spec-corba</artifactId>
             <version>2.3-rc4</version>
         </dependency>      

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/AbstractORB.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/AbstractORB.java?rev=332223&r1=332222&r2=332223&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/AbstractORB.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/AbstractORB.java
Wed Nov  9 20:45:59 2005
@@ -163,7 +163,7 @@
 
 
     public org.omg.CORBA.Any create_any() {
-        return new org.freeorb.AnyImpl(this);
+        return new AnyImpl(this);
     }
 
     public GIOPVersion getGIOPVersion() {

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/SingletonORB.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/SingletonORB.java?rev=332223&r1=332222&r2=332223&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/SingletonORB.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/SingletonORB.java
Wed Nov  9 20:45:59 2005
@@ -139,7 +139,7 @@
     }
 
     public org.omg.CORBA.Any create_any() {
-        return new org.freeorb.AnyImpl(this);
+        return new AnyImpl(this);
     }
 
     public org.omg.CORBA.portable.OutputStream create_output_stream() {

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/TypeCodeUtil.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/TypeCodeUtil.java?rev=332223&r1=332222&r2=332223&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/TypeCodeUtil.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/TypeCodeUtil.java
Wed Nov  9 20:45:59 2005
@@ -593,7 +593,8 @@
             out.write_long(-1);
             out.write_long(pos.intValue() - out.__stream_position());
         } else {
-            org.omg.CORBA.TCKindHelper.write(out, tc.kind());
+        	    out.write_long(tc.kind().value());
+            // org.omg.CORBA.TCKindHelper.write(out, tc.kind());
             pos = new Integer(out.__stream_position() - 4);
 
             switch (tc.kind().value()) {

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/cdr/ByteBufferReader.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/cdr/ByteBufferReader.java?rev=332223&r1=332222&r2=332223&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/cdr/ByteBufferReader.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/cdr/ByteBufferReader.java
Wed Nov  9 20:45:59 2005
@@ -1,91 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  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.geronimo.corba.cdr;
-
-import java.nio.ByteBuffer;
-
-import EDU.oswego.cs.dl.util.concurrent.Semaphore;
-
-
-public class ByteBufferReader {
-
-    Semaphore full;
-
-    Semaphore empty;
-
-    int readpos;
-
-    int writepos;
-
-    ByteBuffer storage;
-
-    ByteBufferReader(ByteBuffer buf) {
-        storage = buf;
-        full = new Semaphore(buf.remaining());
-        empty = new Semaphore(0);
-    }
-
-    void readSome() {
-        int howmuch = (int) full.permits();
-        int howmany = acquire(full, Math.min(howmuch, 1));
-
-        if (readpos < writepos) {
-
-            int first_write = Math.min(howmany, storage.limit() - writepos);
-
-            storage.position(writepos);
-            storage.limit(writepos + first_write);
-
-            ByteBuffer buf1 = storage.slice();
-
-            storage.position(0);
-
-            int howmuchread;
-            if (first_write == howmany) {
-                storage.limit(storage.capacity());
-                howmuchread = single_read(buf1);
-            } else {
-                int second_write = howmany - first_write;
-                storage.limit(second_write);
-                ByteBuffer buf2 = storage.slice();
-                howmuchread = vector_read(buf1, buf2);
-            }
-
-            if (howmuchread < howmany) {
-                full.release(howmany - howmuchread);
-            }
-            empty.release(howmuchread);
-
-            writepos = (writepos + howmuchread) % storage.capacity();
-
-        }
-    }
-
-    private int acquire(Semaphore sem, int howmany) {
-        for (int l = 0; l < howmany; l++) {
-            try {
-                sem.acquire();
-            }
-            catch (InterruptedException ex) {
-                return l;
-            }
-        }
-
-        return howmany;
-    }
-
-}

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/cdr/CDRInputStream.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/cdr/CDRInputStream.java?rev=332223&r1=332222&r2=332223&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/cdr/CDRInputStream.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/cdr/CDRInputStream.java
Wed Nov  9 20:45:59 2005
@@ -1,109 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  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.geronimo.corba.cdr;
-
-import java.nio.ByteBuffer;
-
-import org.omg.CORBA_2_3.portable.InputStream;
-
-import org.apache.geronimo.corba.AbstractORB;
-import org.apache.geronimo.corba.ORB;
-import org.apache.geronimo.corba.io.GIOPVersion;
-
-
-public abstract class CDRInputStream extends InputStream {
-
-    private ByteBuffer buf;
-
-    private GIOPVersion giop_version;
-
-    private ORB orb;
-
-    public CDRInputStream(ORB orb, ByteBuffer buf, GIOPVersion version,
-                          InputStreamController ctrl)
-    {
-        this.giop_version = version;
-        this.orb = orb;
-        this.buf = buf;
-    }
-
-    protected final int computeAlignment(int align) {
-        if (align > 1) {
-            int incr = buf.position() & (align - 1);
-            if (incr != 0)
-                return align - incr;
-        }
-
-        return 0;
-    }
-
-    public int getSize() {
-        return buf.position();
-    }
-
-    void alignAndCheck(int size, int align) {
-        int a = computeAlignment(align);
-        buf.position(buf.position() + a);
-
-        if (buf.remaining() < size) {
-            grow(size);
-        }
-    }
-
-    public int read_long() {
-        alignAndCheck(4, 4);
-        return buf.getInt();
-    }
-
-    public void __readEndian() {
-        // TODO Auto-generated method stub
-
-    }
-
-    /**
-     * Create an inputstream that reads data from the given byte array
-     */
-    public static CDRInputStream create(byte[] data) {
-        return create(ByteBuffer.wrap(data));
-    }
-
-    public static CDRInputStream create(ByteBuffer buf) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public int __get_input_position() {
-        // TODO Auto-generated method stub
-        return 0;
-    }
-
-    public long __beginEncapsulation() {
-        // TODO Auto-generated method stub
-        return 0;
-    }
-
-    public void __endEncapsulation(long encap_state) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public AbstractORB __get_orb() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-}

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/cdr/CDROutputStream.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/cdr/CDROutputStream.java?rev=332223&r1=332222&r2=332223&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/cdr/CDROutputStream.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/cdr/CDROutputStream.java
Wed Nov  9 20:45:59 2005
@@ -1,53 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  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.geronimo.corba.cdr;
-
-import org.omg.CORBA_2_3.portable.OutputStream;
-
-
-public abstract class CDROutputStream extends OutputStream {
-
-    public void __writeEndian() {
-        // TODO Auto-generated method stub
-
-    }
-
-    /**
-     * Allocate a dynamic in-memory output stream
-     */
-    public static CDROutputStream create() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    /**  */
-    public int __get_output_position() {
-        // TODO Auto-generated method stub
-        return 0;
-    }
-
-    public long __beginEncapsulation() {
-        // TODO Auto-generated method stub
-        return 0;
-    }
-
-    public void __finishEncapsulation(long encap_state) {
-        // TODO Auto-generated method stub
-
-    }
-
-}

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/cdr/InputStreamController.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/cdr/InputStreamController.java?rev=332223&r1=332222&r2=332223&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/cdr/InputStreamController.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/cdr/InputStreamController.java
Wed Nov  9 20:45:59 2005
@@ -1,22 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  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.geronimo.corba.cdr;
-
-public interface InputStreamController {
-
-    void underrun();
-}

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/nio/SyncNIOTransport.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/nio/SyncNIOTransport.java?rev=332223&r1=332222&r2=332223&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/nio/SyncNIOTransport.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/nio/SyncNIOTransport.java
Wed Nov  9 20:45:59 2005
@@ -17,57 +17,75 @@
 package org.apache.geronimo.corba.channel.nio;
 
 import java.io.IOException;
+import java.net.Socket;
 import java.nio.channels.SocketChannel;
 
 import org.apache.geronimo.corba.channel.InputChannel;
 import org.apache.geronimo.corba.channel.InputHandler;
 import org.apache.geronimo.corba.channel.OutputChannel;
 import org.apache.geronimo.corba.channel.RingByteBuffer;
+import org.apache.geronimo.corba.channel.SocketTransportBase;
 import org.apache.geronimo.corba.channel.Transport;
+import org.apache.geronimo.corba.channel.TransportManager;
 
 
-public class SyncNIOTransport extends Transport {
+public class SyncNIOTransport extends SocketTransportBase {
 
-    private final SyncNIOTransportManager manager;
+	protected SyncNIOTransport(TransportManager manager, InputHandler handler, Socket sock)
{
+		super(manager, handler, sock);
+	}
 
-    private final SocketChannel chan;
+	protected RingByteBuffer allocateSendBuffer(int bufferSize) {
 
-    private final InputHandler handler;
+        return new RingByteBuffer(bufferSize, false) {
 
-    private ParticipationExecutor executor;
+            protected void bufferFullHook(String how) throws IOException {
+            	
+                if (!sock.isOutputShutdown()) {
+                    flushSendBuffer();
+                }
+            }
+
+            protected void bufferEmptyHook(String how) {
+                // what do we care? //
+            }
+
+            /**
+             * the send buffer was closed(), and we have send everything
+             */
+            protected void readEOFHook() {
+                // do nothing //
+                try {
+                    sock.shutdownOutput();
+                }
+                catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
 
-    private RingByteBuffer receiveBuffer;
+            protected void relinquishInput() {
+                throw new InternalError();
+            }
 
-    private RingByteBuffer sendBuffer;
+            protected void relinquishOutput() {
+                releaseOutputChannel();
+            }
 
-    static final int RCV_BUFFER_SIZE = getIntProperty(
-            "org.freeorb.rcv_buffer_size", 64 * 1024);
 
-    static final int SND_BUFFER_SIZE = getIntProperty(
-            "org.freeorb.snd_buffer_size", 64 * 1024);
+        };
 
-    private static int getIntProperty(String string, int defaultValue) {
-        try {
-            return Integer.parseInt(System.getProperty(string, ""));
-        }
-        catch (NumberFormatException ex) {
-            return defaultValue;
-        }
-    }
+	}
 
-    public SyncNIOTransport(SyncNIOTransportManager manager,
-                            final SocketChannel chan, InputHandler handler)
-    {
-        this.manager = manager;
-        this.chan = chan;
-        this.handler = handler;
+	protected void flushSendBuffer() throws IOException {
+		sendBuffer.writeTo(sock);
+	}
 
-        this.executor = new ParticipationExecutor(manager.getExecutor());
+	protected RingByteBuffer allocateReceiveBuffer(int bufferSize) {
 
-        receiveBuffer = new RingByteBuffer(RCV_BUFFER_SIZE, true) {
+        return new RingByteBuffer(bufferSize, true) {
 
             public String getName() {
-                return "receive buffer for " + chan.toString();
+                return "receive buffer for " + sock;
             }
 
             protected void bufferFullHook(String how) {
@@ -95,87 +113,12 @@
 
         };
 
-        sendBuffer = new RingByteBuffer("send" + chan.socket(), SND_BUFFER_SIZE) {
-
-            protected void bufferFullHook(String how) throws IOException {
-                if (!chan.socket().isOutputShutdown()) {
-                    flushSendBuffer();
-                }
-            }
-
-            protected void bufferEmptyHook(String how) {
-                // what do we care? //
-            }
-
-            /**
-             * the send buffer was closed(), and we have send everything
-             */
-            protected void readEOFHook() {
-                // do nothing //
-                try {
-                    chan.socket().shutdownOutput();
-                }
-                catch (IOException e) {
-                    e.printStackTrace();
-                }
-            }
-
-        };
-
-
-        try {
-            executor.execute(inputListener);
-        }
-        catch (InterruptedException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        }
-    }
-
-    private Runnable inputListener = new Runnable() {
-
-        public void run() {
-
-            while (true) {
-
-                while (receiveBuffer.isEmpty()) {
-                    try {
-                        fillReceiveBuffer();
-                    }
-                    catch (IOException e) {
-                        System.out.println("loop reached EOF");
-                        return;
-                    }
-
-                    if (receiveBuffer.isClosedForPut()) {
-                        System.out.println("END OF INPUT");
-                        return;
-                    }
-                }
-
-                handler.inputAvailable(SyncNIOTransport.this);
-            }
-
-        }
-
-    };
-
-
-    public OutputChannel getOutputChannel() {
-        return sendBuffer.getOutputChannel();
-    }
-
-    public InputChannel getInputChannel() {
-        return receiveBuffer.getInputChannel();
-    }
 
-    public void close() throws IOException {
-        chan.close();
-    }
 
-    public void releaseInputChannel() {
-        // TODO Auto-generated method stub
+	}
 
-    }
+	protected void fillReceiveBuffer() throws IOException {
+		receiveBuffer.readFrom(sock);
+	}
 
 }

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/nio/SyncNIOTransportManager.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/nio/SyncNIOTransportManager.java?rev=332223&r1=332222&r2=332223&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/nio/SyncNIOTransportManager.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/nio/SyncNIOTransportManager.java
Wed Nov  9 20:45:59 2005
@@ -17,6 +17,7 @@
 package org.apache.geronimo.corba.channel.nio;
 
 import java.io.IOException;
+import java.net.Socket;
 import java.net.SocketAddress;
 import java.nio.channels.SocketChannel;
 import java.nio.channels.spi.SelectorProvider;
@@ -46,10 +47,10 @@
     }
 
     public Transport createTransport(SocketAddress addr, InputHandler handler) throws IOException
{
-        SocketChannel ch = provider.openSocketChannel();
-        ch.configureBlocking(true);
-        ch.connect(addr);
-        SyncNIOTransport t = new SyncNIOTransport(this, ch, handler);
+    		Socket sock = new Socket();
+    		sock.connect(addr);
+
+        SyncNIOTransport t = new SyncNIOTransport(this, handler, sock);
 
         // executor.execute(inputListener);
 

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/CSIClientRequestInterceptor.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/CSIClientRequestInterceptor.java?rev=332223&r1=332222&r2=332223&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/CSIClientRequestInterceptor.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/CSIClientRequestInterceptor.java
Wed Nov  9 20:45:59 2005
@@ -281,4 +281,7 @@
         return "CSI Client Interceptor";
     }
 
+	public void destroy() {
+	}
+
 }

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/CSIInterceptorBase.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/CSIInterceptorBase.java?rev=332223&r1=332222&r2=332223&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/CSIInterceptorBase.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/CSIInterceptorBase.java
Wed Nov  9 20:45:59 2005
@@ -23,6 +23,9 @@
 import org.omg.CORBA.ORB;
 import org.omg.CORBA.OctetSeqHelper;
 import org.omg.CORBA.UserException;
+import org.omg.CSI.AuthorizationElement;
+import org.omg.CSI.SASContextBody;
+import org.omg.CSI.SASContextBodyHelper;
 import org.omg.CSIIOP.CompoundSecMechList;
 import org.omg.CSIIOP.CompoundSecMechListHelper;
 import org.omg.CSIIOP.CompoundSecMechanismsHelper;

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/CSIPolicyFactory.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/CSIPolicyFactory.java?rev=332223&r1=332222&r2=332223&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/CSIPolicyFactory.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/CSIPolicyFactory.java
Wed Nov  9 20:45:59 2005
@@ -17,6 +17,9 @@
 
 package org.apache.geronimo.corba.csi;
 
+import org.apache.geronimo.corba.csi.gssup.GSSUPPolicyValue;
+import org.apache.geronimo.corba.csi.gssup.GSSUPPolicyValueHelper;
+import org.apache.geronimo.corba.csi.gssup.SecGSSUPPolicy;
 import org.omg.CORBA.Any;
 import org.omg.CORBA.LocalObject;
 import org.omg.CORBA.Policy;

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/CSIServerRequestInterceptor.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/CSIServerRequestInterceptor.java?rev=332223&r1=332222&r2=332223&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/CSIServerRequestInterceptor.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/CSIServerRequestInterceptor.java
Wed Nov  9 20:45:59 2005
@@ -470,6 +470,11 @@
         ri.add_reply_service_context(encodeSASContextBody(sasBody), true);
     }
 
+	public void destroy() {
+		// TODO Auto-generated method stub
+		
+	}
+
     // void login(Subject subject, String realm, String name,
     // String password) throws LoginException {
 

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/GSSUPIORInterceptor.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/GSSUPIORInterceptor.java?rev=332223&r1=332222&r2=332223&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/GSSUPIORInterceptor.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/GSSUPIORInterceptor.java
Wed Nov  9 20:45:59 2005
@@ -187,4 +187,9 @@
         return new TaggedComponent(TAG_CSI_SEC_MECH_LIST.value, mech_data);
     }
 
+	public void destroy() {
+		// TODO Auto-generated method stub
+		
+	}
+
 }

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/InputStreamBase.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/InputStreamBase.java?rev=332223&r1=332222&r2=332223&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/InputStreamBase.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/InputStreamBase.java
Wed Nov  9 20:45:59 2005
@@ -26,8 +26,10 @@
 import org.omg.CORBA_2_3.portable.ObjectImpl;
 
 import org.apache.geronimo.corba.AbstractORB;
+import org.apache.geronimo.corba.AnyImpl;
 import org.apache.geronimo.corba.ClientDelegate;
 import org.apache.geronimo.corba.PlainObject;
+import org.apache.geronimo.corba.TypeCodeUtil;
 import org.apache.geronimo.corba.ior.InternalIOR;
 import org.apache.geronimo.corba.util.IntegerToObjectHashMap;
 import org.apache.geronimo.corba.util.IntegerToObjectMap;
@@ -229,13 +231,13 @@
     }
 
     public final Any read_any() {
-        org.omg.CORBA.Any any = new org.freeorb.AnyImpl(__orb());
+        org.omg.CORBA.Any any = new AnyImpl(__orb());
         any.read_value(this, read_TypeCode());
         return any;
     }
 
     public final TypeCode read_TypeCode() {
-        return org.freeorb.TypeCodeUtil.read(this, this, new java.util.HashMap());
+        return TypeCodeUtil.read(this, this, new java.util.HashMap());
     }
 
     public void read_octet_array(byte[] data, int off, int len) {

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/ValueWriter.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/ValueWriter.java?rev=332223&r1=332222&r2=332223&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/ValueWriter.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/ValueWriter.java
Wed Nov  9 20:45:59 2005
@@ -28,6 +28,8 @@
 import org.omg.CORBA.portable.StreamableValue;
 import org.omg.CORBA.portable.ValueBase;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.corba.channel.MarkHandler;
 import org.apache.geronimo.corba.channel.OutputChannelMarker;
 
@@ -37,6 +39,9 @@
  */
 public class ValueWriter {
 
+	
+	static final Log log = LogFactory.getLog(ValueWriter.class);
+	
     static final int TAG_VALUE = 0x7fffff00;
 
     static final int TAG_CODEBASE_PRESENT = 1;
@@ -353,7 +358,7 @@
 
             //
             // TODO: figure a way to rewrite the last end-tag
-            buf.pos = lastEndTagPos;
+            // TODO: revisit buf.pos = lastEndTagPos;
 
             if (log.isDebugEnabled()) {
                 log.debug("rewriting endTag" + valueOfLastEndTag
@@ -421,7 +426,7 @@
             out.__fatal("not chunked");
 
         out.align(4);
-        chunkMark = out.mark(chunkHandler);
+        // TODO: revisit chunkMark = out.mark(chunkHandler);
         startPosOfCurrentChunk = out.__stream_position();
         out.write_long(0);
     }
@@ -436,7 +441,7 @@
         // TODO: align chunk size? That which follows a chunk must
         // be a 4-byte integer (chunk end marker) so we will do the
         // alignment...
-        size += out.computeAlignment(size, 4);
+        // TODO: revisit size += out.computeAlignment(size, 4);
 
         try {
             chunkMark.putInt(0, size);
@@ -465,6 +470,7 @@
     private BoxedValueHelper getHelper(Serializable value,
                                        String id)
     {
+        /*
         Class helper = null;
 
         // TODO: Cache this info somewhere (contextclassloader)?
@@ -503,7 +509,7 @@
                 // ignore //
             }
         }
-
+        */
         return null;
     }
 

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/IIOPProfile.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/IIOPProfile.java?rev=332223&r1=332222&r2=332223&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/IIOPProfile.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/IIOPProfile.java
Wed Nov  9 20:45:59 2005
@@ -25,7 +25,6 @@
 import org.omg.IIOP.Version;
 import org.omg.IOP.TAG_INTERNET_IOP;
 import org.omg.IOP.TaggedComponent;
-import org.omg.IOP.TaggedComponentSeqHelper;
 
 import org.apache.geronimo.corba.AbstractORB;
 import org.apache.geronimo.corba.io.EncapsulationInputStream;

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/MultiComponentProfile.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/MultiComponentProfile.java?rev=332223&r1=332222&r2=332223&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/MultiComponentProfile.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/MultiComponentProfile.java
Wed Nov  9 20:45:59 2005
@@ -19,7 +19,6 @@
 import org.omg.CORBA.portable.OutputStream;
 import org.omg.IOP.TAG_MULTIPLE_COMPONENTS;
 import org.omg.IOP.TaggedComponent;
-import org.omg.IOP.TaggedComponentSeqHelper;
 
 import org.apache.geronimo.corba.AbstractORB;
 import org.apache.geronimo.corba.io.EncapsulationInputStream;

Added: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/TaggedComponentSeqHelper.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/TaggedComponentSeqHelper.java?rev=332223&view=auto
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/TaggedComponentSeqHelper.java
(added)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/TaggedComponentSeqHelper.java
Wed Nov  9 20:45:59 2005
@@ -0,0 +1,42 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  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.geronimo.corba.ior;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.IOP.TaggedComponent;
+import org.omg.IOP.TaggedComponentHelper;
+
+public class TaggedComponentSeqHelper {
+
+	public static TaggedComponent[] read(InputStream in) {
+		int len = in.read_long();
+		TaggedComponent[] result = new TaggedComponent[len];
+		for (int i = 0; i < len; i++) {
+			result[i] = TaggedComponentHelper.read(in);
+		}
+		return result;
+	}
+
+	public static void write(OutputStream out, TaggedComponent[] tagged_components) {
+		out.write_long(tagged_components.length);
+		for (int i = 0; i < tagged_components.length; i++) {
+			TaggedComponentHelper.write(out, tagged_components[i]);
+		}
+	}
+
+}



Mime
View raw message