JBoss hornetq SVN: r10737 - in trunk/tests: jms-tests and 1 other directories.
by do-not-reply@jboss.org
Author: borges
Date: 2011-05-26 08:28:45 -0400 (Thu, 26 May 2011)
New Revision: 10737
Modified:
trunk/tests/integration-tests/pom.xml
trunk/tests/jms-tests/pom.xml
trunk/tests/timing-tests/pom.xml
Log:
Fix some test dependency relations
Modified: trunk/tests/integration-tests/pom.xml
===================================================================
--- trunk/tests/integration-tests/pom.xml 2011-05-26 10:06:07 UTC (rev 10736)
+++ trunk/tests/integration-tests/pom.xml 2011-05-26 12:28:45 UTC (rev 10737)
@@ -1,5 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.hornetq.tests</groupId>
@@ -48,7 +48,7 @@
</dependency>
<dependency>
<groupId>org.hornetq</groupId>
- <artifactId>hornetq-logging</artifactId>
+ <artifactId>hornetq-commons</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
@@ -87,13 +87,24 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>${skipIntegrationTests}</skipTests>
<excludes>
<exclude>**/ReplicatedJMSFailoverTest.java</exclude>
<exclude>org/hornetq/tests/util/*.java</exclude>
- <!--exclude any replication tests for now-->
+ <!--exclude any replication tests for now -->
<exclude>**/cluster/failover/*ClusterWithBackupFailoverTestBase.java</exclude>
<exclude>**/cluster/**/*/java</exclude>
<exclude>**/cluster/failover/*DiscoveryClusterWithBackupFailoverTest.java</exclude>
@@ -108,20 +119,9 @@
<exclude>**/cluster/failover/Remote*.java</exclude>
<exclude>**/failover/remote/**.java</exclude>
</excludes>
- <argLine>-Djava.library.path=${user.dir}/distribution/hornetq/src/main/resources/bin</argLine>
- </configuration>
+ <argLine>-Djava.library.path=${user.dir}/distribution/hornetq/src/main/resources/bin</argLine>
+ </configuration>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>test-jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
Modified: trunk/tests/jms-tests/pom.xml
===================================================================
--- trunk/tests/jms-tests/pom.xml 2011-05-26 10:06:07 UTC (rev 10736)
+++ trunk/tests/jms-tests/pom.xml 2011-05-26 12:28:45 UTC (rev 10737)
@@ -1,5 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.hornetq.tests</groupId>
@@ -70,7 +70,7 @@
<groupId>org.jboss.javaee</groupId>
<artifactId>jboss-transaction-api</artifactId>
</dependency>
- <!--this specifically for the JMS Bridge-->
+ <!--this specifically for the JMS Bridge -->
<dependency>
<groupId>org.jboss.integration</groupId>
<artifactId>jboss-transaction-spi</artifactId>
@@ -89,6 +89,17 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>${skipJmsTests}</skipTests>
Modified: trunk/tests/timing-tests/pom.xml
===================================================================
--- trunk/tests/timing-tests/pom.xml 2011-05-26 10:06:07 UTC (rev 10736)
+++ trunk/tests/timing-tests/pom.xml 2011-05-26 12:28:45 UTC (rev 10737)
@@ -41,9 +41,18 @@
<type>test-jar</type>
</dependency>
<dependency>
+ <groupId>org.hornetq.tests</groupId>
+ <artifactId>jms-tests</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ <type>test-jar</type>
+ </dependency>
+ <dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-jms</artifactId>
<version>${project.version}</version>
+ <scope>test</scope>
+ <type>test-jar</type>
</dependency>
<dependency>
<groupId>org.hornetq</groupId>
12 years, 11 months
JBoss hornetq SVN: r10736 - in trunk: hornetq-commons and 1 other directory.
by do-not-reply@jboss.org
Author: borges
Date: 2011-05-26 06:06:07 -0400 (Thu, 26 May 2011)
New Revision: 10736
Added:
trunk/hornetq-commons/
Removed:
trunk/hornetq-logging/
Modified:
trunk/hornetq-commons/pom.xml
trunk/pom.xml
Log:
HORNETQ-698 rename hq-logging into hq-commons
Modified: trunk/hornetq-commons/pom.xml
===================================================================
--- trunk/hornetq-logging/pom.xml 2011-05-25 17:46:07 UTC (rev 10732)
+++ trunk/hornetq-commons/pom.xml 2011-05-26 10:06:07 UTC (rev 10736)
@@ -8,9 +8,9 @@
<version>2.2.3-SNAPSHOT</version>
</parent>
- <artifactId>hornetq-logging</artifactId>
+ <artifactId>hornetq-commons</artifactId>
<packaging>jar</packaging>
- <name>HornetQ Logging</name>
+ <name>HornetQ Commons</name>
<dependencies>
<dependency>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-05-25 21:41:06 UTC (rev 10735)
+++ trunk/pom.xml 2011-05-26 10:06:07 UTC (rev 10736)
@@ -125,7 +125,7 @@
<module>hornetq-jms</module>
<module>hornetq-jms-client</module>
<module>hornetq-ra</module>
- <module>hornetq-logging</module>
+ <module>hornetq-commons</module>
<module>hornetq-bootstrap</module>
<module>hornetq-jboss-as-integration</module>
<module>hornetq-twitter-integration</module>
12 years, 11 months
JBoss hornetq SVN: r10735 - in branches/Branch_2_2_EAP: src/main/org/hornetq/core/server/impl and 1 other directories.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-05-25 17:41:06 -0400 (Wed, 25 May 2011)
New Revision: 10735
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientProducerCredits.java
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientProducerCreditsImpl.java
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/TemporaryQueueTest.java
Log:
HORNETQ-700 /JBPAPP-6606
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientProducerCredits.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientProducerCredits.java 2011-05-25 20:14:23 UTC (rev 10734)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientProducerCredits.java 2011-05-25 21:41:06 UTC (rev 10735)
@@ -25,6 +25,8 @@
void acquireCredits(int credits) throws InterruptedException;
void receiveCredits(int credits);
+
+ boolean isBlocked();
void reset();
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientProducerCreditsImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientProducerCreditsImpl.java 2011-05-25 20:14:23 UTC (rev 10734)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientProducerCreditsImpl.java 2011-05-25 21:41:06 UTC (rev 10735)
@@ -33,14 +33,16 @@
private final int windowSize;
+ private boolean blocked;
+
private final SimpleString address;
private final ClientSessionInternal session;
private int arriving;
-
+
private int refCount;
-
+
public ClientProducerCreditsImpl(final ClientSessionInternal session,
final SimpleString address,
final int windowSize)
@@ -64,16 +66,37 @@
{
checkCredits(credits);
- semaphore.acquire(credits);
+ if (!semaphore.tryAcquire(credits))
+ {
+ this.blocked = true;
+ try
+ {
+ semaphore.acquire(credits);
+ }
+ finally
+ {
+ this.blocked = false;
+ }
+ }
}
+ public boolean isBlocked()
+ {
+ return blocked;
+ }
+
+ public int getBalance()
+ {
+ return semaphore.availablePermits();
+ }
+
public void receiveCredits(final int credits)
{
synchronized (this)
{
arriving -= credits;
}
-
+
semaphore.release(credits);
}
@@ -84,7 +107,7 @@
semaphore.drainPermits();
int beforeFailure = arriving;
-
+
arriving = 0;
// If we are waiting for more credits than what's configured, then we need to use what we tried before
@@ -98,22 +121,22 @@
semaphore.release(Integer.MAX_VALUE / 2);
}
-
+
public synchronized void incrementRefCount()
{
refCount++;
}
-
+
public synchronized int decrementRefCount()
{
return --refCount;
}
-
+
public synchronized void releaseOutstanding()
{
semaphore.drainPermits();
}
-
+
private void checkCredits(final int credits)
{
int needed = Math.max(credits, windowSize);
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java 2011-05-25 20:14:23 UTC (rev 10734)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java 2011-05-25 21:41:06 UTC (rev 10735)
@@ -391,7 +391,7 @@
securityStore.check(address, CheckType.CREATE_NON_DURABLE_QUEUE, this);
}
- server.createQueue(address, name, filterString, durable, temporary);
+ Queue queue = server.createQueue(address, name, filterString, durable, temporary);
if (temporary)
{
@@ -401,7 +401,7 @@
// session is closed.
// It is up to the user to delete the queue when finished with it
- TempQueueCleanerUpper cleaner = new TempQueueCleanerUpper(postOffice, name);
+ TempQueueCleanerUpper cleaner = new TempQueueCleanerUpper(postOffice, name, queue);
remotingConnection.addCloseListener(cleaner);
remotingConnection.addFailureListener(cleaner);
@@ -409,18 +409,32 @@
tempQueueCleannerUppers.put(name, cleaner);
}
}
+
+
+ /**
+ * For test cases only
+ * @return
+ */
+ public RemotingConnection getRemotingConnection()
+ {
+ return remotingConnection;
+ }
private static class TempQueueCleanerUpper implements CloseListener, FailureListener
{
private final PostOffice postOffice;
private final SimpleString bindingName;
+
+ private final Queue queue;
- TempQueueCleanerUpper(final PostOffice postOffice, final SimpleString bindingName)
+ TempQueueCleanerUpper(final PostOffice postOffice, final SimpleString bindingName, final Queue queue)
{
this.postOffice = postOffice;
this.bindingName = bindingName;
+
+ this.queue = queue;
}
private void run()
@@ -431,6 +445,8 @@
{
postOffice.removeBinding(bindingName);
}
+
+ queue.deleteAllReferences();
}
catch (Exception e)
{
Modified: branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/TemporaryQueueTest.java
===================================================================
--- branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/TemporaryQueueTest.java 2011-05-25 20:14:23 UTC (rev 10734)
+++ branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/TemporaryQueueTest.java 2011-05-25 21:41:06 UTC (rev 10735)
@@ -32,6 +32,8 @@
import org.hornetq.api.core.client.HornetQClient;
import org.hornetq.api.core.client.MessageHandler;
import org.hornetq.api.core.client.ServerLocator;
+import org.hornetq.core.client.impl.ClientProducerCreditsImpl;
+import org.hornetq.core.client.impl.ClientProducerImpl;
import org.hornetq.core.client.impl.ClientSessionInternal;
import org.hornetq.core.config.Configuration;
import org.hornetq.core.logging.Logger;
@@ -41,6 +43,10 @@
import org.hornetq.core.remoting.CloseListener;
import org.hornetq.core.remoting.server.impl.RemotingServiceImpl;
import org.hornetq.core.server.HornetQServer;
+import org.hornetq.core.server.ServerSession;
+import org.hornetq.core.server.impl.ServerSessionImpl;
+import org.hornetq.core.settings.impl.AddressFullMessagePolicy;
+import org.hornetq.core.settings.impl.AddressSettings;
import org.hornetq.spi.core.protocol.RemotingConnection;
import org.hornetq.tests.util.RandomUtil;
import org.hornetq.tests.util.ServiceTestBase;
@@ -562,7 +568,106 @@
locator2.close();
}
+
+ public void testBlockingWithTemporaryQueue() throws Exception
+ {
+
+ AddressSettings setting = new AddressSettings();
+ setting.setAddressFullMessagePolicy(AddressFullMessagePolicy.BLOCK);
+ setting.setMaxSizeBytes(1024 * 1024);
+
+ server.getAddressSettingsRepository().addMatch("TestAD", setting);
+
+ ClientSessionFactory consumerCF = locator.createSessionFactory();
+ ClientSession consumerSession = consumerCF.createSession(true, true);
+ consumerSession.addMetaData("consumer", "consumer");
+ consumerSession.createTemporaryQueue("TestAD", "Q1");
+ ClientConsumer consumer = consumerSession.createConsumer("Q1");
+ consumerSession.start();
+
+ final ClientProducerImpl prod = (ClientProducerImpl)session.createProducer("TestAD");
+
+ final AtomicInteger errors = new AtomicInteger(0);
+
+ final AtomicInteger msgs = new AtomicInteger(0);
+
+ final int TOTAL_MSG = 1000;
+
+ Thread t = new Thread()
+ {
+ public void run()
+ {
+ try
+ {
+ for (int i = 0 ; i < TOTAL_MSG; i++)
+ {
+ ClientMessage msg = session.createMessage(false);
+ msg.getBodyBuffer().writeBytes(new byte[1024]);
+ prod.send(msg);
+ msgs.incrementAndGet();
+ }
+ }
+ catch (Throwable e)
+ {
+ e.printStackTrace();
+ errors.incrementAndGet();
+ }
+
+ System.out.println("done");
+ }
+ };
+
+ t.start();
+ while (msgs.get() == 0)
+ {
+ Thread.sleep(100);
+ }
+
+ while (t.isAlive() && errors.get() == 0 && !prod.getProducerCredits().isBlocked())
+ {
+ Thread.sleep(100);
+ }
+
+ assertEquals(0, errors.get());
+
+ ClientSessionFactory newConsumerCF = locator.createSessionFactory();
+ ClientSession newConsumerSession = newConsumerCF.createSession(true, true);
+ newConsumerSession.createTemporaryQueue("TestAD", "Q2");
+ ClientConsumer newConsumer = newConsumerSession.createConsumer("Q2");
+ newConsumerSession.start();
+
+ int toReceive = TOTAL_MSG - msgs.get() - 1;
+
+ for (ServerSession sessionIterator: server.getSessions())
+ {
+ if (sessionIterator.getMetaData("consumer") != null)
+ {
+ System.out.println("Failing session");
+ ServerSessionImpl impl = (ServerSessionImpl) sessionIterator;
+ impl.getRemotingConnection().fail(new HornetQException(HornetQException.DISCONNECTED, "failure e"));
+ }
+ }
+
+ int secondReceive = 0;
+
+ ClientMessage msg = null;
+ while (secondReceive < toReceive && (msg = newConsumer.receive(5000)) != null)
+ {
+ msg.acknowledge();
+ secondReceive++;
+ }
+
+ assertNull(newConsumer.receiveImmediate());
+
+ assertEquals(toReceive, secondReceive);
+
+ t.join();
+
+
+
+ }
+
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
@@ -586,6 +691,7 @@
{
ServerLocator retlocator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY));
retlocator.setConnectionTTL(TemporaryQueueTest.CONNECTION_TTL);
+ retlocator.setClientFailureCheckPeriod(TemporaryQueueTest.CONNECTION_TTL / 3);
return retlocator;
}
12 years, 11 months
JBoss hornetq SVN: r10734 - branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/persistence/tools.
by do-not-reply@jboss.org
Author: jicken
Date: 2011-05-25 16:14:23 -0400 (Wed, 25 May 2011)
New Revision: 10734
Modified:
branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/persistence/tools/ManageDataTool.java
Log:
ClientRequestor expects a ClientSession with automatic commits of sends and acknowledgements
Modified: branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/persistence/tools/ManageDataTool.java
===================================================================
--- branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/persistence/tools/ManageDataTool.java 2011-05-25 19:32:16 UTC (rev 10733)
+++ branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/persistence/tools/ManageDataTool.java 2011-05-25 20:14:23 UTC (rev 10734)
@@ -504,6 +504,7 @@
final ClientSession coreSession = sf.createSession();
// message notification callback
+ final ClientSessionFactory finalSf = sf;
final MessagesExportType.Listener listener = new MessagesExportType.Listener()
{
public void handleMessage(MessageType message) throws Exception {
@@ -534,11 +535,12 @@
}
private long getNewQueueId(QueueType queue) throws Exception {
- ClientRequestor requestor = new ClientRequestor(coreSession, ConfigurationImpl.DEFAULT_MANAGEMENT_ADDRESS);
- ClientMessage m = coreSession.createMessage(false);
+ final ClientSession requestorSession = finalSf.createSession(true, true);
+ ClientRequestor requestor = new ClientRequestor(requestorSession, ConfigurationImpl.DEFAULT_MANAGEMENT_ADDRESS);
+ ClientMessage m = requestorSession.createMessage(false);
ManagementHelper.putAttribute(m, ResourceNames.CORE_QUEUE + queue.getName(), "ID");
- final TextMessage reply = (TextMessage) requestor.request(m);
+ final TextMessage reply = (TextMessage) requestor.request(m, 5000);
return Long.parseLong(reply.getText());
}
12 years, 11 months
JBoss hornetq SVN: r10733 - in branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq: core/client/impl and 4 other directories.
by do-not-reply@jboss.org
Author: jicken
Date: 2011-05-25 15:32:16 -0400 (Wed, 25 May 2011)
New Revision: 10733
Modified:
branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/api/core/client/ClientSession.java
branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java
branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/persistence/tools/ManageDataTool.java
branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/protocol/core/impl/wireformat/SessionQueueQueryResponseMessage.java
branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/server/QueueQueryResult.java
branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java
Log:
revert of wireformat modifications
client requestor used for getting id of queue
Modified: branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/api/core/client/ClientSession.java
===================================================================
--- branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/api/core/client/ClientSession.java 2011-05-25 17:46:07 UTC (rev 10732)
+++ branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/api/core/client/ClientSession.java 2011-05-25 19:32:16 UTC (rev 10733)
@@ -57,11 +57,6 @@
public interface QueueQuery
{
/**
- * @return the ID of the queue.
- */
- long getId();
-
- /**
* Returns <code>true</code> if the queue exists, <code>false</code> else.
*/
boolean isExists();
Modified: branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java
===================================================================
--- branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java 2011-05-25 17:46:07 UTC (rev 10732)
+++ branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java 2011-05-25 19:32:16 UTC (rev 10733)
@@ -363,9 +363,7 @@
SessionQueueQueryResponseMessage response = (SessionQueueQueryResponseMessage)channel.sendBlocking(request);
- return new QueueQueryImpl(response.getId(),
- response.getName(),
- response.isDurable(),
+ return new QueueQueryImpl(response.isDurable(),
response.getConsumerCount(),
response.getMessageCount(),
response.getFilterString(),
@@ -1857,11 +1855,9 @@
private static class QueueQueryImpl implements QueueQuery
{
- private final long id;
- private final SimpleString name;
-
private final boolean exists;
+
private final boolean durable;
private final long messageCount;
@@ -1872,17 +1868,14 @@
private final SimpleString address;
- public QueueQueryImpl(final long id,
- final SimpleString name,
- final boolean durable,
+ public QueueQueryImpl(final boolean durable,
final int consumerCount,
final long messageCount,
final SimpleString filterString,
final SimpleString address,
final boolean exists)
{
- this.id = id;
- this.name = name;
+
this.durable = durable;
this.consumerCount = consumerCount;
this.messageCount = messageCount;
@@ -1891,10 +1884,6 @@
this.exists = exists;
}
- public long getId() {
- return id;
- }
-
public SimpleString getAddress()
{
return address;
@@ -1925,8 +1914,5 @@
return exists;
}
- public SimpleString getName() {
- return name;
- }
}
}
Modified: branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/persistence/tools/ManageDataTool.java
===================================================================
--- branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/persistence/tools/ManageDataTool.java 2011-05-25 17:46:07 UTC (rev 10732)
+++ branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/persistence/tools/ManageDataTool.java 2011-05-25 19:32:16 UTC (rev 10733)
@@ -29,6 +29,7 @@
import java.util.Map;
import java.util.Set;
+import javax.jms.TextMessage;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
@@ -40,10 +41,13 @@
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.client.ClientMessage;
import org.hornetq.api.core.client.ClientProducer;
+import org.hornetq.api.core.client.ClientRequestor;
import org.hornetq.api.core.client.ClientSession;
import org.hornetq.api.core.client.ClientSessionFactory;
import org.hornetq.api.core.client.HornetQClient;
import org.hornetq.api.core.client.ServerLocator;
+import org.hornetq.api.core.management.ManagementHelper;
+import org.hornetq.api.core.management.ResourceNames;
import org.hornetq.core.config.Configuration;
import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.config.impl.FileConfiguration;
@@ -493,7 +497,7 @@
final Map<Long, Long> queueMapping = new HashMap<Long, Long>();
ClientSessionFactory sf = null;
-
+
try
{
sf = serverLocator.createSessionFactory();
@@ -516,8 +520,10 @@
queueQuery = coreSession.queueQuery(SimpleString.toSimpleString(queue.getName()));
}
+ // todo: get new queue id
if (!queueMapping.containsKey(queue.getId())) {
- queueMapping.put(queue.getId(), queueQuery.getId());
+ long newQueueId = getNewQueueId(queue);
+ queueMapping.put(queue.getId(), newQueueId);
}
}
@@ -527,6 +533,15 @@
producer.close();
}
+ private long getNewQueueId(QueueType queue) throws Exception {
+ ClientRequestor requestor = new ClientRequestor(coreSession, ConfigurationImpl.DEFAULT_MANAGEMENT_ADDRESS);
+ ClientMessage m = coreSession.createMessage(false);
+ ManagementHelper.putAttribute(m, ResourceNames.CORE_QUEUE + queue.getName(), "ID");
+
+ final TextMessage reply = (TextMessage) requestor.request(m);
+ return Long.parseLong(reply.getText());
+ }
+
private ClientMessage generateClientMessage(MessageType message) throws IOException
{
ClientMessage clientMessage = coreSession.createMessage(message.getType(),
Modified: branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/protocol/core/impl/wireformat/SessionQueueQueryResponseMessage.java
===================================================================
--- branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/protocol/core/impl/wireformat/SessionQueueQueryResponseMessage.java 2011-05-25 17:46:07 UTC (rev 10732)
+++ branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/protocol/core/impl/wireformat/SessionQueueQueryResponseMessage.java 2011-05-25 19:32:16 UTC (rev 10733)
@@ -27,8 +27,6 @@
*/
public class SessionQueueQueryResponseMessage extends PacketImpl
{
- private long id;
-
private SimpleString name;
private boolean exists;
@@ -47,7 +45,7 @@
public SessionQueueQueryResponseMessage(final QueueQueryResult result)
{
- this(result.getId(), result.getName(), result.getAddress(), result.isDurable(), result.isTemporary(),
+ this(result.getName(), result.getAddress(), result.isDurable(), result.isTemporary(),
result.getFilterString(), result.getConsumerCount(), result.getMessageCount(), result.isExists());
}
@@ -56,21 +54,6 @@
this(null, null, false, false, null, 0, 0, false);
}
- private SessionQueueQueryResponseMessage(final long id,
- final SimpleString name,
- final SimpleString address,
- final boolean durable,
- final boolean temporary,
- final SimpleString filterString,
- final int consumerCount,
- final long messageCount,
- final boolean exists)
- {
- this(name,address, durable, temporary, filterString, consumerCount, messageCount, exists);
- this.id = id;
-
- }
-
private SessionQueueQueryResponseMessage(final SimpleString name,
final SimpleString address,
final boolean durable,
@@ -99,10 +82,6 @@
this.exists = exists;
}
- public long getId() {
- return id;
- }
-
@Override
public boolean isResponse()
{
@@ -160,7 +139,6 @@
buffer.writeNullableSimpleString(filterString);
buffer.writeNullableSimpleString(address);
buffer.writeNullableSimpleString(name);
- buffer.writeLong(id);
}
@Override
@@ -174,7 +152,6 @@
filterString = buffer.readNullableSimpleString();
address = buffer.readNullableSimpleString();
name = buffer.readNullableSimpleString();
- id = buffer.readLong();
}
@Override
Modified: branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/server/QueueQueryResult.java
===================================================================
--- branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/server/QueueQueryResult.java 2011-05-25 17:46:07 UTC (rev 10732)
+++ branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/server/QueueQueryResult.java 2011-05-25 19:32:16 UTC (rev 10733)
@@ -24,8 +24,6 @@
*/
public class QueueQueryResult
{
- private long id;
-
private SimpleString name;
private boolean exists;
@@ -52,37 +50,12 @@
{
this(name, address, durable, temporary, filterString, consumerCount, messageCount, true);
}
- public QueueQueryResult(final long id,
- final SimpleString name,
- final SimpleString address,
- final boolean durable,
- final boolean temporary,
- final SimpleString filterString,
- final int consumerCount,
- final long messageCount)
- {
- this(id, name, address, durable, temporary, filterString, consumerCount, messageCount, true);
- }
public QueueQueryResult()
{
this(null, null, false, false, null, 0, 0, false);
}
- private QueueQueryResult(final long id,
- final SimpleString name,
- final SimpleString address,
- final boolean durable,
- final boolean temporary,
- final SimpleString filterString,
- final int consumerCount,
- final long messageCount,
- final boolean exists)
- {
- this(name, address, durable, temporary, filterString, consumerCount, messageCount, exists);
- this.id = id;
- }
-
private QueueQueryResult(final SimpleString name,
final SimpleString address,
final boolean durable,
@@ -109,10 +82,6 @@
this.exists = exists;
}
- public long getId() {
- return id;
- }
-
public boolean isExists()
{
return exists;
Modified: branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java
===================================================================
--- branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java 2011-05-25 17:46:07 UTC (rev 10732)
+++ branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java 2011-05-25 19:32:16 UTC (rev 10733)
@@ -494,8 +494,7 @@
SimpleString filterString = filter == null ? null : filter.getFilterString();
- response = new QueueQueryResult(queue.getID(),
- name,
+ response = new QueueQueryResult(name,
binding.getAddress(),
queue.isDurable(),
queue.isTemporary(),
12 years, 11 months
JBoss hornetq SVN: r10732 - trunk/etc.
by do-not-reply@jboss.org
Author: borges
Date: 2011-05-25 13:46:07 -0400 (Wed, 25 May 2011)
New Revision: 10732
Modified:
trunk/etc/org.eclipse.jdt.ui.prefs
Log:
Improve Eclipse settings
Modified: trunk/etc/org.eclipse.jdt.ui.prefs
===================================================================
--- trunk/etc/org.eclipse.jdt.ui.prefs 2011-05-25 17:45:53 UTC (rev 10731)
+++ trunk/etc/org.eclipse.jdt.ui.prefs 2011-05-25 17:46:07 UTC (rev 10732)
@@ -1,4 +1,4 @@
-#Mon Jan 18 18:34:30 CET 2010
+#Tue May 24 16:58:44 CEST 2011
cleanup.add_default_serial_version_id=false
cleanup.add_generated_serial_version_id=true
cleanup.add_missing_annotations=true
@@ -52,7 +52,7 @@
cleanup_profile=_HornetQ profile
cleanup_settings_version=2
eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=false
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
formatter_profile=_JBM
formatter_settings_version=11
org.eclipse.jdt.ui.exception.name=e
@@ -69,23 +69,28 @@
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true
sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
sp_cleanup.add_missing_nls_tags=false
sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=false
sp_cleanup.add_serial_version_id=false
sp_cleanup.always_use_blocks=true
sp_cleanup.always_use_parentheses_in_expressions=false
sp_cleanup.always_use_this_for_non_static_field_access=false
sp_cleanup.always_use_this_for_non_static_method_access=false
sp_cleanup.convert_to_enhanced_for_loop=true
-sp_cleanup.format_source_code=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=true
sp_cleanup.make_local_variable_final=false
sp_cleanup.make_parameters_final=true
sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
sp_cleanup.make_variable_declarations_final=true
sp_cleanup.never_use_blocks=false
sp_cleanup.never_use_parentheses_in_expressions=true
sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=false
+sp_cleanup.organize_imports=true
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
@@ -98,9 +103,9 @@
sp_cleanup.remove_unnecessary_casts=true
sp_cleanup.remove_unnecessary_nls_tags=true
sp_cleanup.remove_unused_imports=true
-sp_cleanup.remove_unused_local_variables=true
+sp_cleanup.remove_unused_local_variables=false
sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=true
+sp_cleanup.remove_unused_private_members=false
sp_cleanup.remove_unused_private_methods=true
sp_cleanup.remove_unused_private_types=true
sp_cleanup.sort_members=false
12 years, 11 months
JBoss hornetq SVN: r10731 - trunk/tests/joram-tests/src/test/java/org/hornetq/jms.
by do-not-reply@jboss.org
Author: borges
Date: 2011-05-25 13:45:53 -0400 (Wed, 25 May 2011)
New Revision: 10731
Modified:
trunk/tests/joram-tests/src/test/java/org/hornetq/jms/HornetQAdmin.java
Log:
Organize imports
Modified: trunk/tests/joram-tests/src/test/java/org/hornetq/jms/HornetQAdmin.java
===================================================================
--- trunk/tests/joram-tests/src/test/java/org/hornetq/jms/HornetQAdmin.java 2011-05-25 17:45:26 UTC (rev 10730)
+++ trunk/tests/joram-tests/src/test/java/org/hornetq/jms/HornetQAdmin.java 2011-05-25 17:45:53 UTC (rev 10731)
@@ -16,10 +16,7 @@
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
-import java.util.ArrayList;
-import java.util.HashMap;
import java.util.Hashtable;
-import java.util.List;
import javax.naming.Context;
import javax.naming.InitialContext;
12 years, 11 months
JBoss hornetq SVN: r10730 - trunk/hornetq-core/src/main/javacc.
by do-not-reply@jboss.org
Author: borges
Date: 2011-05-25 13:45:26 -0400 (Wed, 25 May 2011)
New Revision: 10730
Modified:
trunk/hornetq-core/src/main/javacc/FilterParser.jj
Log:
Avoid using raw types.
Modified: trunk/hornetq-core/src/main/javacc/FilterParser.jj
===================================================================
--- trunk/hornetq-core/src/main/javacc/FilterParser.jj 2011-05-25 17:32:12 UTC (rev 10729)
+++ trunk/hornetq-core/src/main/javacc/FilterParser.jj 2011-05-25 17:45:26 UTC (rev 10730)
@@ -34,6 +34,7 @@
import org.hornetq.api.core.SimpleString;
import org.hornetq.core.filter.impl.SimpleStringReader;
+// CHECKSTYLE:OFF
/**
* A JavaCC 2.0 grammar for HornetQ filters
*
@@ -49,7 +50,7 @@
private static final String Ox = "0x";
private static final String ZERRO = "0";
- private Map identifierMap;
+ private Map<SimpleString, Identifier> identifierMap;
public FilterParser()
{
@@ -58,13 +59,13 @@
this(new StringReader(""));
}
- public Object parse(SimpleString selector, Map identifierMap)
+ public Object parse(SimpleString selector, Map<SimpleString, Identifier> identifierMap)
throws ParseException
{
return parse(selector, identifierMap, false);
}
- public Object parse(SimpleString selector, Map identifierMap, boolean trace)
+ public Object parse(SimpleString selector, Map<SimpleString, Identifier> identifierMap, boolean trace)
throws ParseException
{
SimpleStringReader sr = new SimpleStringReader(selector);
@@ -112,13 +113,13 @@
return new SimpleString(result.toString());
}
- public static Object doParse(SimpleString selector, Map identifierMap)
+ public static Object doParse(SimpleString selector, Map<SimpleString, Identifier> identifierMap)
throws ParseException
{
return doParse(selector, identifierMap, false);
}
- public static Object doParse(SimpleString selector, Map identifierMap, boolean trace)
+ public static Object doParse(SimpleString selector, Map<SimpleString, Identifier> identifierMap, boolean trace)
throws ParseException
{
FilterParser parser = new FilterParser();
@@ -334,7 +335,7 @@
}
|
LOOKAHEAD(2147483647)
- id=identifier() [ not=<NOT> ] <IN> <LPAREN> { set = new HashSet(); } stringList(set) <RPAREN>
+ id=identifier() [ not=<NOT> ] <IN> <LPAREN> { set = new HashSet<SimpleString>(); } stringList(set) <RPAREN>
{
if (not == null)
return new Operator(Operator.IN, id, set);
@@ -399,14 +400,14 @@
}
}
-void stringList(Set set) :
+void stringList(Set<SimpleString> set) :
{
}
{
stringToken(set) ( <COMMA> stringToken(set))*
}
-void stringToken(Set set) :
+void stringToken(Set<SimpleString> set) :
{
Token t = null;
}
@@ -626,7 +627,7 @@
id=<IDENTIFIER>
{
SimpleString simage = new SimpleString(id.image);
- Identifier identifier = (Identifier) identifierMap.get(simage);
+ Identifier identifier = identifierMap.get(simage);
if (identifier == null)
{
identifier = new Identifier(simage);
@@ -635,3 +636,4 @@
return identifier;
}
}
+// CHECKSTYLE:ON
12 years, 11 months
JBoss hornetq SVN: r10729 - in branches/HORNETQ-698_SplitJournal: hornetq-commons/src/main/java/org/hornetq/core and 3 other directories.
by do-not-reply@jboss.org
Author: borges
Date: 2011-05-25 13:32:12 -0400 (Wed, 25 May 2011)
New Revision: 10729
Added:
branches/HORNETQ-698_SplitJournal/hornetq-commons/src/main/java/org/hornetq/api/core/HornetQException.java
branches/HORNETQ-698_SplitJournal/hornetq-commons/src/main/java/org/hornetq/core/server/
branches/HORNETQ-698_SplitJournal/hornetq-commons/src/main/java/org/hornetq/core/server/HornetQComponent.java
Removed:
branches/HORNETQ-698_SplitJournal/hornetq-journal/src/main/java/org/hornetq/api/core/HornetQException.java
branches/HORNETQ-698_SplitJournal/hornetq-journal/src/main/java/org/hornetq/core/server/HornetQComponent.java
Log:
Move HQException and HQComponent around
Copied: branches/HORNETQ-698_SplitJournal/hornetq-commons/src/main/java/org/hornetq/api/core/HornetQException.java (from rev 10728, branches/HORNETQ-698_SplitJournal/hornetq-journal/src/main/java/org/hornetq/api/core/HornetQException.java)
===================================================================
--- branches/HORNETQ-698_SplitJournal/hornetq-commons/src/main/java/org/hornetq/api/core/HornetQException.java (rev 0)
+++ branches/HORNETQ-698_SplitJournal/hornetq-commons/src/main/java/org/hornetq/api/core/HornetQException.java 2011-05-25 17:32:12 UTC (rev 10729)
@@ -0,0 +1,226 @@
+/*
+ * Copyright 2009 Red Hat, Inc.
+ * Red Hat licenses this file to you 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.hornetq.api.core;
+
+/**
+ *
+ * HornetQException is the root exception for HornetQ API.
+ *
+ * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
+ *
+ */
+public class HornetQException extends Exception
+{
+ private static final long serialVersionUID = -4802014152804997417L;
+
+ // Error codes -------------------------------------------------
+
+ /**
+ * Internal error which prevented HornetQ to perform.
+ */
+ public static final int INTERNAL_ERROR = 000;
+
+ /**
+ * A packet of unsupported type was received by HornetQ PacketHandler.
+ */
+ public static final int UNSUPPORTED_PACKET = 001;
+
+ /**
+ * A client is not able to connect to HornetQ server.
+ */
+ public static final int NOT_CONNECTED = 002;
+
+ /**
+ * A client timed out will connecting to HornetQ server.
+ */
+ public static final int CONNECTION_TIMEDOUT = 003;
+
+ /**
+ * A client was disconnected from HornetQ server when the server has shut down.
+ */
+ public static final int DISCONNECTED = 004;
+
+ /**
+ * A blocking call from a client was unblocked during failover.
+ */
+ public static final int UNBLOCKED = 005;
+
+ /**
+ * Unexpected I/O error occured on the server.
+ */
+ public static final int IO_ERROR = 006;
+
+ /**
+ * An operation failed because a queue does not exist on the server.
+ */
+ public static final int QUEUE_DOES_NOT_EXIST = 100;
+
+ /**
+ * An operation failed because a queue exists on the server.
+ */
+ public static final int QUEUE_EXISTS = 101;
+
+ /**
+ * A client operation failed because the calling resource
+ * (ClientSession, ClientProducer, etc.) is closed.
+ */
+ public static final int OBJECT_CLOSED = 102;
+
+ /**
+ * An filter expression has not been validated
+ */
+ public static final int INVALID_FILTER_EXPRESSION = 103;
+
+ /**
+ * A HornetQ resource is not in a legal state (e.g. calling
+ * ClientConsumer.receive() if a MessageHandler is set)
+ */
+ public static final int ILLEGAL_STATE = 104;
+
+ /**
+ * A security problem occured (authentication issues, permission issues,...)
+ */
+ public static final int SECURITY_EXCEPTION = 105;
+
+ /**
+ * An operation failed because an address does not exist on the server.
+ */
+ public static final int ADDRESS_DOES_NOT_EXIST = 106;
+
+ /**
+ * An operation failed because an address exists on the server.
+ */
+ public static final int ADDRESS_EXISTS = 107;
+
+ /**
+ * A incompatibility between HornetQ versions on the client and the server has been detected
+ */
+ public static final int INCOMPATIBLE_CLIENT_SERVER_VERSIONS = 108;
+
+ /**
+ * An operation failed because a session exists on the server.
+ */
+ public static final int SESSION_EXISTS = 109;
+
+ /**
+ * An problem occurred while manipulating the body of a large message.
+ */
+ public static final int LARGE_MESSAGE_ERROR_BODY = 110;
+
+ /**
+ * A transaction was rolled back.
+ */
+ public static final int TRANSACTION_ROLLED_BACK = 111;
+
+ /**
+ * The creation of a session was rejected by the server (e.g. if the
+ * server is starting and has not finish to be initialized)
+ */
+ public static final int SESSION_CREATION_REJECTED = 112;
+
+ /**
+ * A DuplicateID was rejected.
+ */
+ public static final int DUPLICATE_ID_REJECTED = 113;
+
+
+ // Native Error codes ----------------------------------------------
+
+ /**
+ * A internal error occured in the AIO native code
+ */
+ public static final int NATIVE_ERROR_INTERNAL = 200;
+
+ /**
+ * A buffer is invalid in the AIO native code
+ */
+ public static final int NATIVE_ERROR_INVALID_BUFFER = 201;
+
+ /**
+ * Alignment error in the AIO native code
+ */
+ public static final int NATIVE_ERROR_NOT_ALIGNED = 202;
+
+ /**
+ * AIO has not been properly initialized
+ */
+ public static final int NATIVE_ERROR_CANT_INITIALIZE_AIO = 203;
+
+ /**
+ * AIO has not been properly released
+ */
+ public static final int NATIVE_ERROR_CANT_RELEASE_AIO = 204;
+
+ /**
+ * A closed file has not be properly reopened
+ */
+ public static final int NATIVE_ERROR_CANT_OPEN_CLOSE_FILE = 205;
+
+ /**
+ * An error occured while allocating a queue in AIO native code
+ */
+ public static final int NATIVE_ERROR_CANT_ALLOCATE_QUEUE = 206;
+
+ /**
+ * An error occured while pre-allocating a file in AIO native code
+ */
+ public static final int NATIVE_ERROR_PREALLOCATE_FILE = 208;
+
+ /**
+ * An error occurred while allocating memory in the AIO native code
+ */
+ public static final int NATIVE_ERROR_ALLOCATE_MEMORY = 209;
+
+ /**
+ * AIO is full
+ */
+ public static final int NATIVE_ERROR_AIO_FULL = 211;
+
+ private int code;
+
+ public HornetQException()
+ {
+ }
+
+ public HornetQException(final int code)
+ {
+ this.code = code;
+ }
+
+ public HornetQException(final int code, final String msg)
+ {
+ super(msg);
+
+ this.code = code;
+ }
+
+ public HornetQException(final int code, final String msg, final Throwable cause)
+ {
+ super(msg, cause);
+
+ this.code = code;
+ }
+
+ public int getCode()
+ {
+ return code;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "HornetQException[errorCode=" + code + " message=" + getMessage() + "]";
+ }
+
+}
Copied: branches/HORNETQ-698_SplitJournal/hornetq-commons/src/main/java/org/hornetq/core/server/HornetQComponent.java (from rev 10728, branches/HORNETQ-698_SplitJournal/hornetq-journal/src/main/java/org/hornetq/core/server/HornetQComponent.java)
===================================================================
--- branches/HORNETQ-698_SplitJournal/hornetq-commons/src/main/java/org/hornetq/core/server/HornetQComponent.java (rev 0)
+++ branches/HORNETQ-698_SplitJournal/hornetq-commons/src/main/java/org/hornetq/core/server/HornetQComponent.java 2011-05-25 17:32:12 UTC (rev 10729)
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2009 Red Hat, Inc.
+ * Red Hat licenses this file to you 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.hornetq.core.server;
+
+/**
+ * A HornetQComponent
+ *
+ * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
+ * @version <tt>$Revision: 2796 $</tt>
+ *
+ * $Id: HornetQComponent.java 2796 2007-06-25 22:24:41Z timfox $
+ *
+ */
+public interface HornetQComponent
+{
+ void start() throws Exception;
+
+ void stop() throws Exception;
+
+ boolean isStarted();
+}
Deleted: branches/HORNETQ-698_SplitJournal/hornetq-journal/src/main/java/org/hornetq/api/core/HornetQException.java
===================================================================
--- branches/HORNETQ-698_SplitJournal/hornetq-journal/src/main/java/org/hornetq/api/core/HornetQException.java 2011-05-25 17:31:09 UTC (rev 10728)
+++ branches/HORNETQ-698_SplitJournal/hornetq-journal/src/main/java/org/hornetq/api/core/HornetQException.java 2011-05-25 17:32:12 UTC (rev 10729)
@@ -1,226 +0,0 @@
-/*
- * Copyright 2009 Red Hat, Inc.
- * Red Hat licenses this file to you 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.hornetq.api.core;
-
-/**
- *
- * HornetQException is the root exception for HornetQ API.
- *
- * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
- *
- */
-public class HornetQException extends Exception
-{
- private static final long serialVersionUID = -4802014152804997417L;
-
- // Error codes -------------------------------------------------
-
- /**
- * Internal error which prevented HornetQ to perform.
- */
- public static final int INTERNAL_ERROR = 000;
-
- /**
- * A packet of unsupported type was received by HornetQ PacketHandler.
- */
- public static final int UNSUPPORTED_PACKET = 001;
-
- /**
- * A client is not able to connect to HornetQ server.
- */
- public static final int NOT_CONNECTED = 002;
-
- /**
- * A client timed out will connecting to HornetQ server.
- */
- public static final int CONNECTION_TIMEDOUT = 003;
-
- /**
- * A client was disconnected from HornetQ server when the server has shut down.
- */
- public static final int DISCONNECTED = 004;
-
- /**
- * A blocking call from a client was unblocked during failover.
- */
- public static final int UNBLOCKED = 005;
-
- /**
- * Unexpected I/O error occured on the server.
- */
- public static final int IO_ERROR = 006;
-
- /**
- * An operation failed because a queue does not exist on the server.
- */
- public static final int QUEUE_DOES_NOT_EXIST = 100;
-
- /**
- * An operation failed because a queue exists on the server.
- */
- public static final int QUEUE_EXISTS = 101;
-
- /**
- * A client operation failed because the calling resource
- * (ClientSession, ClientProducer, etc.) is closed.
- */
- public static final int OBJECT_CLOSED = 102;
-
- /**
- * An filter expression has not been validated
- */
- public static final int INVALID_FILTER_EXPRESSION = 103;
-
- /**
- * A HornetQ resource is not in a legal state (e.g. calling
- * ClientConsumer.receive() if a MessageHandler is set)
- */
- public static final int ILLEGAL_STATE = 104;
-
- /**
- * A security problem occured (authentication issues, permission issues,...)
- */
- public static final int SECURITY_EXCEPTION = 105;
-
- /**
- * An operation failed because an address does not exist on the server.
- */
- public static final int ADDRESS_DOES_NOT_EXIST = 106;
-
- /**
- * An operation failed because an address exists on the server.
- */
- public static final int ADDRESS_EXISTS = 107;
-
- /**
- * A incompatibility between HornetQ versions on the client and the server has been detected
- */
- public static final int INCOMPATIBLE_CLIENT_SERVER_VERSIONS = 108;
-
- /**
- * An operation failed because a session exists on the server.
- */
- public static final int SESSION_EXISTS = 109;
-
- /**
- * An problem occurred while manipulating the body of a large message.
- */
- public static final int LARGE_MESSAGE_ERROR_BODY = 110;
-
- /**
- * A transaction was rolled back.
- */
- public static final int TRANSACTION_ROLLED_BACK = 111;
-
- /**
- * The creation of a session was rejected by the server (e.g. if the
- * server is starting and has not finish to be initialized)
- */
- public static final int SESSION_CREATION_REJECTED = 112;
-
- /**
- * A DuplicateID was rejected.
- */
- public static final int DUPLICATE_ID_REJECTED = 113;
-
-
- // Native Error codes ----------------------------------------------
-
- /**
- * A internal error occured in the AIO native code
- */
- public static final int NATIVE_ERROR_INTERNAL = 200;
-
- /**
- * A buffer is invalid in the AIO native code
- */
- public static final int NATIVE_ERROR_INVALID_BUFFER = 201;
-
- /**
- * Alignment error in the AIO native code
- */
- public static final int NATIVE_ERROR_NOT_ALIGNED = 202;
-
- /**
- * AIO has not been properly initialized
- */
- public static final int NATIVE_ERROR_CANT_INITIALIZE_AIO = 203;
-
- /**
- * AIO has not been properly released
- */
- public static final int NATIVE_ERROR_CANT_RELEASE_AIO = 204;
-
- /**
- * A closed file has not be properly reopened
- */
- public static final int NATIVE_ERROR_CANT_OPEN_CLOSE_FILE = 205;
-
- /**
- * An error occured while allocating a queue in AIO native code
- */
- public static final int NATIVE_ERROR_CANT_ALLOCATE_QUEUE = 206;
-
- /**
- * An error occured while pre-allocating a file in AIO native code
- */
- public static final int NATIVE_ERROR_PREALLOCATE_FILE = 208;
-
- /**
- * An error occurred while allocating memory in the AIO native code
- */
- public static final int NATIVE_ERROR_ALLOCATE_MEMORY = 209;
-
- /**
- * AIO is full
- */
- public static final int NATIVE_ERROR_AIO_FULL = 211;
-
- private int code;
-
- public HornetQException()
- {
- }
-
- public HornetQException(final int code)
- {
- this.code = code;
- }
-
- public HornetQException(final int code, final String msg)
- {
- super(msg);
-
- this.code = code;
- }
-
- public HornetQException(final int code, final String msg, final Throwable cause)
- {
- super(msg, cause);
-
- this.code = code;
- }
-
- public int getCode()
- {
- return code;
- }
-
- @Override
- public String toString()
- {
- return "HornetQException[errorCode=" + code + " message=" + getMessage() + "]";
- }
-
-}
Deleted: branches/HORNETQ-698_SplitJournal/hornetq-journal/src/main/java/org/hornetq/core/server/HornetQComponent.java
===================================================================
--- branches/HORNETQ-698_SplitJournal/hornetq-journal/src/main/java/org/hornetq/core/server/HornetQComponent.java 2011-05-25 17:31:09 UTC (rev 10728)
+++ branches/HORNETQ-698_SplitJournal/hornetq-journal/src/main/java/org/hornetq/core/server/HornetQComponent.java 2011-05-25 17:32:12 UTC (rev 10729)
@@ -1,32 +0,0 @@
-/*
- * Copyright 2009 Red Hat, Inc.
- * Red Hat licenses this file to you 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.hornetq.core.server;
-
-/**
- * A HornetQComponent
- *
- * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
- * @version <tt>$Revision: 2796 $</tt>
- *
- * $Id: HornetQComponent.java 2796 2007-06-25 22:24:41Z timfox $
- *
- */
-public interface HornetQComponent
-{
- void start() throws Exception;
-
- void stop() throws Exception;
-
- boolean isStarted();
-}
12 years, 11 months
JBoss hornetq SVN: r10728 - branches/HORNETQ-698_SplitJournal/tests/integration-tests/src/test/java/org/hornetq/tests/integration/logging.
by do-not-reply@jboss.org
Author: borges
Date: 2011-05-25 13:31:09 -0400 (Wed, 25 May 2011)
New Revision: 10728
Modified:
branches/HORNETQ-698_SplitJournal/tests/integration-tests/src/test/java/org/hornetq/tests/integration/logging/LogDelegateTest.java
Log:
organize imports
Modified: branches/HORNETQ-698_SplitJournal/tests/integration-tests/src/test/java/org/hornetq/tests/integration/logging/LogDelegateTest.java
===================================================================
--- branches/HORNETQ-698_SplitJournal/tests/integration-tests/src/test/java/org/hornetq/tests/integration/logging/LogDelegateTest.java 2011-05-25 17:30:36 UTC (rev 10727)
+++ branches/HORNETQ-698_SplitJournal/tests/integration-tests/src/test/java/org/hornetq/tests/integration/logging/LogDelegateTest.java 2011-05-25 17:31:09 UTC (rev 10728)
@@ -16,7 +16,6 @@
import junit.framework.Assert;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.logging.impl.JULLogDelegate;
import org.hornetq.core.logging.impl.JULLogDelegateFactory;
12 years, 11 months