KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > ejb > InjectionSettingsFactory


1 //$Id: InjectionSettingsFactory.java,v 1.1 2005/07/15 00:07:03 epbernard Exp $
2
package org.hibernate.ejb;
3
4 import java.util.Map JavaDoc;
5 import java.util.Properties JavaDoc;
6
7 import org.hibernate.cfg.SettingsFactory;
8 import org.hibernate.connection.ConnectionProvider;
9 import org.hibernate.connection.ConnectionProviderFactory;
10
11 /**
12  * @author Emmanuel Bernard
13  */

14 public class InjectionSettingsFactory extends SettingsFactory {
15     private Map JavaDoc connectionProviderInjectionData;
16
17     /**
18      * Map<String,Object> where the key represents the javabean property in witch
19      * Object will be injected
20      *
21      * @param connectionProviderInjectionData
22      */

23     public void setConnectionProviderInjectionData(Map JavaDoc connectionProviderInjectionData) {
24         this.connectionProviderInjectionData = connectionProviderInjectionData;
25     }
26
27     protected ConnectionProvider createConnectionProvider(Properties JavaDoc properties) {
28         return ConnectionProviderFactory.newConnectionProvider( properties, connectionProviderInjectionData );
29     }
30 }
31
Popular Tags