How to refresh sqlsessionfactory when xml mapper file change

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to refresh sqlsessionfactory when xml mapper file change

Ben Cheng
when sql xml mapper file is updated, is it possible to refresh the SqlSessionFactory?

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to refresh sqlsessionfactory when xml mapper file change

Guy Rouillier-2
You don't mention your runtime environment.  In general, the answer is
yes.  How you accomplish that depends on your environment.  For example,
if you are running a standalone program, then you'll have to implement
that refresh yourself.  If you are running in a servlet container, then
you can instruct the container to refresh.  Normally, though, the
container will just reload your servlet, so any existing clients will
get reset, i.e., connections lost.

--
Guy Rouillier

------ Original Message ------
From: "Ben Cheng" <[hidden email]>
To: "mybatis-user" <[hidden email]>
Sent: 4/10/2018 5:14:03 AM
Subject: How to refresh sqlsessionfactory when xml mapper file change

>when sql xml mapper file is updated, is it possible to refresh the
>SqlSessionFactory?
>
>--
>You received this message because you are subscribed to the Google
>Groups "mybatis-user" group.
>To unsubscribe from this group and stop receiving emails from it, send
>an email to [hidden email].
>For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.