Renato Fagalde [
http://community.jboss.org/people/renatofagalde] created the discussion
"Re: What does "Naming context is read-only" mean?"
To view the discussion, visit:
http://community.jboss.org/message/630790#630790
--------------------------------------------------------------
I'm having the same error, anyone got?
I'm using jboss AS 7
|
| private static final SessionFactory sessionFactory = buildSessionFactory(); |
|
|
|
|
|
|
|
|
|
|
| private static SessionFactory buildSessionFactory(){ |
|
|
|
|
|
|
| try{ |
|
|
|
|
|
|
|
|
| //Configuration cfg = new Configuration(); |
|
|
|
| AnnotationConfiguration | cfg | = | new AnnotationConfiguration(); |
|
|
|
| cfg.configure("hibernate.cfg.xml"); |
|
|
|
| //cfg.addAnnotatedClass(UsuarioWebBean.class); |
|
|
|
|
|
|
|
|
|
|
|
|
|
| return cfg.buildSessionFactory(); |
|
|
|
|
|
|
|
| }catch(Throwable e) { |
|
|
|
| System.out.println("impossivel criar o objeto sessionFactory"); |
|
|
|
|
|
|
|
|
| throw new ExceptionInInitializerError(e); |
|
|
|
|
|
|
|
| } |
|
|
|
|
|
| } |
|
| public static SessionFactory getSessionFactory(){ |
|
|
|
|
|
|
| return sessionFactory; |
|
|
|
|
|
| } |
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/630790#630790]
Start a new discussion in JNDI and Naming at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]