Skip to content

Commit

Permalink
update the post
Browse files Browse the repository at this point in the history
  • Loading branch information
Sung-Soo Kim committed Jan 24, 2014
1 parent 866f095 commit e47b9c8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion _posts/2014-01-22-relational-database-adapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ This article discusses the EsperIO adapter for relational databases. Adapter Ov
```xml<esper-configuration> <plugin-loader name="EsperIODBAdapter" class-name="com.espertech.esperio.db.EsperIODBAdapterPlugin"> <init-arg name="esperio.db.configuration.file" value="file:/path/esperio-db-sample-config.xml" /> </plugin-loader></esper-configuration>
```### Configuration and Starting via APIIf using Spring or if your application requires API access, the following code snippet configures and starts the adapter via API. The class for configuring an EsperIO DB adapter is <tt class="literal">com.espertech.esperio.db.config.ConfigurationDBAdapter</tt>.
The adapter class itself is <tt class="literal">EsperIODBAdapter</tt>. The code snippet below is a sample that configures using driver manager and starts the adapter via API:
```javaConfigurationDBAdapter adapterConfig = new ConfigurationDBAdapter();ConfigurationDBRef configDB = new ConfigurationDBRef();configDB.setDriverManagerConnection("DRIVER", "URL", new Properties());adapterConfig.getJdbcConnections().put("db1", configDB);// add additional configuration such as DML and Upsert// start adapterEsperIODBAdapter dbAdapter = new EsperIODBAdapter(adapterConfig, "engineURI");dbAdapter.start();

```java
ConfigurationDBAdapter adapterConfig = new ConfigurationDBAdapter();ConfigurationDBRef configDB = new ConfigurationDBRef();configDB.setDriverManagerConnection("DRIVER", "URL", new Properties());adapterConfig.getJdbcConnections().put("db1", configDB);// add additional configuration such as DML and Upsert// start adapterEsperIODBAdapter dbAdapter = new EsperIODBAdapter(adapterConfig, "engineURI");dbAdapter.start();
```
JDBC Connections---
The configuration for the *source* of JDBC connections follows the Esper configuration. Please consult the Esper documentation or *sample adapter configuration file* for details.
Expand Down

0 comments on commit e47b9c8

Please sign in to comment.