use of jp.ossc.nimbus.beans.PropertyAccess in project nimbus by nimbus-org.
the class HttpServletRequestTransferInterceptorService method createService.
/**
* サービスの生成処理を行う。
* <p>
*
* @exception Exception サービスの生成に失敗した場合
*/
public void createService() throws Exception {
propertyAccess = new PropertyAccess();
propertyAccess.setIgnoreNullProperty(true);
}
use of jp.ossc.nimbus.beans.PropertyAccess in project nimbus by nimbus-org.
the class TraceLoggingInterceptorService method startService.
public void startService() throws Exception {
if ((outputParameterProperties != null && outputParameterProperties.length != 0) || (outputReturnProperties != null && outputReturnProperties.length != 0) || (outputTargetProperties != null && outputTargetProperties.length != 0)) {
propertyAccess = new PropertyAccess();
propertyAccess.setIgnoreNullProperty(true);
}
if (sequenceServiceName != null) {
sequence = (Sequence) ServiceManagerFactory.getServiceObject(sequenceServiceName);
}
}
use of jp.ossc.nimbus.beans.PropertyAccess in project nimbus by nimbus-org.
the class MBeanWatcherService method createService.
public void createService() throws Exception {
contextMap = Collections.synchronizedMap(new HashMap());
propertyAccess = new PropertyAccess();
propertyAccess.setIgnoreNullProperty(true);
}
use of jp.ossc.nimbus.beans.PropertyAccess in project nimbus by nimbus-org.
the class DefaultPersistentManagerService method startService.
public void startService() throws Exception {
propertyAccess = new PropertyAccess();
propertyAccess.setIgnoreNullProperty(isIgnoreNullProperty);
}
use of jp.ossc.nimbus.beans.PropertyAccess in project nimbus by nimbus-org.
the class DatabaseSharedContextKeyDistributorService method startService.
public void startService() throws Exception {
if (connectionFactoryServiceName != null) {
connectionFactory = (ConnectionFactory) ServiceManagerFactory.getServiceObject(connectionFactoryServiceName);
}
if (connectionFactory == null) {
throw new IllegalArgumentException("ConnectionFactory is null.");
}
if (persistentManagerServiceName != null) {
persistentManager = (PersistentManager) ServiceManagerFactory.getServiceObject(persistentManagerServiceName);
}
if (persistentManager == null) {
throw new IllegalArgumentException("PersistentManager is null.");
}
Connection con = null;
try {
con = connectionFactory.getConnection();
List keyList = null;
if (databaseRecord == null) {
if (keyClass == null) {
keyList = new RecordList();
}
} else {
keyList = new RecordList(null, databaseRecord.getRecordSchema());
}
Object[] keys = null;
if (keyList == null) {
keys = (Object[]) persistentManager.loadQuery(con, keySelectQuery, null, Array.newInstance(keyClass, 0).getClass());
} else {
persistentManager.loadQuery(con, keySelectQuery, null, keyList);
keys = keyList.toArray();
}
if (keys == null || keys.length == 0) {
throw new IllegalArgumentException("Not found key record. keySelectQuery=" + keySelectQuery);
}
Map tmpKeyIndexMap = new HashMap();
if (keyList == null) {
for (int i = 0; i < keys.length; i++) {
tmpKeyIndexMap.put(keys[i], new Integer(i));
}
} else {
PropertyAccess propertyAccess = new PropertyAccess();
for (int i = 0; i < keys.length; i++) {
Object key = null;
if (keyClass == null) {
key = propertyAccess.get(keys[i], keyPropertyName);
} else {
key = keyClass.newInstance();
for (Iterator itr = keyPropertyMappings.entrySet().iterator(); itr.hasNext(); ) {
Map.Entry propMapping = (Map.Entry) itr.next();
propertyAccess.set(key, (String) propMapping.getValue(), propertyAccess.get(keys[i], (String) propMapping.getKey()));
}
}
tmpKeyIndexMap.put(key, new Integer(i));
}
}
keyIndexMap = tmpKeyIndexMap;
} finally {
if (con != null) {
try {
con.close();
} catch (SQLException e) {
}
}
}
}
Aggregations