RE: Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-17 Thread Martin Gainty
ffet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Sun, 17 Oct 2010 12:46:22 + > Subject: Re: Struts, Spring, Hibernate and multiple Sessionfactories &g

Re: Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-17 Thread Raymond He
1) In this multi-tenant app, it is OK. Every operation just need to access one tenant datasource in the thread .2) Thread local is not appropriate in distributed architecture. sometimes we should access 2 or more datasourses at the same time in ONE thread. 2010/10/16, Dave Newton

Re: Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-17 Thread Eduard Neuwirt
> 2010/10/15, Eduard Neuwirt : >> Hello, >> >> I am looking for an elegant solution for the following situation. >> >> I have a multitenant struts/spring/hibernate application. Every tenant is >> stored in own database within the same RDBMS. All databases

Re: Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-16 Thread Dave Newton
2010/10/16 Raymond He : > To Li Ying and Dave New ton, multiple datasources is a common > requirement in large scale e-commerce  and telecom application. I know; that's what I said. Dave - To unsubscribe, e-mail: user-unsubscr..

Re: Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-16 Thread Raymond He
routing operation should not be done by Struts, but by persistent layer. 2010/10/15, Eduard Neuwirt : > Hello, > > I am looking for an elegant solution for the following situation. > > I have a multitenant struts/spring/hibernate application. Every tenant is > stored in own databa

Re: Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-15 Thread Brian Thompson
On Fri, Oct 15, 2010 at 11:43 AM, Dave Newton wrote: > On Fri, Oct 15, 2010 at 12:39 PM, Brian Thompson > wrote: >>> Ever had a client that wanted/required their data segregated from >>> everybody else's (this is not uncommon at all)? Ever wanted to >> Apparently, it is uncommon.  I've never enc

Re: Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-15 Thread Dave Newton
On Fri, Oct 15, 2010 at 12:39 PM, Brian Thompson wrote: >> Ever had a client that wanted/required their data segregated from >> everybody else's (this is not uncommon at all)? Ever wanted to > Apparently, it is uncommon.  I've never encountered such a demand. That... makes it uncommon?! >> restr

Re: Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-15 Thread Brian Thompson
On Fri, Oct 15, 2010 at 10:22 AM, Dave Newton wrote: >> I'm not sure what reasons there would be to have it make sense >> to store each entity in its own identically-structured DB. > > Ever had a client that wanted/required their data segregated from > everybody else's (this is not uncommon at all

Re: Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-15 Thread Dave Newton
> I'm not sure what reasons there would be to have it make sense > to store each entity in its own identically-structured DB. Ever had a client that wanted/required their data segregated from everybody else's (this is not uncommon at all)? Ever wanted to restrict tool access to data without jumpin

Re: Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-15 Thread Brian Thompson
On Fri, Oct 15, 2010 at 9:45 AM, Dave Newton wrote: > That's really difficult to read. Agreed. More whitespace would be nice, Martin. > > On Fri, Oct 15, 2010 at 10:38 AM, Martin Gainty wrote: >> a database schema represents the entire structure (tables and relationships >> of >> those table

Re: Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-15 Thread Dave Newton
That's really difficult to read. On Fri, Oct 15, 2010 at 10:38 AM, Martin Gainty wrote: > a database schema represents the entire structure (tables and relationships of > those tables) of the there is no need for multiple databases when your > database > schema contains the persisted entities (ta

Re: Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-15 Thread Frans Thamura
Every extend mapp to different injection to what lli ying said /m/ -Original Message- From: Eduard Neuwirt Date: Fri, 15 Oct 2010 16:37:56 To: Struts Users Mailing List; Subject: Re: Struts, Spring, Hibernate and multiple Sessionfactories Hi Frans, would you mind to explain it

Re: Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-15 Thread Li Ying
I think i don't understand what you want exactly. Can you tell me what you want to achieve? And what your code looks like? 2010/10/15 Eduard Neuwirt : > Hi Li, > > thanks for the answer. I didn't get how does it work within the > ? In this case ist the the question is how to access > to the app

RE: Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-15 Thread Martin Gainty
> Date: Fri, 15 Oct 2010 14:50:17 +0200 > Subject: Struts, Spring, Hibernate and multiple Sessionfactories > From: eduard.neuw...@googlemail.com > To: user@struts.apache.org > > Hello, > > I am looking for an elegant solution for the following situation. > &g

Re: Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-15 Thread Eduard Neuwirt
- > From: Eduard Neuwirt > Date: Fri, 15 Oct 2010 16:16:35 > To: Struts Users Mailing List > Reply-To: "Struts Users Mailing List" > Subject: Re: Struts, Spring, Hibernate and multiple Sessionfactories > > Hi Li, > > thanks for the answer. I didn't get

Re: Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-15 Thread Frans Thamura
How about make different implementation So Tenant1 extends tenanta Tenant2 extends tenantb /m/ -Original Message- From: Eduard Neuwirt Date: Fri, 15 Oct 2010 16:16:35 To: Struts Users Mailing List Reply-To: "Struts Users Mailing List" Subject: Re: Struts, Spring, Hib

Re: Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-15 Thread Eduard Neuwirt
Hi Li, thanks for the answer. I didn't get how does it work within the struts-spring plugins ? In this case ist the the question is how to access to the application context directly from struts session. I could not find any information in the docu. Regards Eduard 2010/10/15 Li Ying > If you

Re: Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-15 Thread Li Ying
If you want to use multi-DB for multi-tenant (let's say tenant01 and tenant02) I think you can create config file should likes: and then, in your java code, you can get different bean instance for different tenant via [ID], code looks like: BeanFactory.getBean("sessionFactory_" + te

Re: Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-15 Thread Marshall Gunter
create new DB and configure it in your executive > environment. > > And, when you change your DB design, > you don't have to do this in all the DBs. > > > > > 2010/10/15 Eduard Neuwirt : > >> Hello, >> >> I am looking for an elegant solution for th

Re: Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-15 Thread Li Ying
lution for the following situation. > > I have a multitenant struts/spring/hibernate application. Every tenant is > stored in own database within the same RDBMS. All databases has the same > schema. At the spring layer every tenant is represented as a datasource. > Because I use

Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-15 Thread Eduard Neuwirt
Hello, I am looking for an elegant solution for the following situation. I have a multitenant struts/spring/hibernate application. Every tenant is stored in own database within the same RDBMS. All databases has the same schema. At the spring layer every tenant is represented as a datasource

Re: [OT] Struts - Spring - hibernate and lazy initialization

2008-04-02 Thread Yayo
Oki, thanks, I've posted to Spring mailing list with my problem ^g^ On Wed, Apr 2, 2008 at 11:14 PM, Laurie Harper <[EMAIL PROTECTED]> wrote: > This isn't really a Struts issue, since you're asking how to drive your > service/dao layout from a thread outside the context of a Struts-served > reque

Re: [OT] Struts - Spring - hibernate and lazy initialization

2008-04-02 Thread Laurie Harper
This isn't really a Struts issue, since you're asking how to drive your service/dao layout from a thread outside the context of a Struts-served request. What you need to do in that case is to manage the Hibernate session from your worker thread. The thread needs to setup and open the Hibernate

Re: Struts - Spring - hibernate and lazy initialization

2008-04-02 Thread Yayo
Sorry, more explanation is needed... I've got to launch a "batch process" it's not a batch but it's a long lasting process that could raise a timeout and tomcat will kill the worker thread... So I've launched a worker of my own to do the job and inform the user with a progress indicator or the like

Re: Struts - Spring - hibernate and lazy initialization

2008-04-02 Thread Adam Hardy
Yayo on 02/04/08 20:23, wrote: I'm developing a struts - spring based application. I've got actions-delegates-managers and daos and I use the open session in view filter from hibernate. In some cases I've got to return lazy results to the user so I've got to launch a new worker thread and taht

Re: Struts - Spring - hibernate and lazy initialization

2008-04-02 Thread Gabriel Belingueres
Try to post a stack trace or something more meaningful, but first of all, as a general architectural guideline, try first to refactor your code to avoid circular dependencies. 2008/4/2, Yayo <[EMAIL PROTECTED]>: > Hi, > > I'm developing a struts - spring based application. > > I've got actions-de

Struts - Spring - hibernate and lazy initialization

2008-04-02 Thread Yayo
Hi, I'm developing a struts - spring based application. I've got actions-delegates-managers and daos and I use the open session in view filter from hibernate. In some cases I've got to return lazy results to the user so I've got to launch a new worker thread and taht new one doesn't have an hib

Re: Struts + Spring + Hibernate

2005-11-02 Thread netsql
I use a diferent stack, this one: http://ibatis.apache.org/petstore.html not what you asked for but.. Martin Ravell wrote: Are there some developers here who use this solution? Does someone have a good tutorial or sample to indicate? (I've already seen "Wiring your web applications with Open So

RE: Struts + Spring + Hibernate

2005-11-02 Thread Martin Ravell
> Are there some developers here who use this solution? > Does someone have a good tutorial or sample to indicate? (I've already >seen "Wiring your web applications with Open Source java"..thanks :o)) > > Thanks for your feedback on this architecture :o) > Check out Matt Raible's Equinox projec

Re: Struts + Spring + Hibernate

2005-11-02 Thread James Mitchell
r 02, 2005 5:16 PM Subject: Re: Struts + Spring + Hibernate On 11/2/05, Gaet <[EMAIL PROTECTED]> wrote: Are there some developers here who use this solution? Does someone have a good tutorial or sample to indicate? (I've already seen "Wiring your web applications with Open So

Re: Struts + Spring + Hibernate

2005-11-02 Thread Gaet
, I'm afraid on the number of classes we have to develop to only retrieve one row in a table! Thanks for help - Original Message - From: Wendy Smoak To: Struts Users Mailing List Sent: Wednesday, November 02, 2005 5:16 PM Subject: Re: Struts + Spring + Hibernate On 11/

Re: Struts + Spring + Hibernate

2005-11-02 Thread Wendy Smoak
On 11/2/05, Gaet <[EMAIL PROTECTED]> wrote: > > > Are there some developers here who use this solution? > Does someone have a good tutorial or sample to indicate? (I've already > seen "Wiring your web applications with Open Source java"..thanks :o)) > For the Struts + Spring part, Ted recently pos

Struts + Spring + Hibernate

2005-11-02 Thread Gaet
Hi everybody, After reading for two days on the web, the association of "Struts + Spring + Hibernate" seems to be one of the best architecture to address web application. I've also read several samples but all these classes to develop looks like a gazeline :o) a