activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Datacom - Marcelo <marc...@datacom-telematica.com.br>
Subject Re: Starting embedded broker
Date Tue, 27 Dec 2005 17:18:06 GMT
I tried the first one provided but I've got the same message (it works 
but still tries to use database):
INFO: Database driver recognized: [apache_derby_embedded_jdbc_driver]
WARN: Could not create JDBC tables; they could already exist. Failure 
was: CREATE TABLE ACTIVEMQ_MSGS(ID INTEGER NOT NULL, CONTAINER 
VARCHAR(250), MSGID_PROD VARCHAR(250), MSGID_SEQ INTEGER, EXPIRATION 
BIGINT, MSG BLOB, PRIMARY KEY ( ID ) ) Message: Table/View 
'ACTIVEMQ_MSGS' already exists in Schema 'APP'. SQLState: X0Y32 Vendor 
code: 20000

as I asked before if theres a way to not use jdbc persistence (with 
persistence=false seems to have no effect) will do the trick for me.

Marcelo


Hiram Chirino wrote:

> Hi,
>
> Try:
>
> BrokerService broker = new BrokerService();
> broker.setBrokerName("broker1");
> broker.setPersistent(false);
> broker.start();
>
> or if you like the broker configuration syntax stuff:
>
> BrokerService broker = BrokerFactory.createBroker(new URI("broker:// 
> ()/broker1?persistent=false"));
> broker.start();
>
> Regards,
> Hiram
>
> On Dec 27, 2005, at 11:56 AM, Datacom - Marcelo wrote:
>
>> Hi my whole application runs inside only one instance of a JVM. I  
>> don't want persistence at all, so I am tring to
>> start a broker (using activemq-4.0-M3) with the following:
>>
>>       BrokerService broker = new BrokerService();
>>        try {
>>            broker.addConnector("vm://broker1? 
>> marshal=false&broker.persistent=false");
>>            broker.start();
>>        } catch (Exception e) {
>>             //
>>        }
>> I dont know how to specify a "memoryPersistenceAdapter" I think its  
>> similar to "vmPersistence" used in previous versions.
>> With the above code I allways get:
>>
>> [org.activemq.store.jdbc.JDBCPersistenceAdapter] INFO: Database  
>> driver recognized: [apache_derby_embedded_jdbc_driver]
>> [27/12/2005 14:50:20:593]  
>> [org.activemq.store.jdbc.adapter.DefaultJDBCAdapter] INFO: creating  
>> tables
>> [27/12/2005 14:50:21:890]  
>> [org.activemq.store.jdbc.adapter.DefaultJDBCAdapter] WARN: Could  not 
>> create JDBC tables; they could already exist. Failure was:  CREATE 
>> TABLE ACTIVEMQ_MSGS(ID INTEGER NOT NULL, CONTAINER VARCHAR (250), 
>> MSGID_PROD VARCHAR(250), MSGID_SEQ INTEGER, EXPIRATION  BIGINT, MSG 
>> BLOB, PRIMARY KEY ( ID ) ) Message: Table/View  'ACTIVEMQ_MSGS' 
>> already exists in Schema 'APP'. SQLState: X0Y32  Vendor code: 20000
>> [27/12/2005 14:50:23:171]  
>> [org.activemq.store.jdbc.adapter.DefaultJDBCAdapter] WARN: Could  not 
>> create JDBC tables; they could already exist. Failure was:  CREATE 
>> TABLE ACTIVEMQ_ACKS(CONTAINER VARCHAR(250) NOT NULL,  CLIENT_ID 
>> VARCHAR(250) NOT NULL, SUB_NAME VARCHAR(250) NOT NULL,  SELECTOR 
>> VARCHAR(250), LAST_ACKED_ID INTEGER, PRIMARY KEY  ( CONTAINER, 
>> CLIENT_ID, SUB_NAME)) Message: Table/View  'ACTIVEMQ_ACKS' already 
>> exists in Schema 'APP'. SQLState: X0Y32  Vendor code: 20000
>> [27/12/2005 14:50:23:312]  
>> [org.activemq.store.jdbc.adapter.DefaultJDBCAdapter] INFO: done  
>> creating tables
>> [27/12/2005 14:50:24:500]  
>> [org.activemq.store.journal.JournalPersistenceAdapter] INFO:  Journal 
>> Recovery Started.
>> [27/12/2005 14:50:24:703]  
>> [org.activemq.store.journal.JournalPersistenceAdapter] INFO:  Journal 
>> Recovered: 0 message(s) in transactions recovered.
>> [27/12/2005 14:50:25:109] [org.activemq.broker.TransportConnector]  
>> INFO: Accepting connection on: vm://broker1? 
>> marshal=false&broker.persistent=false
>> [27/12/2005 14:50:25:109] [org.activemq.broker.BrokerService] INFO:  
>> ActiveMQ JMS Message Broker (localhost) started
>>
>> I would like the broker do not try to create any table (thought  
>> persistence=false parameter would do that).
>> Other question: reading in the site I think its not necessary to  
>> directly run a broker with vm:// protocol, right ? (In my case is  
>> only connecions inside the same JVM)
>>
>> Thanks in advance,
>>
>> -- 
>> MARCELO Ribeiro
>>
>>
>
>
>

-- 
MARCELO Ribeiro



Mime
View raw message