Re: Memory Usage

2007-04-10 Thread James Strachan

You might want to try 4.2 which supports spooling to disk to avoid
memory exhaustion.

On 4/10/07, Ramesh Bobba [EMAIL PROTECTED] wrote:

Hi,



I have 4 consumers - 2 durable and 2 non durable. What I am observing is
that when a durable consumer is down, none of the other consumers get
data! I am using 4.1.1. I am also observing that when a consumer is
down, the memory keeps increasing. The memoryManager element does not
seem to have any effect on this. I also tried with journalJDBC turned
off but still the same behavior. If I start the consumer before the
server runs out of memory, memory starts to drop immediately.



What is using this memory up? Is there a way to tell the broker to not
store messages in memory and to use the datastore? Our requirements are
not that stringent on performance.



Ramesh.





--

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


Re: journaledJDBC no longer exists?

2007-04-10 Thread James Strachan

No, journaledJDBC is still there. If you are having issues configuring
ActiveMQ inside a regular Spring.xml you could try using the factory
bean instead...

http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html

On 4/9/07, Andy DePue [EMAIL PROTECTED] wrote:

We are looking into upgrading from AMQ 3.1 to 4.1.1 (embedded in a
Spring based app).  I attempted to get things going using the spring XML
below, based on examples given on the AMQ web site.  However, the XSD
does not define a journaledJDBC element, and any attempt to use it
results in a validation error at runtime.  Has this been removed or
replaced?  If so, what should one use as an alternative to get identical
behavior?

Here is XML I attempted:

beans
xmlns=http://www.springframework.org/schema/beans;
xmlns:amq=http://activemq.org/config/1.0;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  http://activemq.org/config/1.0
http://people.apache.org/repository/org.apache.activemq/xsds/activemq-core-4.1-incubator-SNAPSHOT.xsd;

  amq:broker id=activemq.broker useJmx=true persistent=true
amq:persistenceAdapter
  amq:journaledJDBC journalLogFiles=5
dataDirectory=/var/amq/journal dataSource=#derby-ds/
/amq:persistenceAdapter
amq:transportConnectors
  amq:transportConnector
uri=tcp://localhost:${activemq.broker.port}/
/amq:transportConnectors
...
  /amq:broker

...







--

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


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/


Re: Re: JBoss integration and lookup of connection factories.

2007-04-10 Thread rachit goel

@ WALLACE

Yes i have successfully implemented the jms thing rom core java 
application. 

if u use 

Properties  Initialcontext_props = null;

queueName = example.MyQueue;

Initialcontext_props = new Properties();
Initialcontext_props.put(Context.INITIAL_CONTEXT_FACTORY ,
org.apache.activemq.jndi.ActiveMQInitialContextFactory);
Initialcontext_props.put(Context.PROVIDER_URL, 
tcp://app-minim:61616);

Initialcontext_props.put(connectionFactoryNames,jms/QueuecConFactory);
Initialcontext_props.put(queue.MyQueue , queueName);

   jndiContext = new InitialContext(Initialcontext_props);


it will work just fine . Also make sure u have addedd the active-mq's jar
file in ur classpath
-- 
View this message in context: 
http://www.nabble.com/Re%3A-Re%3A-JBoss-integration-and-lookup-of-connection-factories.-tf3552515s2354.html#a9918101
Sent from the ActiveMQ - User mailing list archive at Nabble.com.



Help with JMS client app authenticating to a firewall or proxy

2007-04-10 Thread rachit goel

hi all 

I need to know that is there any way to authenticate JMS clients to a
firewall or proxy on the client side ..

if yes then Can some one please guide me to it .

Any help will be Appreciated.
Thanks in advance . 
-- 
View this message in context: 
http://www.nabble.com/Help-with-JMS-client-app-authenticating-to-a-firewall-or-proxy-tf3552547s2354.html#a9918204
Sent from the ActiveMQ - User mailing list archive at Nabble.com.



problems about database when starting a in-vm broker

2007-04-10 Thread hyqgod

i am planning to use spring to start a in-vm activemq broker in tomcat. But
when i start the tomcat, i get the error messages below in the log file
which means that i don't create a table for activemq,
nested exception is java.io.IOException: Failed to get last broker
message id: java.sql.SQLException: Table 'activemq.ACTIVEMQ_ACKS' doesn't
exist org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService'
defined in ServletContext resource [/WEB-INF/activemq.xml]: Invocation of
init method failed; nested exception is java.io.IOException: Failed to get
last broker message id: java.sql.SQLException: Table
'activemq.ACTIVEMQ_ACKS' doesn't exist
Caused by: java.io.IOException: Failed to get last broker message id:
java.sql.SQLException: Table 'activemq.ACTIVEMQ_ACKS' doesn't exist
at
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:31)
at
org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.getLastMessageBrokerSequenceId(JDBCPersistenceAdapter.java:146)
at
org.apache.activemq.store.journal.JournalPersistenceAdapter.getLastMessageBrokerSequenceId(JournalPersistenceAdapter.java:185)
at
org.apache.activemq.broker.region.DestinationFactoryImpl.getLastMessageBrokerSequenceId(DestinationFactoryImpl.java:148)
at
org.apache.activemq.broker.region.RegionBroker.init(RegionBroker.java:109)
at
org.apache.activemq.broker.jmx.ManagedRegionBroker.init(ManagedRegionBroker.java:100)
at
org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:1385)
at
org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:1319)
at
org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:521)
at
org.apache.activemq.broker.BrokerService.getAdminConnectionContext(BrokerService.java:1558)
at
org.apache.activemq.broker.BrokerService.startDestinations(BrokerService.java:1544)
at 
org.apache.activemq.broker.BrokerService.start(BrokerService.java:411)
at
org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:47)

i try to find the answer,but get nothing,so could anyone can help me? 

by the way: my activemq broker configuration file's content is :

  ?xml version=1.0 encoding=utf-8?
beans
 bean
class=org.springframework.beans.factory.config.PropertyPlaceholderConfigurer/
 broker persistent=true brokerName=localhost dataDirectory=data 
xmlns=http://activemq.org/config/1.0; start=true
destinations
queue physicalName=JSI.QUEUE.TEST /
topic physicalName=JSI.TOPIC.TEST /
/destinations
transportConnectors
   transportConnector name=openwire uri=tcp://localhost:61616
discoveryUri=multicast://default/
   transportConnector name=ssl uri=ssl://localhost:61617/
   transportConnector name=stomp   uri=stomp://localhost:61613/
   transportConnector name=xmppuri=xmpp://localhost:61222/
/transportConnectors

!-- The store and forward broker networks ActiveMQ will listen to --
networkConnectors
  !-- by default just auto discover the other brokers --
  networkConnector name=default-nc uri=multicast://default/
/networkConnectors


!-- Use the following if you wish to configure the journal with JDBC
--
persistenceAdapter
journaledJDBC journalLogFiles=5 dataDirectory=activemq-data 
dataSource=#mysql-ds/
/persistenceAdapter

 /broker
   
 !-- lets create a command agent to respond to message based admin commands
on the ActiveMQ.Agent topic --
  commandAgent  xmlns=http://activemq.org/config/1.0/

  !-- MySql DataSource Sample Setup --
   bean id=mysql-ds class=org.apache.commons.dbcp.BasicDataSource
destroy-method=close
property name=driverClassName value=com.mysql.jdbc.Driver/
property name=url
value=jdbc:mysql://10.10.3.137/activemq?relaxAutoCommit=true/
property name=username value=activemq/
property name=password value=activemq/
property name=poolPreparedStatements value=true/
  /bean
/beans

-- 
View this message in context: 
http://www.nabble.com/problems-about-database-when-starting-a--in-vm-broker-tf3553097s2354.html#a9920108
Sent from the ActiveMQ - User mailing list archive at Nabble.com.



Bugs in the REST examples

2007-04-10 Thread jianxiac

Dear all, 
  I set up the REST/AJAX examples following the instruction: 

http://activemq.apache.org/web-samples.html

and ran the simple HTTP GET / POST via regular web browser technology 
(hyperlinks and HTML forms),  by posting messages with the html form: 

http://myserver:8080/activemq-web-demo/send.html 

and receive the posted message with this URL: 

http://myserver:8080/activemq-web-demo/message/FOO/BAR?timeout=1type=queue 

It works fine if you send one message, then receive one, and so on.
But if you send 10 messages in a row, then start receiving them, then you
will only get half of them,  every other one in the 10 messages. 

The examples were run out of box, with no customization. 
Can anyone reproduce this and help to identify the issue? 

Thanks. 
jianxiac



-- 
View this message in context: 
http://www.nabble.com/Bugs-in-the-REST-examples-tf3553722s2354.html#a9922207
Sent from the ActiveMQ - User mailing list archive at Nabble.com.



Re: JBoss integration and lookup of connection factories.

2007-04-10 Thread wallace

Thanks for response.

This works for me too. But it is a very big limitation to require the client
to hard code the physical queue name (in your example, example.MyQueue). It
defeats the purpose of jndi.  The client should only need to know the jndi
name. So no code change is necessary when the server change the physical
name.

It is now a funny situation. If I lookup from activemq jndi, I have to pass
in the physical name. I can actually lookup the topic name from jboss jndi.
But if I lookup from jboss jndi, connection factory will return null (It
looks like a bug to me as context list binding returns the correct class
name).  Neither of the jndi server gets me both things right.

Thanks for your help though.
-Wallace


rachit goel wrote:
 
 @ WALLACE
 
 Yes i have successfully implemented the jms thing rom core java 
 application. 
 
 if u use 
 
 PropertiesInitialcontext_props = null;
   
   queueName = example.MyQueue;
   
   Initialcontext_props = new Properties();
   Initialcontext_props.put(Context.INITIAL_CONTEXT_FACTORY ,
 org.apache.activemq.jndi.ActiveMQInitialContextFactory);
   Initialcontext_props.put(Context.PROVIDER_URL, 
 tcp://app-minim:61616);
   
 Initialcontext_props.put(connectionFactoryNames,jms/QueuecConFactory);
   Initialcontext_props.put(queue.MyQueue , queueName);
 
  jndiContext = new InitialContext(Initialcontext_props);
 
 
 it will work just fine . Also make sure u have addedd the active-mq's jar
 file in ur classpath.
 
 
 
 wallace wrote:
 
 I can make the jndi lookup working within jboss j2ee container. But jndi
 apparently does not work from a single standalone client, when accessing
 jndi of jboss.
 
 For example,
Properties env2 = new Properties();
..
env2.put(Context.INITIAL_CONTEXT_FACTORY,
 org.jnp.interfaces.NamingContextFactory);
env2.put(Context.PROVIDER_URL, jnp://localhost:1099);
InitialContext jndi2 = new InitialContext(env2);  

TopicConnectionFactory connectionFactory =
 (javax.jms.TopicConnectionFactory)
 jndi2.lookup(java:activemq/TopicConnectionFactory);

 The code always returns name not found exception. Has anyone ever made it
 work in standalone client?
 
 -Wallace Wong
 
 
 
 tbaker73 wrote:
 
 James, could you please provide an example of the connection factory
 entry to add under connection-factories in a -ds.xml file that would
 accomplish what you suggest? How would it differ from this entry?
tx-connection-factory
   jndi-nameactivemq/QueueConnectionFactory/jndi-name
   xa-transaction/
   track-connection-by-tx/
   rar-nameactivemq-ra.rar/rar-name
  
 connection-definitionjavax.jms.QueueConnectionFactory/connection-definition
   ServerUrlvm://localhost/ServerUrl
   UserNamesa/UserName
   Password/Password
   min-pool-size1/min-pool-size
   max-pool-size200/max-pool-size
   blocking-timeout-millis3/blocking-timeout-millis
   idle-timeout-minutes3/idle-timeout-minutes
/tx-connection-factory
 
 
 James.Strachan wrote:
 
 
 You'll need to setup a regular JMS connection and any destination
 objects you want in JNDI somewhere. Using JBoss's JNDI provider could
 well work fine though - just make sure its actually normal JMS client
 objects (ConnectionFactory  destinations) - and not RA stuff.  Also
 make sure the J2EE server and your stand alone client are using the
 exact same ActiveMQ jars since its gonna be using Java serialization
 to transmit the Java objects in JNDI
 -- 
 
 James
 ---
 http://radio.weblogs.com/0112098/
 
 
 
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/JBoss-integration-and-lookup-of-connection-factories.-tf3061463s2354.html#a9922499
Sent from the ActiveMQ - User mailing list archive at Nabble.com.



Re: JBoss integration and lookup of connection factories.

2007-04-10 Thread wallace

Thanks for response.

This works for me too. But it is a very big limitation to require the client
to hard code the physical queue name (in your example, example.MyQueue). It
defeats the purpose of jndi.  The client should only need to know the jndi
name. So no code change is necessary when the server change the physical
name.

It is now a funny situation. If I lookup from activemq jndi, I have to pass
in the physical name. I can actually lookup the topic name from jboss jndi.
But if I lookup from jboss jndi, connection factory will return null (It
looks like a bug to me as context list binding returns the correct class
name).  Neither of the jndi server gets me both things right.

Thanks for your help though.
-Wallace


rachit goel wrote:
 
 @ WALLACE
 
 Yes i have successfully implemented the jms thing rom core java 
 application. 
 
 if u use 
 
 PropertiesInitialcontext_props = null;
   
   queueName = example.MyQueue;
   
   Initialcontext_props = new Properties();
   Initialcontext_props.put(Context.INITIAL_CONTEXT_FACTORY ,
 org.apache.activemq.jndi.ActiveMQInitialContextFactory);
   Initialcontext_props.put(Context.PROVIDER_URL, 
 tcp://app-minim:61616);
   
 Initialcontext_props.put(connectionFactoryNames,jms/QueuecConFactory);
   Initialcontext_props.put(queue.MyQueue , queueName);
 
  jndiContext = new InitialContext(Initialcontext_props);
 
 
 it will work just fine . Also make sure u have addedd the active-mq's jar
 file in ur classpath.
 
 
 
 wallace wrote:
 
 I can make the jndi lookup working within jboss j2ee container. But jndi
 apparently does not work from a single standalone client, when accessing
 jndi of jboss.
 
 For example,
Properties env2 = new Properties();
..
env2.put(Context.INITIAL_CONTEXT_FACTORY,
 org.jnp.interfaces.NamingContextFactory);
env2.put(Context.PROVIDER_URL, jnp://localhost:1099);
InitialContext jndi2 = new InitialContext(env2);  

TopicConnectionFactory connectionFactory =
 (javax.jms.TopicConnectionFactory)
 jndi2.lookup(java:activemq/TopicConnectionFactory);

 The code always returns name not found exception. Has anyone ever made it
 work in standalone client?
 
 -Wallace Wong
 
 
 
 tbaker73 wrote:
 
 James, could you please provide an example of the connection factory
 entry to add under connection-factories in a -ds.xml file that would
 accomplish what you suggest? How would it differ from this entry?
tx-connection-factory
   jndi-nameactivemq/QueueConnectionFactory/jndi-name
   xa-transaction/
   track-connection-by-tx/
   rar-nameactivemq-ra.rar/rar-name
  
 connection-definitionjavax.jms.QueueConnectionFactory/connection-definition
   ServerUrlvm://localhost/ServerUrl
   UserNamesa/UserName
   Password/Password
   min-pool-size1/min-pool-size
   max-pool-size200/max-pool-size
   blocking-timeout-millis3/blocking-timeout-millis
   idle-timeout-minutes3/idle-timeout-minutes
/tx-connection-factory
 
 
 James.Strachan wrote:
 
 
 You'll need to setup a regular JMS connection and any destination
 objects you want in JNDI somewhere. Using JBoss's JNDI provider could
 well work fine though - just make sure its actually normal JMS client
 objects (ConnectionFactory  destinations) - and not RA stuff.  Also
 make sure the J2EE server and your stand alone client are using the
 exact same ActiveMQ jars since its gonna be using Java serialization
 to transmit the Java objects in JNDI
 -- 
 
 James
 ---
 http://radio.weblogs.com/0112098/
 
 
 
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/JBoss-integration-and-lookup-of-connection-factories.-tf3061463s2354.html#a9922505
Sent from the ActiveMQ - User mailing list archive at Nabble.com.



Re: JBoss integration and lookup of connection factories.

2007-04-10 Thread wallace

Thanks for response.

This works for me too. But it is a very big limitation to require the client
to hard code the physical queue name (in your example, example.MyQueue). It
defeats the purpose of jndi.  The client should only need to know the jndi
name. So no code change is necessary when the server change the physical
name.

It is now a funny situation. If I lookup from activemq jndi, I have to pass
in the physical name. I can actually lookup the topic name from jboss jndi.
But if I lookup from jboss jndi, connection factory will return null (It
looks like a bug to me as context list binding returns the correct class
name).  Neither of the jndi server gets me both things right.

Thanks for your help though.
-Wallace


-- 
View this message in context: 
http://www.nabble.com/JBoss-integration-and-lookup-of-connection-factories.-tf3061463s2354.html#a9922506
Sent from the ActiveMQ - User mailing list archive at Nabble.com.



Input queue and output queue grouping and sequences question

2007-04-10 Thread tnine

Hi All,
  I'll be writing a process that uses parallel grid processing to process
message groups.  I'm new to Active MQ and could use some help in finding
documentation or examples.  

I'll be running in the following environment
Java 1.6
JBoss 4
Active MQ 4.1.1
RHEL4

I know I will be performing the following operations.

1. Create a text message with the following format.  [company-name]-[ISO
Date]
2. Push all text messages into this group
3. When I'm done producing all of the messages, I'll perform the
message.setIntProperty(JMSXGroupSeq, 0); to close the group.

I have have the following questions.

Producer/Consumer

1. Is it possible to insert multiple messages into the queue in a single XA
transaction?  If so is there an example?  Since the input is a large flat
file, I want either all messages to be inserted or none.  

2. Is there a way for me to detect on the MDB side when the last message is
sent? Can I simply perform the message.getIntProperty(JMSXGroupSeq) and
search for the value 0 to find the last message?

3. I have 2 queues, one input queue, and one output queue.  Both queues need
to be processed in the exact same order.  As the MDB reads from the input
queue, can I put the same JMSXGroupSeq number into the output queue message
and still have the same ordering semantics without screwing up the Group
processing in Active MQ?


Monitoring

I want to write a simple webapp that shows the percentage of message in the
queues.  Is it possible to read the groups, and for each group show the
messages on the queue?

Thanks,
Todd
-- 
View this message in context: 
http://www.nabble.com/Input-queue-and-output-queue-grouping-and-sequences-question-tf3554541s2354.html#a9924973
Sent from the ActiveMQ - User mailing list archive at Nabble.com.



XML Reference out of date?

2007-04-10 Thread mjparme

I am trying to figure out what the various configuration options are and what
they do but I seemed to be handicapped by an old XML reference. I have found
two versions:

http://activemq.apache.org/xml-reference.html
http://activemq.apache.org/xbean-xml-reference-41.html

The second one seems to be more recent; however, it is still out of date.
For example, I am trying to figure out what this excerpt from the default
activemq.xml file does, policyEntry is documented in the second reference
link but not much else in this excerpt is:

 destinationPolicy
policyMap
policyEntries
policyEntry topic=FOO.
dispatchPolicy
strictOrderDispatchPolicy/
/dispatchPolicy
subscriptionRecoveryPolicy
lastImageSubscriptionRecoveryPolicy/
/subscriptionRecoveryPolicy
/policyEntry

/policyEntries
/policyMap
/destinationPolicy

Is there a more recent XML reference?
-- 
View this message in context: 
http://www.nabble.com/XML-Reference-out-of-date--tf3555250s2354.html#a9926994
Sent from the ActiveMQ - User mailing list archive at Nabble.com.



Re: XML Reference out of date?

2007-04-10 Thread mjparme

Actually I think I figured it out. The second link does have everything
documented...some are documented as a XML element and some just as
properties until another element. I was searching for all of them with the
 on the front so i wasn't finding them all. 

Although even the elements that are documented a lot of there descriptions
are vauge or just missing about exactly what is allowed there. For example
here is the doc for the topic attribute of the policyEntry:

 topic   java.lang.StringA helper method to set the destination from a
configuration file

This doesn't help me much, the example activemq.xml has this as the
policyEntry:

  policyEntry topic=FOO.

Can I assume this matches any topic that begins with FOO.?



mjparme wrote:
 
 I am trying to figure out what the various configuration options are and
 what they do but I seemed to be handicapped by an old XML reference. I
 have found two versions:
 
 http://activemq.apache.org/xml-reference.html
 http://activemq.apache.org/xbean-xml-reference-41.html
 
 The second one seems to be more recent; however, it is still out of date.
 For example, I am trying to figure out what this excerpt from the default
 activemq.xml file does, policyEntry is documented in the second reference
 link but not much else in this excerpt is:
 
  destinationPolicy
 policyMap
 policyEntries
 policyEntry topic=FOO.
 dispatchPolicy
 strictOrderDispatchPolicy/
 /dispatchPolicy
 subscriptionRecoveryPolicy
 lastImageSubscriptionRecoveryPolicy/
 /subscriptionRecoveryPolicy
 /policyEntry
 
 /policyEntries
 /policyMap
 /destinationPolicy
 
 Is there a more recent XML reference?
 

-- 
View this message in context: 
http://www.nabble.com/XML-Reference-out-of-date--tf3555250s2354.html#a9927325
Sent from the ActiveMQ - User mailing list archive at Nabble.com.



Re: journaledJDBC no longer exists?

2007-04-10 Thread Andy DePue
I've managed to get Spring to load the .xml by fully installing XBean 
into my project (including using it to load my Spring app context).  
However, my IDE (IntelliJ IDEA 6.0.5) gives me the red error highlight 
on the amq:journaledJDBC element, so either the .xsd doesn't define it 
for amq:persistenceAdapter, or IDEA isn't validating against the .xsd 
properly.


 - Andy

James Strachan wrote:

No, journaledJDBC is still there. If you are having issues configuring
ActiveMQ inside a regular Spring.xml you could try using the factory
bean instead...

http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html 



On 4/9/07, Andy DePue [EMAIL PROTECTED] wrote:

We are looking into upgrading from AMQ 3.1 to 4.1.1 (embedded in a
Spring based app).  I attempted to get things going using the spring XML
below, based on examples given on the AMQ web site.  However, the XSD
does not define a journaledJDBC element, and any attempt to use it
results in a validation error at runtime.  Has this been removed or
replaced?  If so, what should one use as an alternative to get identical
behavior?

Here is XML I attempted:

beans
xmlns=http://www.springframework.org/schema/beans;
xmlns:amq=http://activemq.org/config/1.0;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  http://activemq.org/config/1.0
http://people.apache.org/repository/org.apache.activemq/xsds/activemq-core-4.1-incubator-SNAPSHOT.xsd; 



  amq:broker id=activemq.broker useJmx=true persistent=true
amq:persistenceAdapter
  amq:journaledJDBC journalLogFiles=5
dataDirectory=/var/amq/journal dataSource=#derby-ds/
/amq:persistenceAdapter
amq:transportConnectors
  amq:transportConnector
uri=tcp://localhost:${activemq.broker.port}/
/amq:transportConnectors
...
  /amq:broker

...









Re: JBoss integration and lookup of connection factories.

2007-04-10 Thread rachit goel

well u can get them from user at run time . like ome sort of preferences or
key - value pair properties file.



wallace wrote:
 
 Thanks for response.
 
 This works for me too. But it is a very big limitation to require the
 client to hard code the physical queue name (in your example,
 example.MyQueue). It defeats the purpose of jndi.  The client should only
 need to know the jndi name. So no code change is necessary when the server
 change the physical name.
 
 It is now a funny situation. If I lookup from activemq jndi, I have to
 pass in the physical name. I can actually lookup the topic name from jboss
 jndi. But if I lookup from jboss jndi, connection factory will return null
 (It looks like a bug to me as context list binding returns the correct
 class name).  Neither of the jndi server gets me both things right.
 
 Thanks for your help though.
 -Wallace
 
 
 rachit goel wrote:
 
 @ WALLACE
 
 Yes i have successfully implemented the jms thing rom core java 
 application. 
 
 if u use 
 
 Properties   Initialcontext_props = null;
  
  queueName = example.MyQueue;
  
  Initialcontext_props = new Properties();
  Initialcontext_props.put(Context.INITIAL_CONTEXT_FACTORY ,
 org.apache.activemq.jndi.ActiveMQInitialContextFactory);
  Initialcontext_props.put(Context.PROVIDER_URL,
 tcp://app-minim:61616);
  
 Initialcontext_props.put(connectionFactoryNames,jms/QueuecConFactory);
  Initialcontext_props.put(queue.MyQueue , queueName);
 
 jndiContext = new InitialContext(Initialcontext_props);
 
 
 it will work just fine . Also make sure u have addedd the active-mq's jar
 file in ur classpath.
 
 
 
 wallace wrote:
 
 I can make the jndi lookup working within jboss j2ee container. But jndi
 apparently does not work from a single standalone client, when accessing
 jndi of jboss.
 
 For example,
Properties env2 = new Properties();
..
env2.put(Context.INITIAL_CONTEXT_FACTORY,
 org.jnp.interfaces.NamingContextFactory);
env2.put(Context.PROVIDER_URL, jnp://localhost:1099);
InitialContext jndi2 = new InitialContext(env2);  

TopicConnectionFactory connectionFactory =
 (javax.jms.TopicConnectionFactory)
 jndi2.lookup(java:activemq/TopicConnectionFactory);

 The code always returns name not found exception. Has anyone ever made
 it work in standalone client?
 
 -Wallace Wong
 
 
 
 tbaker73 wrote:
 
 James, could you please provide an example of the connection factory
 entry to add under connection-factories in a -ds.xml file that would
 accomplish what you suggest? How would it differ from this entry?
tx-connection-factory
   jndi-nameactivemq/QueueConnectionFactory/jndi-name
   xa-transaction/
   track-connection-by-tx/
   rar-nameactivemq-ra.rar/rar-name
  
 connection-definitionjavax.jms.QueueConnectionFactory/connection-definition
   ServerUrlvm://localhost/ServerUrl
   UserNamesa/UserName
   Password/Password
   min-pool-size1/min-pool-size
   max-pool-size200/max-pool-size
   blocking-timeout-millis3/blocking-timeout-millis
   idle-timeout-minutes3/idle-timeout-minutes
/tx-connection-factory
 
 
 James.Strachan wrote:
 
 
 You'll need to setup a regular JMS connection and any destination
 objects you want in JNDI somewhere. Using JBoss's JNDI provider could
 well work fine though - just make sure its actually normal JMS client
 objects (ConnectionFactory  destinations) - and not RA stuff.  Also
 make sure the J2EE server and your stand alone client are using the
 exact same ActiveMQ jars since its gonna be using Java serialization
 to transmit the Java objects in JNDI
 -- 
 
 James
 ---
 http://radio.weblogs.com/0112098/
 
 
 
 
 
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/JBoss-integration-and-lookup-of-connection-factories.-tf3061463s2354.html#a9932985
Sent from the ActiveMQ - User mailing list archive at Nabble.com.



Re: XML Reference out of date?

2007-04-10 Thread Adrian Co

Refer to this: http://activemq.apache.org/wildcards.html

mjparme wrote:

Actually I think I figured it out. The second link does have everything
documented...some are documented as a XML element and some just as
properties until another element. I was searching for all of them with the
 on the front so i wasn't finding them all. 


Although even the elements that are documented a lot of there descriptions
are vauge or just missing about exactly what is allowed there. For example
here is the doc for the topic attribute of the policyEntry:

 topic   java.lang.StringA helper method to set the destination from a
configuration file

This doesn't help me much, the example activemq.xml has this as the
policyEntry:

  policyEntry topic=FOO.

Can I assume this matches any topic that begins with FOO.?



mjparme wrote:
  

I am trying to figure out what the various configuration options are and
what they do but I seemed to be handicapped by an old XML reference. I
have found two versions:

http://activemq.apache.org/xml-reference.html
http://activemq.apache.org/xbean-xml-reference-41.html

The second one seems to be more recent; however, it is still out of date.
For example, I am trying to figure out what this excerpt from the default
activemq.xml file does, policyEntry is documented in the second reference
link but not much else in this excerpt is:

 destinationPolicy
policyMap
policyEntries
policyEntry topic=FOO.
dispatchPolicy
strictOrderDispatchPolicy/
/dispatchPolicy
subscriptionRecoveryPolicy
lastImageSubscriptionRecoveryPolicy/
/subscriptionRecoveryPolicy
/policyEntry

/policyEntries
/policyMap
/destinationPolicy

Is there a more recent XML reference?