I wish to implement business logic during data source operations. My data sources are configured with serverType="hibernate". In the data source XML configurations, I know I can specify a class name for the "serverConstructor" attribute, and within the class I can implement the various methods (executeAdd, executeFetch, executeRemove, etc). Within those methods, I can manipulate the data values passed as Maps via the DSRequest.
But what I'd prefer to do is invoke bean methods on the underlying Hibernate-mapped classes, and also obtain a Hibernate session for conducting any further queries necessary to support the custom business logic. So, basically, I want to intercept the operation, run some business logic that operates upon Hibernate-mapped classes, and then let Hibernate complete its persistence operation.
What is the "best practices" way of doing this within the SmartGWT framework? I am running SmartClient Version: v8.3p_2013-08-06/Pro Deployment (built 2013-08-06)
I've looked into using Hibernate interceptors but I am unsure how to configure them to work with SmartGWT, since I am relying on SmartGWT to detect the hibernate.cfg.xml configuration in the classpath to initialize the session factory.
Thanks for any suggestions,
Dave
But what I'd prefer to do is invoke bean methods on the underlying Hibernate-mapped classes, and also obtain a Hibernate session for conducting any further queries necessary to support the custom business logic. So, basically, I want to intercept the operation, run some business logic that operates upon Hibernate-mapped classes, and then let Hibernate complete its persistence operation.
What is the "best practices" way of doing this within the SmartGWT framework? I am running SmartClient Version: v8.3p_2013-08-06/Pro Deployment (built 2013-08-06)
I've looked into using Hibernate interceptors but I am unsure how to configure them to work with SmartGWT, since I am relying on SmartGWT to detect the hibernate.cfg.xml configuration in the classpath to initialize the session factory.
Thanks for any suggestions,
Dave
Comment