Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package practiceJDO;
- import java.io.FileInputStream;
- import java.io.FileNotFoundException;
- import javax.jdo.JDOHelper;
- import javax.jdo.PersistenceManagerFactory;
- public class PMF {
- private static PersistenceManagerFactory factory ;
- protected PMF(){}
- public static PersistenceManagerFactory getInstance()
- {
- if(factory==null)
- try {
- factory=JDOHelper.getPersistenceManagerFactory(new FileInputStream("datanucleus.properties"));
- } catch (FileNotFoundException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- return factory ;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement