activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eugene Prokopiev <prokop...@stc.donpac.ru>
Subject Re: XBeans -> Spring configuration translation
Date Wed, 12 Jul 2006 10:10:12 GMT
> If you grep the code for the element names you should see the POJOs
> which map to <journaledJDBC> etc. Then just use the Java code to
> configure in Spring.

$ grep -r journaledJDBC . | grep java
./activemq-core/src/main/java/org/apache/activemq/store/PersistenceAdapterFactoryBean.java:

* @org.apache.xbean.XBean element="journaledJDBC"

$ cat 
./activemq-core/src/main/java/org/apache/activemq/store/PersistenceAdapterFactoryBean.java


...
package org.apache.activemq.store;

import org.springframework.beans.factory.FactoryBean;

/**
  * Creates a default persistence model using the Journal and JDBC
  *
  * @org.apache.xbean.XBean element="journaledJDBC"
  *
  * @version $Revision: 1.1 $
  */
public class PersistenceAdapterFactoryBean extends 
DefaultPersistenceAdapterFactory implements FactoryBean {

     private PersistenceAdapter persistenceAdaptor;

     public Object getObject() throws Exception {
         if (persistenceAdaptor == null) {
             persistenceAdaptor = createPersistenceAdapter();
         }
         return persistenceAdaptor;
     }

     public Class getObjectType() {
         return PersistenceAdapter.class;
     }

     public boolean isSingleton() {
         return false;
     }

}

So, it's not visible how can I define journalLogFiles, dataDirectory and 
dataSource elements :(

> The dataSource="#postgres-ds" maps to a bean <property
> name="dataSource" ref="postgres-ds"/>

This is more simple than first case ...

-- 
Thanks,
Eugene Prokopiev


Mime
View raw message