Generic Data Source

2002-10-16 Thread Kevin Viet


GenericDataSource Question

I need to set the driver of a generic datasource
the only method to configure the driver is setDriverClass(String
driverCLass) 

I want a method like setDriver(java.sql.Driver driver)

The only way to handle this is to extend the GenericDataSource class 
and add this method ... but now I need to redefine the GenericDataSource
instantiation in order to instantiate my Implementation,
have an idea ?

(I imagine that this is done into the ActionServlet) ... 

-- 
Kevin Viet [EMAIL PROTECTED]
ActiVia Networks




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




DAO or ... ?

2002-10-14 Thread Kevin Viet

My question is a web app design question. 
What pattern you guys follow when you want to save a domain object in
the database ?: 

- use the DAO pattern of java blueprint  (persistence layer is called
into classes)
- call to persistence statements into action code :

// store example
try {
PeristenceLayer pl = getPerstitenceLayer();
pl.save(domainObject);
}
catch (Exception


-- 
Kevin Viet [EMAIL PROTECTED]
ActiVia Networks




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: DAO or ... ?

2002-10-14 Thread Kevin Viet

Le lun 14/10/2002 à 16:55, V. Cekvenich a écrit :
 Avoid persistence in Action code as much as you can.
 Yes.
 And a way to do that is to say in action something like:
 
 formBean.save()
 
 where the formBean has something like this in save() {getDAO().update()}
 
 and the DAo does the save for the bean.
 
But I'v read that the domain  objects needn't know that are persitent,
if you implement a save method that means that ur object know it can be
persisted

 .V
 
 Lacerda, Wellington (AFIS) wrote:
  Hi Kevin
  
  Avoid persistence in Action code as much as you can.
  
  This is the general recommendation.
  
  Wellington Silva
  Author of JSP and Tag Libraries for Web Development
  FAO of the UN - Consultant
  
  -Original Message-
  From: Kevin Viet [mailto:[EMAIL PROTECTED]]
  Sent: Monday, October 14, 2002 4:45 PM
  To: struts-user
  Subject: DAO or ... ?
  
  
  My question is a web app design question. 
  What pattern you guys follow when you want to save a domain object in
  the database ?: 
  
  - use the DAO pattern of java blueprint  (persistence layer is called
  into classes)
  - call to persistence statements into action code :
  
  // store example
  try {
  PeristenceLayer pl = getPerstitenceLayer();
  pl.save(domainObject);
  }
  catch (Exception
  
  
 
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Kevin Viet [EMAIL PROTECTED]
ActiVia Networks




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: DAO or ... ?

2002-10-14 Thread Kevin Viet

Le lun 14/10/2002 à 17:10, Wendy Smoak a écrit :
  PeristenceLayer pl = getPerstitenceLayer();
  pl.save(domainObject);
  But I'v read that the domain  objects needn't know that are persitent,
  if you implement a save method that means that ur object know it can be
  persisted
 
 In that example, the domainObject still doesn't have to know if/how it's
 being persisted.
 
 I've implemented the whole DAO pattern, excepting the last bit that makes it
 easy to switch databases since it's highly unlikely that will happen here.
 
 In 'EditContactAction' I have:
 
DAOFactory udFactory = DAOFactory.getDAOFactory(); 
ContactDAO contactDAO = udFactory.getContactDAO();
Contact contact = contactDAO.createContact();
 
 Later, in 'ProcessContactAction' there's:
 
contactDAO.updateContact( contact );
 
 So while the Actions know that persistence is happening, they have no idea
 how it occurs.
 

so domainObject doesn't know about the DAO existence, and DAO's
represent ur persistence layer that is called into the struts action.
so if I can implement a generic DAO (that workd for all domain objects)
i will have

GenericDAO gd = // obtain a reference

Contact contact = session.getAttribute(contact);
gd.update(contact);


 

 -- 
 Wendy Smoak
 http://sourceforge.net/projects/unidbtags
-- 
Kevin Viet [EMAIL PROTECTED]
ActiVia Networks




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Anybody knows or uses IntelliJIDEA?

2002-08-22 Thread Kevin Viet

I have tried it, it's really a great IDE, with a lot of
functionnalities, pretty cool to use , and I think it's the sexiest IDE 

Le jeu 22/08/2002 à 12:53, Sutiwan Kariya a écrit :
 
 Hi,
 Anybody knows or uses IntelliJ to develop Java family?
 How is it ? Any comment about it?
 I've tried to browse www.intellij.com but the website seems have the
 problem, I could not go to that web site!
 
 
 Sutiwan W.
 
 
 
 
 This E-mail and any files transmitted with it are confidential
 and intended for the sole use of the individual or entity
 to whom they are addressed. If you have received this 
 E-mail in error please notify the system manager.  This E-mail
 message has been swept for the presence of computer
 viruses.
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 





--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




O/R mapping tool

2002-08-13 Thread Kevin Viet

Hello all, just a question : 

I want to know if some of you have some information about O/R mapping
tools (like OJB, castor, ...), products comparison would be of great
value




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: O/R mapping tool

2002-08-13 Thread Kevin Viet

yes I want a copy of your excel file, It would be of great help, can you
send it to [EMAIL PROTECTED],  thanx in advance !!!

Le mar 13/08/2002 à 18:10, Dan Cancro a écrit :
 I have a set of notes from the mailing lists on O/R tools, frameworks, etc.
 in an Excel file.  Let me know if you'd like a copy.  The Cayenne developers
 made a nice comparison too (http://c2.com/cgi-bin/wiki?CayenneVsOther).
 
 Dan
 
  -Original Message-
  From: Kevin Viet [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, August 13, 2002 5:12 AM
  To: Struts Users Mailing List
  Subject: O/R mapping tool
  
  
  Hello all, just a question : 
  
  I want to know if some of you have some information about O/R mapping
  tools (like OJB, castor, ...), products comparison would be of great
  value
  
  
  
  
  --
  To unsubscribe, e-mail:   
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: 
  mailto:[EMAIL PROTECTED]
  
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 





--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Tiles

2002-07-23 Thread Kevin Viet

Le mar 23/07/2002 à 08:32, Adarsh a écrit :
 Hi all,
 Can any body guide me on what tiles is all about...where can it be used?and
 how can it be used with struts
 Adarsh Gupta
 Software Engineer
 Patni Computer Systems Limited
 SDF-7, 4th Floor, Unit 17, SEEPZ
 Tel : (022)-8290479/8291454  Extn : 5741
 Mobile : 9820224341
 www.patni.com
 World-Wide Partnerships.World-Class Solutions.
 
 

Sorry I am not responding to your question but I just use your thread to
ask an another question that could help you too:
What is the difference between struts-template and tiles ?




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]