You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by drwho <go...@gmail.com> on 2006/06/30 21:01:05 UTC
Oracle XE
I have activeMQ4.0.1 set up to persist on Oracle XE.
Below is the config file...
<broker brokerName="TestMasterSlave" persistent="true" useJmx="true" >.....
.................................
<persistenceAdapter>
<journaledJDBC journalLogFiles="5" dataDirectory="../activemq-data"
dataSource="#oracle-ds"/>
</persistenceAdapter>
...........................
<bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName"
value="oracle.jdbc.driver.OracleDriver"/>
<property name="url" value="jdbc:oracle:thin:@//localhost:1521/XE"/>
<property name="username" value="system"/>
<property name="password" value="password"/>
<property name="poolPreparedStatements" value="true"/>
</bean>
I see a couple of tables (ACTIVEMQ_ACK and ACTIVEMQ_MSGS) were created in
Oracle XE when I ran the producer example packaged with ActiveMQ. But none
of the messages were persisted in XE. Any idea why?
Gordon
--
View this message in context: http://www.nabble.com/Oracle-XE-tf1874741.html#a5125311
Sent from the ActiveMQ - User forum at Nabble.com.
Re: Oracle XE
Posted by drwho <go...@gmail.com>.
Hiram, I am able to persist to XE BUT not without error.
With the original xe installation, I have the following problem running the
example (ant producer) packaged in the activemq install:
[java] Sending message: Message: 16 sent at: Wed Jul 05 09:34:21 EDT 2006
...
[java] Sending message: Message: 17 sent at: Wed Jul 05 09:34:21 EDT 2006
...
[java] Caught: javax.jms.JMSException: Listener refused the connection with
the following error:
[java] javax.jms.JMSException: Listener refused the connection with the
following error:
[java] ORA-12516, TNS:listener could not find available handler with
matching protocol stack
[java] The Connection descriptor used by the client was:
[java] ORA-12516, TNS:listener could not find available handler with
matching protocol stack
[java] The Connection descriptor used by the client was:
[java] //localhost:1521/XE
I can see the messages have been persisted in the Oracle XE database:
After some research on-line that problem might be fixed by changing the
oracle connection or session properties:
I did the following :
SQL> alter system set processes=300 scope=spfile;
System altered.
SQL> alter system set sessions=300 scope=spfile;
System altered.
I was able to process about 3000 messages then it bombs with the following
error messages:
[java] Caught: javax.jms.JMSException: Io exception: The Network Adapter
could not establish the connection
[java] javax.jms.JMSException: Io exception: The Network Adapter could not
establish the connection
[java] at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:45)
[java] at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1118)
[java] at
org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1555)
[java] at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:462)
[java] at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:356)
[java] at ProducerTool.sendLoop(Unknown Source)
[java] at ProducerTool.run(Unknown Source)
[java] at ProducerTool.runTool(Unknown Source)
[java] at ProducerTool.main(Unknown Source)
[java] Caused by: java.io.IOException: Io exception: The Network Adapter
could not establish the connection
[java] at
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:42)
[java] at
org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:58)
[java] at
org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doAddMessage(DefaultJDBCAdapter.java:183)
[java] at
org.apache.activemq.store.jdbc.JDBCMessageStore.addMessage(JDBCMessageStore.java:68)
[java] at
org.apache.activemq.store.memory.MemoryTransactionStore.addMessage(MemoryTransactionStore.java:223)
[java] at
org.apache.activemq.store.memory.MemoryTransactionStore$1.addMessage(MemoryTransactionStore.java:116)
[java] at org.apache.activemq.broker.region.Queue.send(Queue.java:253)
[java] at
org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:225)
[java] at
org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:342)
[java] at
org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:192)
[java] at
org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:113)
[java] at
org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:97)
[java] at
org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:126)
[java] at
org.apache.activemq.broker.AbstractConnection.processMessage(AbstractConnection.java:351)
[java] at
org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:590)
[java] at
org.apache.activemq.broker.AbstractConnection.service(AbstractConnection.java:201)
[java] at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:62)
[java] at
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:97)
[java] at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:63)
[java] at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:114)
[java] at
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:122)
[java] at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:87)
[java] at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:143)
[java] at java.lang.Thread.run(Thread.java:595)
[java] Caused by: java.sql.SQLException: Io exception: The Network Adapter
could not establish the connection
[java] at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
[java] at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
[java] at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:274)
[java] at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)
[java] at
oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:361)
[java] at
oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
[java] at
oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
[java] at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:595)
[java] at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
[java] at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
[java] at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:771)
[java] at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95)
[java] at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:544)
[java] at
org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:54)
I adjusted the processes and sessions to 500 then it bombs out at 41,000
with the same error message.
I have placed ojdbc14.jar in <installedActiveMQ directory>\lib. The
operating system is Windows XP Pro. I have also tried the following
configuration in my config file
<bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName"
value="oracle.jdbc.driver.OracleDriver"/>
<property name="url" value="jdbc:oracle:thin:@//localhost:1521/XE"/>
<property name="username" value="system"/>
<property name="password" value="password"/>
<property name="poolPreparedStatements" value="true"/>
<property name="removeAbandoned" value="true"/>
<property name="removeAbandonedTimeout" value="60"/>
<property name="logAbandoned" value="true"/>
<property name="maxActive" value="300" />
<property name="maxIdle" value="100" />
<property name="maxWait" value="-1"/>
</bean>
Has anyone tried to persist to XE and has it worked?
--
View this message in context: http://www.nabble.com/Oracle-XE-tf1874741.html#a5182042
Sent from the ActiveMQ - User forum at Nabble.com.
Re: Oracle XE
Posted by Hiram Chirino <hi...@hiramchirino.com>.
The SQL database is only used for long term persistence. Recently received
messages are only in the journal data files. After about 5 minutes or after
the broker is restarted those messages should make it into the SQL
database. This is done for performance reasons. If you don't mind going a
little slower you can disable the use of the journal and persist messages
directly to the SQL database.
On 6/30/06, drwho <go...@gmail.com> wrote:
>
>
> I have activeMQ4.0.1 set up to persist on Oracle XE.
> Below is the config file...
> <broker brokerName="TestMasterSlave" persistent="true" useJmx="true"
> >.....
> .................................
> <persistenceAdapter>
> <journaledJDBC journalLogFiles="5"
> dataDirectory="../activemq-data"
> dataSource="#oracle-ds"/>
>
> </persistenceAdapter>
> ...........................
> <bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource"
> destroy-method="close">
> <property name="driverClassName"
> value="oracle.jdbc.driver.OracleDriver"/>
> <property name="url"
> value="jdbc:oracle:thin:@//localhost:1521/XE"/>
> <property name="username" value="system"/>
> <property name="password" value="password"/>
> <property name="poolPreparedStatements" value="true"/>
> </bean>
>
> I see a couple of tables (ACTIVEMQ_ACK and ACTIVEMQ_MSGS) were created in
> Oracle XE when I ran the producer example packaged with ActiveMQ. But none
> of the messages were persisted in XE. Any idea why?
> Gordon
> --
> View this message in context:
> http://www.nabble.com/Oracle-XE-tf1874741.html#a5125311
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>
--
Regards,
Hiram
Blog: http://hiramchirino.com