Re: Master/Slave jdbc row lock can't be auto-released

2007-09-13 Thread Dingwen Yuan
Thank you Mario,

Killing the process also works for me. But I seems when suddenly a power
failure occurs, postgres and mysql have no means to release the lock.

Dingwen Yuan



2007/9/13, Mario Siegenthaler [EMAIL PROTECTED]:

 This works for me. As soon as the database detects the loss of the
 connection it frees the lock. Tested with MySQL and SQL-Server. I
 didn't plug the power but instead did a kill -9 or unplugged the
 network cable on the master.
 I think this is supposed to be a feature of any database or else you'd
 end up with a lot of locked rows if some clients terminate ungraceful.

 Mario

 On 9/12/07, Dingwen Yuan [EMAIL PROTECTED] wrote:
  Hi folks,
 
  We have tested master/slave configuration with pure jdbc persistence and
 the
  db used are mysql and postgres. When we plugged out the electric cable
 of
  the master machine, the row lock on the table ACTIVEMQ_LOCK cannot be
  released. So later neither of the machines can get the lock and become
 the
  master? Is the a known problem? Does any database support row lock auto
  release?
 
  Thanks
 
  Dingwen Yuan
 



Failed to pass expired message to DLQ and how to configure?

2007-09-02 Thread Dingwen Yuan
Hello all,

While I am trying to test AMQ message expiration, I encountered some
problems. I send a message to a Queue every 10ms with the following code:
   producer.send(queue, message, DeliveryMode.PERSISTENT,
Message.DEFAULT_PRIORITY, 10*60*1000).
According to my understanding the messages will expire after 10 minutes. But
I always get the following error stack trace on AMQ broker and at the same
time, the journal folder seems to keep growing.

2007-09-03 10:33:31,093 [m://localhost#3] WARN
RegionBroker   - Failed to pass expired message to dead
letter queue
java.lang.NullPointerException
 at org.apache.activemq.util.BrokerSupport.resend(BrokerSupport.java:55)
 at org.apache.activemq.broker.region.RegionBroker.sendToDeadLetterQueue(
RegionBroker.java:667)
 at org.apache.activemq.broker.BrokerFilter.sendToDeadLetterQueue(
BrokerFilter.java:257)
 at org.apache.activemq.broker.BrokerFilter.sendToDeadLetterQueue(
BrokerFilter.java:257)
 at org.apache.activemq.broker.BrokerFilter.sendToDeadLetterQueue(
BrokerFilter.java:257)
 at org.apache.activemq.broker.MutableBrokerFilter.sendToDeadLetterQueue(
MutableBrokerFilter.java:273)
 at org.apache.activemq.broker.region.RegionBroker.messageExpired(
RegionBroker.java:636)
 at org.apache.activemq.broker.BrokerFilter.messageExpired(BrokerFilter.java
:253)
 at org.apache.activemq.advisory.AdvisoryBroker.messageExpired(
AdvisoryBroker.java:237)
 at org.apache.activemq.broker.BrokerFilter.messageExpired(BrokerFilter.java
:253)
 at org.apache.activemq.broker.MutableBrokerFilter.messageExpired(
MutableBrokerFilter.java:269)
 at org.apache.activemq.broker.region.Queue.doPageIn(Queue.java:1027)
 at org.apache.activemq.broker.region.Queue.doPageIn(Queue.java:1002)
 at org.apache.activemq.broker.region.Queue.addSubscription(Queue.java:228)
 at org.apache.activemq.broker.region.AbstractRegion.addConsumer(
AbstractRegion.java:262)
 at org.apache.activemq.broker.region.RegionBroker.addConsumer(
RegionBroker.java:335)
 at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java
:85)
 at org.apache.activemq.advisory.AdvisoryBroker.addConsumer(
AdvisoryBroker.java:79)
 at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java
:85)
 at org.apache.activemq.broker.MutableBrokerFilter.addConsumer(
MutableBrokerFilter.java:95)
 at org.apache.activemq.broker.TransportConnection.processAddConsumer(
TransportConnection.java:565)
 at org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:334)
 at org.apache.activemq.broker.TransportConnection.service(
TransportConnection.java:320)
 at org.apache.activemq.broker.TransportConnection$1.onCommand(
TransportConnection.java:216)
 at org.apache.activemq.transport.ResponseCorrelator.onCommand(
ResponseCorrelator.java:100)
 at org.apache.activemq.transport.TransportFilter.onCommand(
TransportFilter.java:67)
 at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java
:233)
 at org.apache.activemq.thread.DedicatedTaskRunner.runTask(
DedicatedTaskRunner.java:98)
 at org.apache.activemq.thread.DedicatedTaskRunner$1.run(
DedicatedTaskRunner.java:36)

Does it mean that the DLQ strategy was inproperly configured? In our
application, I don't want expired messages to be sent to DLQs. How should I
configure it? Or could it be a bug in the latest snapshot?

The AMQ version is :apache-activemq-5.0-20070827.124842-62

Thank you in advance.


Re: How can i contribute to the AMQ-documentation?

2007-08-21 Thread Dingwen Yuan
I strongly agree to that. But the way, I think AMQ lacks a well orgnized
user/developer guide.
It seems that you should have an acount to login to Confluence, and then you
could edit the wiki page.

2007/8/21, j0llyr0g3r [EMAIL PROTECTED]:


 Hey folks,

 i really think AMQ is a great piece of software.

 Unfortunately, i think the documentation is really not sufficient for new
 users.

 So, is there a way new users can contribute to the documentation?

 E.g.: Fixing errors (found some in various locations), submitting
 user-configuration and examples, clarifying certain (confusing)
 explanations
 and so on, fixing different named links linking to the same site..

 I especially find it confusing, that the documentation is splitted into
 using and features. Many things you would expect to find under using
 are under features and vice versa.

 Some kind of wiki would be great.
 --
 View this message in context:
 http://www.nabble.com/How-can-i-contribute-to-the-AMQ-documentation--tf4303638s2354.html#a12250045
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.




Stomp property expires doesn't work on AMQ4.2

2007-08-20 Thread Dingwen Yuan
Hi folk,

I have used a stomp client with *apache-activemq-4.2-20070607.230602-81. *I
sent and then received messages from a same queue. But when I send with an *
expires *header set of non-zero value, I can't get the message I sent. It
works properly when *expires *is set to 0 or with AMQ version 4.1. I have
looked at the source code of stomp, but can't find the bug. Can any
developer help to test it?

Thank you in advance.


Suggest writing a book about AMQ

2007-08-09 Thread Dingwen Yuan
Hi folks,

ActiveMQ is now becoming more and more astonishing. I suggest some developers 
could write a book about it. Because the design and implementation details 
about AMQ are relative scarse and scattered everywhere, it will be ideal to 
have a book to summarize all the design issues and thus make further 
exploration and extension easier. How do you think about it?




Dingwen Yuan
2007-08-09


Re: Suggest writing a book about AMQ

2007-08-09 Thread Dingwen Yuan
I suggest divide and conquer. The book could be divided into several
chapters, each of which deals with a component of AMQ. And volunteers could
take one or two chapters and focus on it.


2007/8/9, James Strachan [EMAIL PROTECTED]:

 I think its a great idea! We just need some volunteers to help write
 the book who've got the time :)

 On 8/9/07, Suchitha Koneru (sukoneru) [EMAIL PROTECTED] wrote:
  Yes , I think it is good idea, because we will have all the
  configuration details organized at one place. This book has to be kept
  up to date as and when new versions of active mq are released.
 
 
  -Original Message-
  From: Dingwen Yuan [mailto:[EMAIL PROTECTED]
  Sent: Thursday, August 09, 2007 12:35 AM
  To: activemq_user
  Subject: Suggest writing a book about AMQ
 
  Hi folks,
 
  ActiveMQ is now becoming more and more astonishing. I suggest some
  developers could write a book about it. Because the design and
  implementation details about AMQ are relative scarse and scattered
  everywhere, it will be ideal to have a book to summarize all the design
  issues and thus make further exploration and extension easier. How do
  you think about it?
 
 
 
 
  Dingwen Yuan
  2007-08-09
 


 --
 James
 ---
 http://macstrac.blogspot.com/



Re: Re: Way to know whether failover client is connecting?

2007-05-09 Thread Dingwen Yuan
It works. Another question for XML configuration: 

suppose I have the following network connectors config.
networkConnectors
  networkConnector name=host1 and host2 
uri=static://(tcp://host1:61616,tcp://host2:61616) /
  networkConnector name=host3 uri=static://(tcp://host3:61616) /
/networkConnectors
Does it mean that the broker has two network connectors, one will connect to 
either host1 or host2, while the other will always try to connect to host3.

So many questions, sorry for the bothering.



Dingwen Yuan
2007-05-09



发件人: Adrian Co
发送时间: 2007-05-09 15:35:55
收件人: users@activemq.apache.org
抄送: 
主题: Re: Way to know whether failover client is connecting?

Network connections at the moment are one-way afaik. You would need to
create a network connection from the remote broker to the embedded
broker to be able to receive messages to the embedded broker. I think
there's a jira to make it two-way, but I can't remember the number... sorry.

Dingwen Yuan wrote:
 Thank you Adrian,

 I have tried as you suggested, it worked for Topic, but not queue.
 The following is the code for embedded broker.  As you see, I have connected 
 embedded broker to the broker at 61616. When I send a topic, the client 
 connected to 61616 can receive it, but I can not recieved the queue message 
 sent by the client on 61616.
 embeddedBroker = new BrokerService();
NetworkConnector connector = 
 embeddedBroker.addNetworkConnector(static:(tcp://127.0.0.1:61616));
connector.setNetworkTTL(2);
connector.setDynamicOnly(true);
embeddedBroker.start();




 Dingwen Yuan
 2007-05-09



 发件人: Adrian Co
 发送时间: 2007-05-09 13:27:02
 收件人: users@activemq.apache.org
 抄送: 
 主题: Re: Way to know whether failover client is connecting?

 A FailoverListener would be interesting, but afaik, its not provided.

 Dingwen Yuan wrote:
   
  But what is the programmable way to know it?
 
 
 
 
  Dingwen Yuan
  2007-05-09
 
 
 
  发件人: spiderman2
  发送时间: 2007-05-09 11:43:31
  收件人: users@activemq.apache.org
  抄送: 
  主题: Re: Way to know whether failover client is connecting?
 
 
  When I kill the broker to test a failover, I believe the Consumer's logs 
  show
  it trying to failover to another broker.
 
 
 
  Dingwen Yuan wrote:

  
   Hi all,
  
   Is there a way to know that a failover ActiveMQ client is now trying to
   connect to the brokers?
  
   Thank you!
  
  
  
  
   Dingwen Yuan
   2007-05-09
  
  
   
 

  

 !DSPAM:507,46417008227071855215190!

   


Failover blocks send

2007-05-08 Thread Dingwen Yuan
Hi all,

I have used a failover url to configure my JMS client, such as this 
failover:(tcp://127.0.0.1:61616)?jms.useAsyncSend=true. But when the JMS 
broker is down and the client is trying to connect to the broker, all send to 
topics or queues just get blocked. Why should I do if I want only to get an 
exception instead of a blocking.

Thank you in advance!




Dingwen Yuan
2007-05-09


Way to know whether failover client is connecting?

2007-05-08 Thread Dingwen Yuan
Hi all,

Is there a way to know that a failover ActiveMQ client is now trying to connect 
to the brokers?

Thank you!




Dingwen Yuan
2007-05-09


Re: Re: Way to know whether failover client is connecting?

2007-05-08 Thread Dingwen Yuan
But what is the programmable way to know it?




Dingwen Yuan
2007-05-09



发件人: spiderman2
发送时间: 2007-05-09 11:43:31
收件人: users@activemq.apache.org
抄送: 
主题: Re: Way to know whether failover client is connecting?


When I kill the broker to test a failover, I believe the Consumer's logs show
it trying to failover to another broker.



Dingwen Yuan wrote:
 
 Hi all,
 
 Is there a way to know that a failover ActiveMQ client is now trying to
 connect to the brokers?
 
 Thank you!
 
 
 
 
 Dingwen Yuan
 2007-05-09
 
 

-- 
View this message in context: 
http://www.nabble.com/Way-to-know-whether-failover-client-is-connecting--tf3713515s2354.html#a10388010
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Re: Shared File System Master Slave with Windows

2007-04-10 Thread Dingwen Yuan
I have tried the latest version - apache-activemq-4.2-20070328.130210-35, but 
the same error still exists. With what are you going to substitute activeio?

Thank you!




Dingwen Yuan
2007-04-10



发件人: James Strachan
发送时间: 2007-04-03 15:49:52
收件人: users@activemq.apache.org
抄送: 
主题: Re: Shared File System Master Slave with Windows

On 4/3/07, pdvyuan  [EMAIL PROTECTED]  wrote:
 Hi all,

 Can I use a shared windows file system to achieve Shared File System Master 
 Slave? I have made some tests, but occasionally some error would occur. I 
 made the test under 2 instances of activemq-4.2 runing on WinXP. The errors 
 are as follows:

 2007-03-30 17:04:33,640 [28.64.7.49:4858] DEBUG JournalMessageStore   
  - Journalled message add for: 
 ID:xuj01-a7d120-3614-1174637145906-0:0:1:1:296058, at: 39:3829174
 2007-03-30 17:04:33,687 [eckpoint Worker] DEBUG JournalPersistenceAdapter 
  - Checkpoint started.
 2007-03-30 17:04:33,703 [8.64.7.111:1333] DEBUG JournalMessageStore   
  - Journalled message remove for: 
 ID:xuj01-a7d120-3615-1174637145921-1:0:1:1:109282, at: 39:3830090
 2007-03-30 17:04:33,781 [eckpoint Worker] DEBUG JournalPersistenceAdapter 
  - Marking journal at: 39:3829174
 2007-03-30 17:04:33,781 [eckpoint Worker] ERROR JournalPersistenceAdapter 
  - Failed to mark the Journal: 
 org.apache.activeio.journal.InvalidRecordLocationException: The location is 
 less than the last mark.
 org.apache.activeio.journal.InvalidRecordLocationException: The location is 
 less than the last mark.
  at 
 org.apache.activeio.journal.active.JournalImpl.setMark(JournalImpl.java:340)
  at 
 org.apache.activemq.store.journal.JournalPersistenceAdapter.doCheckpoint(JournalPersistenceAdapter.java:400)
  at 
 org.apache.activemq.store.journal.JournalPersistenceAdapter$2.iterate(JournalPersistenceAdapter.java:128)
  at 
 org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:88)
  at 
 org.apache.activemq.thread.DedicatedTaskRunner.access$000(DedicatedTaskRunner.java:25)
  at 
 org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:39)
 2007-03-30 17:04:33,781 [eckpoint Worker] DEBUG JournalPersistenceAdapter 
  - Checkpoint done.

 Is this error due to the insufficient support of exclusive file locks by 
 Windows.

The above looks like a bug. I'm guessing you've used a fairly old
snapshot of 4.2, I'd recommend using a recent one from the end of
March 2007 which no longer uses activeio AFAIK.

http://people.apache.org/repo/m2-snapshot-repository/org/apache/activemq/apache-activemq/4.2-SNAPSHOT/

-- 

James
---
http://radio.weblogs.com/0112098/


[no subject]

2007-04-05 Thread Dingwen Yuan
Hi all, 

I have written a delphi control that can serve as a Stomp client. How can I 
contribute it to the Stomp project.

Thank you!




Dingwen Yuan
2007-04-06