Re: MVC Dilemma

2006-04-08 Thread Dakota Jack
Actually, many good databases are not a collection of tables. That is what is new about SQL and its relation to the first order predicate calculus. The new thing about SQL was that there were multiple files and the normalization rules established via the rules of the first order predicate

Re: MVC Dilemma

2006-04-08 Thread Dakota Jack
You have not clearly identified what your problem is. I am not going to make a course of study on your posts to see what you are facing. Your obligation is to clearly set out IN ONE POST what your situation is and what you need. On 4/7/06, olonga henry [EMAIL PROTECTED] wrote: Rick, I am not

Re: MVC Dilemma

2006-04-08 Thread Dakota Jack
Are you talking about different databases on different machines? Is that where the distributed transactions question comes up? And, would the databases be different if they were both MySql? I assume so, but I cannot tell from the way you talk. On 4/7/06, olonga henry [EMAIL PROTECTED] wrote:

Re: MVC Dilemma

2006-04-08 Thread Larry Meadors
On 4/8/06, Dakota Jack [EMAIL PROTECTED] wrote: hard to tell what you are doing. So, despite the fact that I don't have a lot of good feelings about Larry, I support his attitude in this case. Why don't you forget the smart talk about applications and just tell us in English what you need to

Re: MVC Dilemma

2006-04-08 Thread Dakota Jack
I might do that, but I really don't have that many frustrations. My life is pretty much living the dream. On 4/8/06, Larry Meadors [EMAIL PROTECTED] wrote: On 4/8/06, Dakota Jack [EMAIL PROTECTED] wrote: hard to tell what you are doing. So, despite the fact that I don't have a lot of

Re: MVC Dilemma

2006-04-08 Thread netsql
So... how do you do it again? /server irc.darkmyst.org ? or ... (I tried in X-Chat) tia, .V Larry Meadors wrote: Join us on irc.darkmyst.org @ #funkycodemonkey, Dakota. Vent your frustrations there. It's fun. ;-) - To

Re: MVC Dilemma

2006-04-08 Thread Larry Meadors
Yeah, then /join #funkycodemonkey and you are on monkey island. Larry On 4/8/06, netsql [EMAIL PROTECTED] wrote: So... how do you do it again? /server irc.darkmyst.org ? or ... (I tried in X-Chat) tia, .V Larry Meadors wrote: Join us on irc.darkmyst.org @ #funkycodemonkey, Dakota.

Re: MVC Dilemma

2006-04-07 Thread Leon Rosenberg
I think spring will handle the transactions for you, if you want to do it yourself, you'll do it in the dao objects, or in case of a 2-phase-commit, start and commit the transaction in the business manager and extend your dao object to support 2-phase commits accordingly. However, a good

Re: MVC Dilemma

2006-04-07 Thread olonga henry
That's what I am talking about this is a situation which needs JTA transaction manager otherwise how would spring handle distributed transactions. I don't even know what do you mean by good application (at least a good co-oriented application) shouldn't use joins or distributed transactions, I

Re: MVC Dilemma

2006-04-07 Thread Leon Rosenberg
On 4/7/06, olonga henry [EMAIL PROTECTED] wrote: That's what I am talking about this is a situation which needs JTA transaction manager otherwise how would spring handle distributed transactions. I think (assume) spring has a built-in support for this (declarative transaction an all). I

Re: MVC Dilemma

2006-04-07 Thread olonga henry
Thanks leon, what you are saying applies well to your sitation, but my situation is different. I have to do this first: ListTicket tickets = TicketManager.getTickets( ticketStatus ); now each ticket record has an employeeId associated with it. Then I will have to go back to 'Employee' for each

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 saying applies well to your sitation,

Re: MVC Dilemma

2006-04-07 Thread Rick Reumann
olonga henry wrote the following on 4/7/2006 10:21 AM: 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. I've been following this thread, and it's amazing how

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] wrote: olonga

Re: MVC Dilemma

2006-04-07 Thread Rick Reumann
Rick Reumann wrote the following on 4/7/2006 10:50 AM: I've been following this thread, ... although I wasn't following the thread that closely and missed about the different databases. I'll just shut up and let smarter people answer. (I will almost bet though that hibernate isn't helping

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

Re: MVC Dilemma

2006-04-07 Thread Larry Meadors
All you want is a list of tickets by employeeId with the employee name? You confused us all with the database term, I guess - if I am reading your question correctly, you mean two tables, not two databases (a database is a collection of tables). Keep it simple - use iBATIS (or jdbc) and put the

Re: MVC Dilemma

2006-04-07 Thread olonga henry
No, I am using Hibernate 3 and there are a lot of advantages you get from using a complete ORM solution like this compared to Ibatis. No, I am forced to use two databases Ticket (MySql) and Employee(AS/400, legacy info). I have no choice here. On 4/7/06, Larry Meadors [EMAIL PROTECTED] wrote:

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 a complete ORM solution

Re: MVC Dilemma

2006-04-07 Thread Larry Meadors
Bummer, sucks to be you. Enjoy. :-) Larry 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 a complete ORM solution like this compared to Ibatis. No, I am forced to use two databases Ticket (MySql) and

Re: MVC Dilemma

2006-04-07 Thread Rick Reumann
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. You don't have to be an a**ss when someone is just trying to get clarification. Good luck getting

Re: MVC Dilemma

2006-04-07 Thread olonga henry
Rick, I am not trying to be an a**ss, but what he talked about is the most basic stuff to any programmer. That's what I was pointing towards. Even you admitted later that you were replying without getting complete hold of the subject matter. ... although I wasn't following the thread that closely

Re: MVC Dilemma

2006-04-07 Thread Emmanouil Batsis
Larry Meadors wrote: select id='getTicketsByEmployeeId' resultclass=java.util.HashMap Now that is what i miss in Hibernate. Using projection queries, there should be a way to get Map objects out of the box but unfortunatelly i have to create them from Object Arrays manually or create my

Re: MVC Dilemma

2006-04-07 Thread Rafael Nami
This is a very specific situation - you have 2 heterogeneous databases, that can't be joined, right? I'm talking by my own little experience with this type of thing, it's best to you work with a search engine in a heterogeneous environment like yours. Something like Lucene is good (both Hibernate

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:

Re: MVC Dilemma

2006-04-07 Thread Ted Husted
On 4/7/06, olonga henry [EMAIL PROTECTED] wrote: 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

Re: MVC Dilemma

2006-04-07 Thread Tamas Szabo
On 4/8/06, olonga henry [EMAIL PROTECTED] wrote: 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. I

Re: MVC Dilemma

2006-04-07 Thread Ted Husted
On 4/7/06, olonga henry [EMAIL PROTECTED] wrote: 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. The

Re: MVC Dilemma

2006-04-07 Thread Leon Rosenberg
I still don't get what should be wrong with the 2 DAO, 1 BusinessManager (or two depending on where do you want to federate, in business or presentation layer) and a struts action to trigger it. I thought your question was about how to do it best MVC-conform way, you've got Joe's and mine answer.

Re: MVC Dilemma

2006-04-07 Thread olonga henry
Leon, I am using Hibernate with 2 different databases (mysql and as400): I don't think HibernateTransactionManager can handle distributed transactions. Even though this discussion should not be on the struts list, but here it is: bean id=myDataSource1

Re: MVC Dilemma

2006-04-07 Thread netsql
#1. Most DB's let you connect to another DB, even to another vendor to do a join. That be the simplest. #2. What ever you are doing you need to do in the DAO layer only ( and I do not see how transcations are helping you on a select). So I suggest you document a unit test of what you want the

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 Joe Germuska
JSTL SQL calls don't conform to MVC principles in any way at all. I'd suggest creating a business manager service in Spring which has access to the two DAOs and having a Struts action call a single method on that business manager. This one sounds like read only, but if you have write

Re: MVC Dilemma

2006-04-06 Thread Leon Rosenberg
to complete to Joes very good suggestion: the business manager returns service an object/list of objects which are in no way associated with objects used in dao. The typical name for this kind of object would be a TicketDTO. The struts action maps each TicketDTO into a TicketBean, which is the

Re: MVC Dilemma

2006-04-06 Thread olonga henry
But what about Transaction demarcation, where does JTA come into play? On 4/6/06, Leon Rosenberg [EMAIL PROTECTED] wrote: to complete to Joes very good suggestion: the business manager returns service an object/list of objects which are in no way associated with objects used in dao. The