My application uses struts plugin interface. When the app comes up it gets connected to DB2 and executes some query. We have downtime for these and everything gets restarted at the same time. If DB2 is not up at the right time then the app fails and it throws servlet exception, since it uses plugin class while it comes up and stores the respective data in the servlet context.
I need workaround solution for this. So I thought of checking the context for each request and if the attributes in the context are null I thought of calling the plugin class again. Is this a good idea? If so how will I call the struts plugin class from my struts action class.
Thanks in advance
Joined: Feb 15, 2005
I'd suggest you refactor. Put the code that does the initialization into a method in a separate utility class. Then call that method from both your plugin and your Action class.