MVC Dilemma

2006-04-06 Thread olonga henry
Using Struts-Spring-Hibernate: I have a situation where I have to fetch a list of records from a table 'Ticket' (in database 1) in which a column is a employeeId so my action class calls the service layer which in turns calls the DAO layer to get the "Certain Tickets List". Now, there is another

Re: MVC Dilemma

2006-04-06 Thread olonga henry
AOs and having a Struts action call a single > > method on that business manager. This one sounds like read only, > > but if you have write operations, this allows you to use Spring's > > declarative transaction handling to integrate both databases into a > > single transa

Re: MVC Dilemma

2006-04-07 Thread olonga henry
-commit, start and commit the transaction in the "business > manager" and extend your dao object to support 2-phase commits > accordingly. > > However, a good application (at least a good co-oriented application) > shouldn't use joins or distributed transactions. > >

Re: MVC Dilemma

2006-04-07 Thread olonga henry
my case because Spring needs this TransactionManager so that it can handle multiple data resources: read this: http://openframework.or.kr/JSPWiki/Wiki.jsp?page=Data+Access+using+O/R+Mappers On 4/7/06, Leon Rosenberg <[EMAIL PROTECTED]> wrote: > > On 4/7/06, olonga henry <[EMAIL

Re: MVC Dilemma

2006-04-07 Thread olonga henry
After getting the ticket list, I will have to read the employeeIds first in memory then make those calls and put 'em in a hashmap so that I can disply 'em properly in the hashmap. On 4/7/06, olonga henry <[EMAIL PROTECTED]> wrote: > > Thanks leon, what you are sayin

Re: MVC Dilemma

2006-04-07 Thread olonga henry
Neither. List of open tickets that can belong to any employee. It's just happens that I want to display the name of the employee instead of their Ids. I have been telling this in every email. But you people don't seem to get this. On 4/7/06, Rick Reumann <[EMAIL PROTECTED]> w

Re: MVC Dilemma

2006-04-07 Thread olonga henry
That's Right, there are multiple issues here that involves JTATransactionManager which I can deal with. However what I am asking here is more of a design pattern type (between dao layer and business logic/service layer) of question on how do you handle such a scenario where after gettting list of

Re: MVC Dilemma

2006-04-07 Thread olonga henry
t simple - use iBATIS (or jdbc) and put the results into a map: > > > select t.*, employee.name > from ticket t > join employee e on t.employeeId = e.employeeid > where e.employeeid = #value# > > > Done. One (indexed and very fast) hit on the database and you are done.

Re: MVC Dilemma

2006-04-07 Thread olonga henry
Larry, person who talks about Spring, Hibernate and struts and know about JTA certainly knows that a database is a collection of tables. On 4/7/06, olonga henry <[EMAIL PROTECTED]> wrote: > > No, I am using Hibernate 3 and there are a lot of advantages you get from > using

Re: MVC Dilemma

2006-04-07 Thread olonga henry
n 4/7/06, Rick Reumann <[EMAIL PROTECTED]> wrote: > > olonga henry wrote the following on 4/7/2006 11:33 AM: > > Larry, person who talks about Spring, Hibernate and struts and know > about > > JTA certainly knows that a database is a collection of tables. > > Y

Re: MVC Dilemma

2006-04-07 Thread olonga henry
Tamas, I know JSTL exists, but I know that's not a good thing to do, that's why I was looking for the options if anybody knew. Again, read my first email closely ...I was looking for better alternatives which confirm to MVC principles. On 4/7/06, Tamas Szabo <[EMAIL PROTECTED]> wrote: > > > Furth

Re: MVC Dilemma

2006-04-07 Thread olonga henry
on > > P.S. > > Personally I would put it down to two calls: > List tickets = manager1.getTickets(); > List employeeIds = extractUniqueEmployeeIds(tickets) > List employeeNames = manager2.getSomeEmployeeNames(employeeIds). > > > > On 4/7/06, olonga henry <[EMAIL PR