Hi,

I have 2 applications that use the same database, one is the
application for the Administrator, where all the configuration is
done.
The second application is where the users take examens that the
Administrator assigned. The 2 application are in separated wars.
The problem is that if the Administrator in his application assign a
Exam to a user, the change in the second application for normal user
is not registered. After every commit I flush the session in the
Administrator application.

The way I create and handle the session in both application is in the
following way.

Code:
  public class HibernateUtil {
    private static SessionFactory sessionFactory;

    static {
        try {
            sessionFactory = new AnnotationConfiguration().configure
().buildSessionFactory();
        } catch (Throwable ex) {
            System.err.println("Initial SessionFactory creation
failed." + ex);
            throw new ExceptionInInitializerError(ex);
        }
    }

    public static Session getSession() throws HibernateException {
        return sessionFactory.openSession();
    }
}


Thanks in advanced

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to