Monday, June 26, 2006

Berkeley DB: Part Three

Message Handler

package db.GettingStarted;
import com.sleepycat.db.Environment;
import com.sleepycat.db.MessageHandler;

public class MyMessageHandler implements MessageHandler
// Our constructor does nothing
public MyMessageHandler() {}
public void message(Environment dbenv, String message)
// Put your special message handling code here

Set the databaseconfig to use this messagehandler
package db.GettingStarted;
import com.sleepycat.db.DatabaseConfig;
DatabaseConfig myDbConfig = new DatabaseConfig();
MyMessageHandler mmh = new MyMessageHandler();

No comments: