Hi,
You can plug-in your store manager by the following:
1. Extend AbstractBrokerFactory by overwriting the method
protected abstract StoreManager newStoreManager();
Let us call this extended BrokerFactory com.gigaspaces.BrokerFactory
2. Let this method return an instance of your specialized StoreManager
For example, here is the implementation of JDBCBrokerFactory:
protected StoreManager newStoreManager() {
return new JDBCStoreManager();
}
3. Then at runtime specify
<property name="openjpa.BrokerFactory"
value="com.gigaspaces.BrokerFactory"/>
jcarreira wrote:
>
> I'm trying to implement a StoreManager that stores into and retrieves
> from GigaSpaces. What I need, though, is to be able to dependency-
> inject the StoreManager instance with its dependencies (for example
> the GigaSpace instance). As far as I can tell, OpenJPA uses the
> constructor via reflection to create the instance of the configured
> class for the StoreManager. This gives me no opportunity to wire it
> up with the stuff it needs to do its work, unfortunately.
>
> Any suggestions?
>
> Thanks,
>
> Jason Carreira
>
>
--
View this message in context:
http://www.nabble.com/How-to-wire-up-a-StoreManager-tp15991272p15992444.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.