The service layer in Workbrain is very much just core Spring. You'll need your Java interface class defining the public methods which will be accessible to our web layer and via other services. And then you'll need your implementation of those interfaces.
Within your services, you may need to access legacy non-Spring based code and DB connections. To do this, use the following code block, within which you can pass the retrieved DBConnection object:
DBConnection conn = null;
try {
conn = (DBConnection)WbDataSourceUtil.getConnection();
...
}
finally {
WbDataSourceUtil.releaseConnection(conn);
}
Once you have completed your service layer code, you'll need to create a bean in the previously defined service-config.xml. Restart your JEE server and you are well on your way to your Spring module in Workbrain!
0 comments:
Post a Comment