I'm working with Struts 1.1 and I have a problem with the MessageRessource and I
don't know to handle it  the right way.
In my application I have two constraints,among others :) ,
- i must use an oci connection to the database
- the error messages will be stored in the database
For that I took two aproaches :
## One ##:  I have written a Struts plugin which builds the connection pool, and
I've extended MessageRessourceFactory and MessageRessources with my own classes
DBRessourceFactory and DBRessource to have my own mechanism for message
retrivial. My problem is now how can I get a connection to the database from the
connection pool I've just made ? Is there a way to communicate between my plugin
and my DBRessource class ?

## Two ##: I make a class which will handle the connection pool creation and the
retrivial of messages from the database.
It will look like this :
public class MessagesDBPool extends MessageRessources implements
PlugIn,Serializable {
    public MessageDBPool (){
    public MessageDBPool(MessageRessourcesFactory factory,String config){
    public MessageDBPool(MessageRessourcesFactory factory,String config,boolean
    public void init(ActionServlet servlet, ModuleConfig config) throws
        //pool initialisation here
    public void destroy(){
        //destroy pool here
Can I do this in the first place ?

Now the question is which one of this two solutions can work? Is there another
way to do this ?
Any suggestions are welcome .


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

Reply via email to