(pseudo-code, don't have the interface memorized)
template.execute(new HibernateCallback() {
public Object doInHibernate(Session ses) {
ses.getSessionFactory().evictCollection(myColl);
...
Type: Posts; User: calle; Keyword(s):
(pseudo-code, don't have the interface memorized)
template.execute(new HibernateCallback() {
public Object doInHibernate(Session ses) {
ses.getSessionFactory().evictCollection(myColl);
...
Have a look at this, it explains ways to have bidirectional indexed collections:
http://www.hibernate.org/193.html
H3 even supports them without workarounds, also explained on that page.
Thank you! For the record, I think this is a very useful interface. I will change it to public myself for the RC2 sources I have so I can use it right now. With 1.2final it would be officially...
But that doesn't work in a multithreaded environment, does it? The scenario is this: We use JDO for most data access, and our JDO implementation also manages the connections for us. At a few spots in...
How can I prevent JDBCTemplate closing the connection it gets from my DataSource, now that I can't use SmartDataSource any longer? What's the path away from SmartDataSource?
Please help, this is...
Why was SmartDataSource moved from public to package? I was using that interface in a project to provide a custom DataSource to JDBCTemplate where the connection must not be closed by Spring. What is...
Exactly. Thanks for your help, I'll do it with a separate context file. That seems to work nicely.
Carl-Eric
Thanks for the quick answer :-)
Maybe I'm being a bit dense now, but can I just call "addBeanPostProcessor" after instantiating my ApplicationContext? It says in the Javadoc "To be invoked during...
Hi,
is it possible to replace a bean in the BeanFactory at runtime? I want to run a test using my default applicationContext.xml but only replace one particular bean with a test implementation...
The default request encoding according to the Servlet specification is ISO-8859-1. If the client doesn't send any charset information (and none of the major browsers do) then this is used, unless you...
Hi,
I'm having a problem with the limited filtering capabilities of Servlet 2.3. I'm using SiteMesh together with Struts as the web frontend for my Spring application. On Tomcat 4 the SiteMesh...
It was the duplicate context in struts-config.xml. I removed it and now it works as expected. Yay!
I will fix both the transaction and the data source configuration later, I'm still rather early...
I temporarily disabled SiteMesh completely for other reasons today. It did not change the OpenSessionInViewFilter behavior. I am currently out of ideas, but I'll post my config files - maybe you can...
It seems to me you haven't defined your datasource anywhere, so I'm not even sure where your JDBC connections are coming from right now.
Wouldn't it be better to simply define a pooling DataSource...
More debugging: It seems that the OpenSessionInViewFilter is getting a different SessionFactory instance than the one that is assigned to the HibernateDaoSupport instances which form my DAO layer....
I tried stepping through a whole request in Tomcat 4 with Eclipse 3 now, and I found out the following:
In OpenSessionInViewFilter initDeferredClose() is called and the deferred close holder set...
I tried that, but the result is the same. The log changes only slightly:
DEBUG - OpenSessionInViewFilter.lookupSessionFactory(206) | Using session factory 'sessionFactory' for...
Hi,
I have a problem that is driving me nuts. I have configured the OpenSessionInViewFilter like this in my web.xml:
<filter>
<filter-name>sitemesh</filter-name>
...