????????1??
????д?????sessionFactory1?????壬?????sessionFactory2?б??????


????????2??
????Session session1 = sessionFacory1.openSession();
????Transaction tx1 = session1.beginTransaction();
????Customer customer = (Customer)session1.get(Customer.class?? 1L));
????tx1.commit();
????session1.close();
????Session session2 = sessionFactory2.openSession();
????Transaction tx2 = session2.beginTransaction();
????//??Customer?????????????????洢???
????session2.replicate(customer?? ReplicationMode.LASTEST_VERSION);
????tx2.commit();
????session2.close();