[jboss-user] [JNDI and Naming] - Re: What does "Naming context is read-only" mean?

Renato Fagalde do-not-reply at jboss.com
Sun Oct 9 21:18:49 EDT 2011


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&containerType=14&container=2083]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111009/42d89d2a/attachment.html 


More information about the jboss-user mailing list