See if ur web.XML has the spring configuration configured twice. We faced the
same issue before
Sent from my iPhone
On Jul 13, 2010, at 11:42 AM, hisameer wrote:
>
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.or
+ " ms");
> >> >>}
> >> >>
> >> >>}
> >> >>
> >> >> private void loadRequiredObject(){
> >> >> if (dao== null) {
> >> >>dao=
t;daoBean");
>> >>}
>> >> //here I will do some processing using the database access using
>> >> dao
>> >> service layer
>> >> }
>>
lication level spring container would be sufficient with
> >> init
> >> > method set.
> >> >
> >> > Sent from my iPhone
> >> >
> >> > On Jun 25, 2010, at 11:36 AM, hisameer
> >> > wrote:
> >> >
> >> >
wrote:
>> >
>> >>
>> >> Hi,
>> >>
>> >> I am using Struts2.1.6+Spring2.5.6+Hibernate+JPA in my web
>> application.
>> >> The
>> >> application server is JBOSS5. I have to implement a logic so that when
>>
on server is JBOSS5. I have to implement a logic so that when
> >> the
> >> server starts I can execute some database scripts using my DAO service
> >> layer. And this class is responsible loading some required var
g some required variables from
>> the database. The class should execute only one on the start up.
>>
>> Please give me some suggestions how to do this. If possible write some
>> sample code.
>>
>> Thanks,
>> Sameer
>> --
>> View
suggestions how to do this. If possible write some
> sample code.
>
> Thanks,
> Sameer
> --
> View this message in context:
> http://old.nabble.com/How-to-modify-Struts2-start-up-process.-tp28995322p28995322.html
> Sent fro
That should work great, another option is just to define a singleton bean in
your Spring configuration. It will get loaded with the container and
initialized automatically. Either method should do what you want.
(*Chris*)
On Fri, Jun 25, 2010 at 12:24 PM, Dale Newfield wrote:
> Oh, and I for
Oh, and I forgot to mention, add a segment to your web.xml
so the application server knows to instantiate and call it.
-Dale
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h.
On 6/25/10 2:36 PM, hisameer wrote:
I have to implement a logic so that when the server starts I can
execute some database scripts using my DAO service layer.
implement a ServletContextListener that includes the method
contextInitialized(ServletContextEvent event).
You should be able to get
from
the database. The class should execute only one on the start up.
Please give me some suggestions how to do this. If possible write some
sample code.
Thanks,
Sameer
--
View this message in context:
http://old.nabble.com/How-to-modify-Struts2-start-up-process.-tp28995322p28995322.html
Sent
12 matches
Mail list logo