Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 27/10/2008 11:23:06
|
navigo
Joined: 17/06/2008 11:27:55
Messages: 7
Offline
|
Hello All,
I am trying to write my own rule to use in validation to check values against a database. Is there a graceful way of accessing the C3P0 Pool I created in the ApplicationManager?
I know in my actions, I can refer to input.getValue("pd_conn"), but what is the best way in a rule to access the database? I know I could build a separate connection pool, but I anticipate a number of rules, and I would rather not have that many pools....
Any input is welcome.
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 29/10/2008 10:25:40
|
RubemAzenha
Joined: 30/06/2005 23:12:02
Messages: 472
Location: São Paulo, SP
Offline
|
navigo, in my opinion, those kind of validation are too much specific and should be made in the action's code.
|
Mentawai Developer |
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 29/10/2008 14:19:52
|
navigo
Joined: 17/06/2008 11:27:55
Messages: 7
Offline
|
RubemAzenha,
Thanks for the feedback. I think I have done that. What I have is using the validation to make sure the input is sane, then I use a "check" method to further check the input - i.e. I use checkEdit or checkAdd which checks the results from an Add or Edit.
Thanks again.
|
|
 |
|