Changeset 111 for branches/supervisor


Ignore:
Timestamp:
11/11/13 12:11:51 (11 years ago)
Author:
stoda
Message:

Broker:

tryconnection won't be used
DOMConfigurator won't be used


Location:
branches/supervisor
Files:
1 added
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • branches/supervisor/src/main/java/omq/client/proxy/Proxymq.java

    r110 r111  
    268268
    269269                // Wait for the results.
    270                 long localTimeout = timeout;
     270                long localTimeout = 0;
    271271                long start = System.currentTimeMillis();
    272272                synchronized (results) {
     
    320320
    321321                int i = 0;
    322                 long localTimeout = timeout;
     322                long localTimeout = 0;
    323323                long start = System.currentTimeMillis();
    324324
     
    380380
    381381        @Override
    382         public void setUID(String uID) {System.out.println("SET UID");
     382        public void setUID(String uID) {
    383383                this.UID = uID;
    384384        }
  • branches/supervisor/src/main/java/omq/common/broker/Broker.java

    r106 r111  
    33import java.io.IOException;
    44import java.lang.reflect.Proxy;
    5 import java.net.URL;
    65import java.util.HashMap;
    76import java.util.Hashtable;
     
    2322
    2423import org.apache.log4j.Logger;
    25 import org.apache.log4j.xml.DOMConfigurator;
    26 
     24
     25import com.rabbitmq.client.AMQP.BasicProperties;
    2726import com.rabbitmq.client.Channel;
    2827import com.rabbitmq.client.Connection;
    2928import com.rabbitmq.client.QueueingConsumer;
    30 import com.rabbitmq.client.AMQP.BasicProperties;
    3129import com.rabbitmq.client.QueueingConsumer.Delivery;
    3230import com.rabbitmq.client.ShutdownListener;
     
    6058        public Broker(Properties env) throws Exception {
    6159                // Load log4j configuration
    62                 URL log4jResource = Broker.class.getResource("/log4j.xml");
    63                 DOMConfigurator.configure(log4jResource);
     60                // URL log4jResource = Broker.class.getResource("/log4j.xml");
     61                // DOMConfigurator.configure(log4jResource);
    6462
    6563                remoteObjs = new HashMap<String, RemoteObject>();
     
    6967                channel = connection.createChannel();
    7068                addFaultTolerance();
    71                 try {
    72                         tryConnection(env);
    73                 } catch (Exception e) {
    74                         channel.close();
    75                         connection.close();
     69                if (!connection.isOpen() || !channel.isOpen()) {
     70                        if (connection.isOpen()) {
     71                                connection.close();
     72                        }
    7673                        throw new InitBrokerException("The connection didn't work");
    7774                }
     75
     76                // try {
     77                // tryConnection(env);
     78                // } catch (Exception e) {
     79                // channel.close();
     80                // connection.close();
     81                // throw new InitBrokerException("The connection didn't work");
     82                // }
    7883        }
    7984
     
    99104
    100105                clientStarted = false;
    101                 connectionClosed = false;
     106                // connectionClosed = false;
    102107                environment = null;
    103108                remoteObjs = null;
     
    121126                connectionClosed = true;
    122127                connection.close();
    123                 connectionClosed = false;
     128                // connectionClosed = false;
    124129        }
    125130
     
    154159         * @throws IOException
    155160         */
    156         public synchronized void publishMessge(String exchange, String routingKey, BasicProperties props, byte[] bytesRequest) throws IOException {
     161        public synchronized void publishMessge(String exchange, String routingKey, BasicProperties props, byte[] bytesRequest)
     162                        throws IOException {
    157163                if (!channel.isOpen()) {
    158164                        logger.error("Broker's channel is closed opening a new one", channel.getCloseReason());
  • branches/supervisor/src/main/resources/log4j.xml

    r110 r111  
    44<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
    55    <appender name="consoleAppender" class="org.apache.log4j.ConsoleAppender">
    6         <param name="Threshold" value="INFO" />
     6        <param name="Threshold" value="OFF" />
    77        <layout class="org.apache.log4j.PatternLayout">
    88            <param name="ConversionPattern" value="%d{[yyyy-MM-dd HH:mm:ss]} %-5p %c:%L - %m%n" />
     
    3030
    3131  <root>
    32     <priority value ="INFO" />
     32    <priority value ="OFF" />
    3333    <appender-ref ref="consoleAppender" />
    3434    <appender-ref ref="A2" /> 
  • branches/supervisor/target/maven-archiver/pom.properties

    r84 r111  
    11#Generated by Maven
    2 #Mon Jul 08 16:29:44 CEST 2013
    3 version=0.5.5
     2#Thu Oct 24 11:59:20 CEST 2013
     3version=0.6.0
    44groupId=objectmq
    55artifactId=objectmq
  • branches/supervisor/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst

    r83 r111  
    1 omq/test/multiProcess/Number.class
     1omq/test/supervisor/SleepImpl.class
    22omq/test/python/Address.class
    33omq/test/faultTolerance/FaultToleranceTest.class
     4test/multi/BeerImpl.class
    45omq/test/workspace/RemoteWorkspaceImpl.class
    5 omq/test/serializer/CalculatorTest.class
    66omq/test/python/ContactList.class
    77omq/test/calculator/Message.class
    8 omq/test/stopBroker/BrokerKiller.class
    98omq/test/exception/OmqServerImpl.class
    10 omq/test/workspace/Info.class
    11 omq/test/event/MessageTest.class
    129omq/test/multiProcess/NumberClient.class
    13 omq/test/python/Server.class
    14 omq/test/stopBroker/StopBrokerTest.class
     10omq/test/observer/RemoteObserver.class
    1511omq/test/multiProcess/MultiProcessTest.class
    16 omq/test/observer/RemoteObserver.class
     12test/queues/BeerImpl.class
     13omq/test/multiThread2/Print.class
     14omq/test/python/Contact.class
    1715omq/test/persistence/PersistentTest.class
    18 omq/test/python/Contact.class
    1916omq/test/event/MessageImpl.class
    2017omq/test/event/Message.class
    21 omq/test/stopBroker/UnbindTest.class
    2218omq/test/stopBroker/BrokerKillerImpl$1.class
    2319omq/test/exception/ServerInterface.class
    24 omq/test/workspace/WorkspaceTest.class
    25 omq/test/observer/RemoteSubject.class
    26 omq/test/calculator/CalculatorImpl.class
    2720omq/test/calculator/CalculatorTest.class
    28 omq/test/temporal/ProvaTest.class
    29 omq/test/python/ContactListImpl.class
     21test/multi/BeerTest.class
     22test/queues/BeerTest.class
    3023omq/test/exception/ClientInterface.class
    31 omq/test/observer/ObserverTest.class
     24test/queues/Beer.class
     25omq/test/multiThread2/PrintImpl.class
     26omq/test/remotePool/RemotePoolTest.class
    3227omq/test/persistence/Message.class
    3328omq/test/exception/ExceptionTest.class
     
    3530omq/test/multiProcess/NumberImpl.class
    3631omq/test/observer/RemoteObserverImpl.class
     32omq/test/multiThread2/MultiThreadTest.class
     33omq/test/persistence/MessageImpl.class
     34omq/test/stopBroker/BrokerKillerImpl.class
     35omq/test/exception/Trailer.class
     36omq/test/multiProcess/Number.class
     37omq/test/multiThread2/PrintTest.class
     38omq/test/lock/SleepTest.class
     39omq/test/lock/SleepImpl.class
     40omq/test/serializer/CalculatorTest.class
     41omq/test/remotePool/Sleep.class
     42omq/test/stopBroker/BrokerKiller.class
     43omq/test/workspace/Info.class
     44omq/test/event/MessageTest.class
     45omq/test/multiThread/ThreadTest$1.class
     46omq/test/python/Server.class
     47omq/test/stopBroker/StopBrokerTest.class
     48omq/test/multiThread/RemoteMulti.class
     49omq/test/stopBroker/UnbindTest.class
     50omq/test/workspace/WorkspaceTest.class
     51omq/test/multiThread/ThreadTest.class
     52omq/test/observer/RemoteSubject.class
     53omq/test/calculator/CalculatorImpl.class
     54omq/test/lock/Sleep.class
     55omq/test/temporal/ProvaTest.class
     56omq/test/python/ContactListImpl.class
     57omq/test/supervisor/SleepTest.class
     58test/multi/Beer.class
     59omq/test/observer/ObserverTest.class
     60omq/test/multiThread2/SleepImpl.class
     61test/multi/ClientBeer.class
     62omq/test/remotePool/SleepImpl.class
     63omq/test/multiThread/ZeroThread.class
    3764omq/test/python/CalculatorImpl.class
    38 omq/test/persistence/MessageImpl.class
     65omq/test/supervisor/Sleep.class
    3966omq/test/python/Calculator.class
    40 omq/test/stopBroker/BrokerKillerImpl.class
     67omq/test/multiThread2/Sleep.class
    4168omq/test/calculator/Calculator.class
    42 omq/test/exception/Trailer.class
    4369omq/test/observer/RemoteSubjectImpl.class
     70omq/test/multiThread/MultiInterface.class
Note: See TracChangeset for help on using the changeset viewer.