[jboss-user] [JNDI and Naming] - JNDI binding in extension module READONLY exception
hellen-z
do-not-reply at jboss.com
Mon Jan 9 15:00:22 EST 2012
hellen-z [http://community.jboss.org/people/hellen-z] created the discussion
"JNDI binding in extension module READONLY exception"
To view the discussion, visit: http://community.jboss.org/message/645537#645537
--------------------------------------------------------------
Hi,
My component is deployed as an extension module. And I cannot use EJB annotation for resource injection since only web profile can be used.
So I try to do binding calling
new InitialContext().bind(....),
and I got excetion
JBAS011859: Naming context is read-only: java.lang.UnsupportedOperationException: JBAS011859: Naming context is read-only
at org.jboss.as.naming.WritableServiceBasedNamingStore.requireOwner(WritableServiceBasedNamingStore.java:118) [jboss-as-naming-7.1.0.CR1.jar:7.1.0.CR1]
at org.jboss.as.naming.WritableServiceBasedNamingStore.bind(WritableServiceBasedNamingStore.java:53) [jboss-as-naming-7.1.0.CR1.jar:7.1.0.CR1]
at org.jboss.as.naming.NamingContext.bind(NamingContext.java:220) [jboss-as-naming-7.1.0.CR1.jar:7.1.0.CR1]
at org.jboss.as.naming.InitialContext.bind(InitialContext.java:146) [jboss-as-naming-7.1.0.CR1.jar:7.1.0.CR1]
at org.jboss.as.naming.NamingContext.bind(NamingContext.java:229) [jboss-as-naming-7.1.0.CR1.jar:7.1.0.CR1]
Result is the same if I use either *org.jboss.as.naming.InitialContext* or *javax.naming.InitialContext*
Could you give any suggestions what I need to to?
Thanks very much!
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/645537#645537]
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/20120109/c09734c3/attachment.html
More information about the jboss-user
mailing list