Hi,
How can I programmatically configure for jdbc persistence with apache derby.
Is this the right way to configure ?
Snippet:
**********************************************************************************************************
BrokerService broker = *new* BrokerService();
JDBCPersistenceAdapter jdbc= *new* JDBCPersistenceAdapter();
EmbeddedDataSource dataSource = *new* EmbeddedDataSource();
dataSource.setDatabaseName("derbyDb");
dataSource.setCreateDatabase("create");
jdbc.setDataDirectory("SampleData");
jdbc.setDataSource(dataSource);
broker.setUseJmx(*true*);
broker.setPersistent(*true*);
broker.setPersistenceAdapter(jdbc);
broker.addConnector("tcp://localhost:61616");
broker.start();
**********************************************************************************************************
The "derbyDb" database is created, as well as the default data directory of
activemq "activemq-data" is also getting created. But somehow "SampleData"
is not getting created.
Can I configure the persistence programmatically, or do I have to use the
config file.
--
Thanks & Regards,
- Navin