We have an application with a plugin that contains a service:
public class TaskService {
public void doSomething( Task task ) {
task.save();
}
}
This works great.
For our "special" client with its special requirements, we have a second application that contains a plug-in from the first application and another plug-in with a special service for this client, which extends the original service and cancels some methods:
public class SpecialTaskService extends TaskService{
@Override
public void doSomething( Task task ) {
task.save();
}
}
In every place in the second application where taskService is entered, we want to have the SpecialTaskService function (also in the plugin from the first application). Thus, we added a special service to .groovy resources under grails-app / conf / spring:
beans = {
taskService( SpecialTaskService )
}
HibernateException, "task.save()" :
org.hibernate.HibernateException: Hibernate, , .
, SessionFactory SpecialService, sessionFactory.currentSession, .
.groovy, .
"hibernateSessionAware", save() merge() ?