We have a application that uses the Open Session In View pattern and now want to add a second data source (Session Factory).
Are there any established patterns or examples on best practices to do...
Type: Posts; User: SN49750; Keyword(s):
We have a application that uses the Open Session In View pattern and now want to add a second data source (Session Factory).
Are there any established patterns or examples on best practices to do...
I did get this working using the following:
xml in our main spring conf file: There would be one of these for production, development, staging, etc.
<bean id="propertyConfigurer"...
Actually in reading the Java doc it looks like default properties can be set. That might work. Let me try it.
I saw that capability but was hoping there was something that could be done just in the spring configration files, I.E., not have to have a seperate property file.
Hi,
Is it possible to have some kind of token replace in the spring configuration files. As an example we start with a different configuration file for development and production with some basic...
Sorry for the delay in responding. (I was traveling overseas).
Our current corporate standard is still Spring 1.2.7. I will look into this now but thought I would pass this along incase there...
Thanks. I assume your talking about using Multiple HibernateTemplates to go to Multiple databases in reference to it already being covered. That is petty easy to do. However, we need the same...
We have a need to have Multiple Dynamic HibernateTemplates. By this I mean we want to be able to set which HibernateTemplate to use depending on some data. We would like to have a way to have the...
We have a need to have multiple Hibernate sessions open at the same time. Both Spring and Hibernate don't seem to facilitate this easily, especially with lazy loading. So as an example:
1) We...
Don't think you can register multiply event listeners via Spring. We solved our problem by extending the default listener, doing what we needed to do, and then call super().
I need to set an Event Listener in Hibernate. The Spring Documentation has a method setEventListeners(map) to do this but it seems to have some flaws. Since it takes a map as a parameter you can...
Hello,
We have a Interceptor that does performance logging. It simply logs a record before and after a method call. It works fine everwhere with one exception.
We call this in a method that...
Thanks. We like named parameters because of the self documenting nature of them.
Is there any reason that HibernateTemplate's bulkUpdate method doesn't have an implementation using named parameters? Looks like it would be very easy to implement.
Hello again,
I've been reading some of the Hibernate Doc and it looks like what we want to do is already documented in the Session Per Conversation pattern described in the Hibernate manual...
We will not be doing database transactions across web interactions. This is only so we don't have to reconnect to do lazy init and to do additional interactions with the objects.
I noticed in the Hibernate In Action book that long sessions are talked about with disconnectSession() and reconnect() that allows keeping Hibernate session in the HTTP session while releasing the...
I've look into this a bit and the OSIV pattern with reattachment seems to be the suggested solution. Some people have asked why you can't attach the session somehow to HTTP session and would not...
I wish to do lazy loading. The current application I am working with doesn't use the Application Context but uses the simple Bean Factory.
Is it possible to use OpenSessionInViewFilter without an...
We wish to allow Lazy loading across web accesses. I.E. keep a persistent object in the session, then allow lazy loading of it's collections. I have implemented the open session in view filter but,...
Aren't I supplying a class name with the "com.abc.domain.customer" String?
I have two hibernateTemplate load() methods.
Customer c = new Customer();
getHibernateTemplate().load(c, new Integer(8));
Customer c1 = (Customer)...
Thanks for the info, sounds like a prudent approach.
I recently wired the Hibernate Interceptor into my Application so I could take advantage of Lazy Loading. I now notice a new behavior where if I try and insert several records into a database and...
Thanks. At least I have some ammunition to go back to them with...