[JBoss-dev] CVS update: jbossmq/src/main/org/jbossmq/il/oil OILClientIL.java OILClientILService.java OILServerIL.java OILServerILService.java

2001-08-08 Thread Paul Kendall

  User: pkendall
  Date: 01/08/08 18:18:27

  Modified:src/main/org/jbossmq/il/oil OILClientIL.java
OILClientILService.java OILServerIL.java
OILServerILService.java
  Log:
  Major updates (especially to topics).
  Speed improvements.
  Make JVM IL work (by using a singleton JMSServer).
  Message Listeners re-implemented using client-side thread.
  
  Revision  ChangesPath
  1.4   +0 -0  jbossmq/src/main/org/jbossmq/il/oil/OILClientIL.java
  
  Index: OILClientIL.java
  ===
  RCS file: /cvsroot/jboss/jbossmq/src/main/org/jbossmq/il/oil/OILClientIL.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- OILClientIL.java  2001/08/09 00:27:21 1.3
  +++ OILClientIL.java  2001/08/09 01:18:27 1.4
  @@ -29,7 +29,7 @@
*   @author Norbert Lataille ([EMAIL PROTECTED])
*   @author Hiram Chirino ([EMAIL PROTECTED])
*
  - *   @version $Revision: 1.3 $
  + *   @version $Revision: 1.4 $
*/
   public class OILClientIL implements ClientIL, java.io.Serializable {
   
  
  
  
  1.5   +1 -1  jbossmq/src/main/org/jbossmq/il/oil/OILClientILService.java
  
  Index: OILClientILService.java
  ===
  RCS file: 
/cvsroot/jboss/jbossmq/src/main/org/jbossmq/il/oil/OILClientILService.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- OILClientILService.java   2001/08/09 00:27:21 1.4
  +++ OILClientILService.java   2001/08/09 01:18:27 1.5
  @@ -29,8 +29,8 @@
*
*   @author Norbert Lataille ([EMAIL PROTECTED])
*   @author Hiram Chirino ([EMAIL PROTECTED])
  - * 
  - *   @version $Revision: 1.4 $
  + *
  + *   @version $Revision: 1.5 $
*/
   public class OILClientILService implements org.jbossmq.il.ClientILService, Runnable 
{
//the client IL
  
  
  
  1.4   +0 -0  jbossmq/src/main/org/jbossmq/il/oil/OILServerIL.java
  
  Index: OILServerIL.java
  ===
  RCS file: /cvsroot/jboss/jbossmq/src/main/org/jbossmq/il/oil/OILServerIL.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- OILServerIL.java  2001/08/09 00:27:21 1.3
  +++ OILServerIL.java  2001/08/09 01:18:27 1.4
  @@ -37,7 +37,7 @@
*   @author Hiram Chirino ([EMAIL PROTECTED])
*   @author Norbert Lataille ([EMAIL PROTECTED])
*
  - *   @version $Revision: 1.3 $
  + *   @version $Revision: 1.4 $
*/
   public class OILServerIL implements ServerIL, java.io.Serializable, Cloneable {
   
  
  
  
  1.8   +2 -2  jbossmq/src/main/org/jbossmq/il/oil/OILServerILService.java
  
  Index: OILServerILService.java
  ===
  RCS file: 
/cvsroot/jboss/jbossmq/src/main/org/jbossmq/il/oil/OILServerILService.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- OILServerILService.java   2001/08/09 00:27:21 1.7
  +++ OILServerILService.java   2001/08/09 01:18:27 1.8
  @@ -47,7 +47,7 @@
*  manage the JVM IL.
*
*   @author Hiram Chirino ([EMAIL PROTECTED])
  - *   @version $Revision: 1.7 $
  + *   @version $Revision: 1.8 $
*/
   public class OILServerILService extends ServerILJMXService implements 
OILServerILServiceMBean, Runnable {
   
  @@ -158,7 +158,7 @@
}
}
   
  - if( !running )
  +  if( !running )
return;
   
socket.setSoTimeout(0);
  @@ -178,7 +178,7 @@
while (!closed && running) {
   
try {
  - code=in.readByte(); 
  + code=in.readByte();
}
catch ( EOFException e ) {
break;
  
  
  

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] CVS update: jbossmq/src/main/org/jbossmq/il/oil OILClientIL.java OILClientILService.java OILServerIL.java OILServerILService.java

2001-08-08 Thread Paul Kendall

  User: pkendall
  Date: 01/08/08 17:27:21

  Modified:src/main/org/jbossmq/il/oil OILClientIL.java
OILClientILService.java OILServerIL.java
OILServerILService.java
  Log:
  Major updates (especially to topics).
  Speed improvements.
  Make JVM IL work (by using a singleton JMSServer).
  Message Listeners re-implemented using client-side thread.
  
  Revision  ChangesPath
  1.3   +10 -12jbossmq/src/main/org/jbossmq/il/oil/OILClientIL.java
  
  Index: OILClientIL.java
  ===
  RCS file: /cvsroot/jboss/jbossmq/src/main/org/jbossmq/il/oil/OILClientIL.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- OILClientIL.java  2001/07/16 02:51:45 1.2
  +++ OILClientIL.java  2001/08/09 00:27:21 1.3
  @@ -25,18 +25,14 @@
   
   /**
*   The RMI implementation of the ConnectionReceiver object
  - *  
  + *
*   @author Norbert Lataille ([EMAIL PROTECTED])
*   @author Hiram Chirino ([EMAIL PROTECTED])
  - * 
  - *   @version $Revision: 1.2 $
  + *
  + *   @version $Revision: 1.3 $
*/
   public class OILClientIL implements ClientIL, java.io.Serializable {
   
  -
  -
  -
  -
public void close() throws Exception {
checkSocket();
out.writeByte(m_close);
  @@ -57,7 +53,9 @@
checkSocket();
cat.debug("Writing request");
out.writeByte(m_receive);
  - out.writeObject(messages);
  +out.writeInt(messages.length);
  +for(int i=0;ihttp://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] CVS update: jbossmq/src/main/org/jbossmq/il/oil OILClientIL.java OILClientILService.java OILServerIL.java OILServerILService.java OILServerILServiceMBean.java

2001-07-15 Thread Hiram Chirino

  User: chirino 
  Date: 01/07/15 19:51:45

  Modified:src/main/org/jbossmq/il/oil OILClientIL.java
OILClientILService.java OILServerIL.java
OILServerILService.java
OILServerILServiceMBean.java
  Log:
  Moved the rest of JBossMQ over to log4j logging.
  - The jbossmq-client.jar now includes a log4j.properties which sets up the logging
  subsystems on the client side.  To chanage the logging levels, just place your
  log4j.properties in the classpath betfore the jbossmq-client.jar
  
  Revision  ChangesPath
  1.2   +3 -4  jbossmq/src/main/org/jbossmq/il/oil/OILClientIL.java
  
  Index: OILClientIL.java
  ===
  RCS file: /cvsroot/jboss/jbossmq/src/main/org/jbossmq/il/oil/OILClientIL.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- OILClientIL.java  2001/07/11 02:28:34 1.1
  +++ OILClientIL.java  2001/07/16 02:51:45 1.2
  @@ -18,7 +18,6 @@
   import java.io.ObjectInputStream;
   import java.rmi.RemoteException;
   import java.io.BufferedOutputStream;
  -import org.jbossmq.Log;
   import java.io.ObjectOutputStream;
   import java.io.BufferedInputStream;
   import java.net.InetAddress;
  @@ -30,7 +29,7 @@
*   @author Norbert Lataille ([EMAIL PROTECTED])
*   @author Hiram Chirino ([EMAIL PROTECTED])
* 
  - *   @version $Revision: 1.1 $
  + *   @version $Revision: 1.2 $
*/
   public class OILClientIL implements ClientIL, java.io.Serializable {
   
  @@ -65,7 +64,7 @@
}
   
private InetAddress addr;
  - final static org.apache.log4j.Category cat = 
org.apache.log4j.Category.getInstance(OILClientIL.class);
  + static org.apache.log4j.Category cat = 
org.apache.log4j.Category.getInstance(OILClientIL.class);
private transient ObjectInputStream in;
static final int m_close = 2;
static final int m_deleteTemporaryDestination = 1;
  @@ -86,13 +85,13 @@
protected void createConnection() throws RemoteException
{
try {   
  - Log.notice("ConnectionReceiverOILClient is connecting to: 
"+addr.getHostAddress()+":"+port);
  + cat.info("ConnectionReceiverOILClient is connecting to: 
"+addr.getHostAddress()+":"+port);
socket=new Socket(addr,port);
out=new ObjectOutputStream(new 
BufferedOutputStream(socket.getOutputStream()));
out.flush();
in=new ObjectInputStream(new 
BufferedInputStream(socket.getInputStream()));
} catch (Exception e) { 
  - Log.error(e);
  + cat.debug(e);
throw new RemoteException("Cannot connect to the 
ConnectionReceiver/Server");
}
}
  
  
  
  1.2   +5 -6  jbossmq/src/main/org/jbossmq/il/oil/OILClientILService.java
  
  Index: OILClientILService.java
  ===
  RCS file: 
/cvsroot/jboss/jbossmq/src/main/org/jbossmq/il/oil/OILClientILService.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- OILClientILService.java   2001/07/11 02:28:34 1.1
  +++ OILClientILService.java   2001/07/16 02:51:45 1.2
  @@ -18,7 +18,6 @@
   import java.net.Socket;
   import java.io.ObjectInputStream;
   import java.rmi.RemoteException;
  -import org.jbossmq.Log;
   import java.io.BufferedOutputStream;
   import java.io.ObjectOutputStream;
   import java.io.BufferedInputStream;
  @@ -31,10 +30,9 @@
*   @author Norbert Lataille ([EMAIL PROTECTED])
*   @author Hiram Chirino ([EMAIL PROTECTED])
* 
  - *   @version $Revision: 1.1 $
  + *   @version $Revision: 1.2 $
*/
   public class OILClientILService implements org.jbossmq.il.ClientILService, Runnable 
{
  -
//the client IL
OILClientIL clientIL;
   
  @@ -74,6 +72,7 @@
worker.interrupt();
}
   
  + static org.apache.log4j.Category cat = 
org.apache.log4j.Category.getInstance(OILClientILService.class);
//A link on my connection
private Connection connection;
// Attributes 
  @@ -94,7 +93,7 @@
ObjectInputStream in = null;
   
try {
  - Log.log("Waiting for the server to connect to me");
  + cat.debug("Waiting for the server to connect to me");
// We may close() before we get a connection so we need to
// periodicaly check to see if we were !running.
serverSocket.setSoTimeout(1000);
  @@ -120,7 +119,7 @@
while (running) {
   
try {
  - Log.log("Waiting f

[JBoss-dev] CVS update: jbossmq/src/main/org/jbossmq/il/oil OILClientIL.java OILClientILService.java OILServerIL.java OILServerILService.java OILServerILServiceMBean.java

2001-07-10 Thread Hiram Chirino

  User: chirino 
  Date: 01/07/10 19:28:34

  Added:   src/main/org/jbossmq/il/oil OILClientIL.java
OILClientILService.java OILServerIL.java
OILServerILService.java
OILServerILServiceMBean.java
  Log:
  This is the il package which now holds interfaces that are more straitfoward to 
understand
  and implement.  Under this package we place the other ils that have been implemented.
  All the ILs are now MBeans and are managed though JMX.
  
  Revision  ChangesPath
  1.1  jbossmq/src/main/org/jbossmq/il/oil/OILClientIL.java
  
  Index: OILClientIL.java
  ===
  /*
   * JBossMQ, the OpenSource JMS implementation
   *
   * Distributable under LGPL license.
   * See terms of license at gnu.org.
   */
  package org.jbossmq.il.oil;
  
  import javax.jms.Destination;
  import javax.jms.JMSException;
  
  import org.jbossmq.ReceiveRequest;
  import org.jbossmq.SpyDestination;
  import org.jbossmq.Connection;
  import org.jbossmq.il.ClientIL;
  
  import java.net.Socket;
  import java.io.ObjectInputStream;
  import java.rmi.RemoteException;
  import java.io.BufferedOutputStream;
  import org.jbossmq.Log;
  import java.io.ObjectOutputStream;
  import java.io.BufferedInputStream;
  import java.net.InetAddress;
  import java.io.IOException;
  
  /**
   *The RMI implementation of the ConnectionReceiver object
   *  
   *@author Norbert Lataille ([EMAIL PROTECTED])
   *@author Hiram Chirino ([EMAIL PROTECTED])
   * 
   *@version $Revision: 1.1 $
   */
  public class OILClientIL implements ClientIL, java.io.Serializable {
  
  
  
  
  
public void close() throws Exception {
checkSocket();
out.writeByte(m_close);
waitAnswer();
}
  
synchronized public void deleteTemporaryDestination(SpyDestination dest) 
throws Exception
{
checkSocket();
out.writeByte(m_deleteTemporaryDestination);
out.writeObject(dest);
waitAnswer();
}
  
synchronized public void receive(ReceiveRequest messages[]) throws Exception
{
cat.debug("Checking socket");
checkSocket();
cat.debug("Writing request");
out.writeByte(m_receive);
out.writeObject(messages);
cat.debug("Waiting for awnser");
waitAnswer();
cat.debug("Done");
}
  
private InetAddress addr;
final static org.apache.log4j.Category cat = 
org.apache.log4j.Category.getInstance(OILClientIL.class);
private transient ObjectInputStream in;
static final int m_close = 2;
static final int m_deleteTemporaryDestination = 1;
static final int m_receive = 3;
private transient ObjectOutputStream out;
private int port;
private transient Socket socket;
  
OILClientIL(InetAddress addr, int port) {
this.addr = addr;
this.port = port;
}
  
protected void checkSocket() throws Exception {
if (socket==null) createConnection();
}
  
protected void createConnection() throws RemoteException
{
try {   
Log.notice("ConnectionReceiverOILClient is connecting to: 
"+addr.getHostAddress()+":"+port);
socket=new Socket(addr,port);
out=new ObjectOutputStream(new 
BufferedOutputStream(socket.getOutputStream()));
out.flush();
in=new ObjectInputStream(new 
BufferedInputStream(socket.getInputStream()));
} catch (Exception e) { 
Log.error(e);
throw new RemoteException("Cannot connect to the 
ConnectionReceiver/Server");
}
}
  
protected void waitAnswer() throws Exception
{
Exception throwException=null;
try {
out.reset();
out.flush();
int val=in.readByte();
switch(val) {
case 1: 
Exception e=(Exception)in.readObject();
throwException = new RemoteException("", e);
break;
}
} catch (IOException e) {
throw new RemoteException("Cannot contact the remote 
object",e);
}

if( throwException != null )
throw throwException;
}
  }
  
  
  1.1  jbossmq/src/main/org/jbossmq/il/oil/OILClientILService.java