org.springmodules.orm.orbroker
Class BrokerFactoryBean

java.lang.Object
  extended by org.springmodules.orm.orbroker.BrokerFactoryBean

public class BrokerFactoryBean
extends java.lang.Object

FactoryBean that creates a local O/R Broker's Broker instance. Behaves like a Broker instance when used as bean reference, e.g. for BrokerTemplate's "broker" property.

The typical usage will be to register this as singleton factory (for a certain underlying JDBC DataSource) in an application context, and give bean references to application services that need it.

Since:
2005.06.02
Author:
Omar Irbouh
See Also:
BrokerAccessor.setBroker(Broker)

Constructor Summary
BrokerFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
 java.lang.Object getObject()
           
 java.lang.Class getObjectType()
           
 boolean isSingleton()
           
 void setConfigLocation(Resource configLocation)
          Set the location of the O/R Broker config file.
 void setDataSource(javax.sql.DataSource dataSource)
          Set the DataSource to be used by O/R Broker.
 void setTextReplacements(java.util.Properties textReplacements)
          Set text replacement values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BrokerFactoryBean

public BrokerFactoryBean()
Method Detail

setDataSource

public void setDataSource(javax.sql.DataSource dataSource)
Set the DataSource to be used by O/R Broker. A typical value is "WEB-INF/broker.xml".


setConfigLocation

public void setConfigLocation(Resource configLocation)
Set the location of the O/R Broker config file.


setTextReplacements

public void setTextReplacements(java.util.Properties textReplacements)
Set text replacement values. This will replace all {{key}} type properties in an sql-statement with the values.


afterPropertiesSet

public void afterPropertiesSet()
                        throws java.io.IOException
Throws:
java.io.IOException

getObject

public java.lang.Object getObject()
                           throws java.lang.Exception
Throws:
java.lang.Exception

getObjectType

public java.lang.Class getObjectType()

isSingleton

public boolean isSingleton()


Copyright © 2005. All Rights Reserved.