This is also a good idea because it ensures that you won't try to access a session that has already been closed, which seemed to happen to me quite a bit using the hibernate methods in flow.

the following works very well:

// Global Data Access Objects
var appCtx = cocoon.context.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);
var service = appCtx.getBean("javaServiceClass");


function removals_summary_view()
{
var beans = service.getBeans();
cocoon.sendPage("internal/generate-view/bean_summary", {title : "Beans",beans:beans});
}



Leszek Gawron wrote:

I deeply recommend you not to use hibernate directly but put all your data access code and service layer into spring framework. Then you simply query spring context from servlet context, lookup appropriate service bean and perform some actions.



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to