[
https://issues.jboss.org/browse/AS7-5584?page=com.atlassian.jira.plugin.s...
]
kknd22 commented on AS7-5584:
-----------------------------
The start method simply return right after doing the jndi bind:
public void start() throws Exception
{
System.out.println("\n\n================================start: " +
__count++ + ", " + _jndiName + "\n\n");
_object = createObject ();
bind (_jndiName);
_started = true;
System.out.println("\n\n================================START DONE: " +
_jndiName + "\n\n");
}
protected void bind (String jndiName) throws NamingException
{
InitialContext rootCtx = new InitialContext ();
Name fullName = rootCtx.getNameParser ("").parse (jndiName);
if (_serializable) {
createSubcontext (rootCtx, fullName.getPrefix (fullName.size () - 1));
rootCtx.bind (fullName, _object);
}
else {
NonSerializableFactory.rebind (fullName, _object, true);
}
}
I used the debugger to verify it did return. For 7 jdni, I observed that all
"===start:" fan out and then all "====START DONE:" came back.
For over 8 jndi entries, seeing 8 ""===start:" fan out then it hangs
indefinitely.
BTW, through debugger, I was able to chase down the magic number 8:
class org.jboss.msc.service.ServiceContainerImpl:
ServiceContainerImpl(String name, int coreSize, long timeOut, TimeUnit timeOutUnit) //
-- at runtime coreSize is 8.
I have the feeling that 8 might not be the issue. The issue seems to be each fan out
thread is blocked until the all service jndi binding have been submitted. If the entry
size is bigger than 8 then it will block forever.
Now I am looking at class org.jboss.as.naming.WritableServiceBasedNamingStore
private class BindListener extends AbstractServiceListener<Object> {
...
}
BTW, anyway to configure the coreSize 8 to a bigger number for the time being? Thanks
-Chris
Naming context read-only during SAR deployment
----------------------------------------------
Key: AS7-5584
URL:
https://issues.jboss.org/browse/AS7-5584
Project: Application Server 7
Issue Type: Bug
Components: POJO
Affects Versions: 7.1.1.Final
Reporter: Philippe Marschall
During the #start() #stop() method of a legacy SAR the naming context is read only. The
problem seems to be that
{{org.jboss.as.service.AbstractService.invokeLifecycleMethod(Method)}} only sets the
thread context class loader and does not do {{WritableServiceBasedNamingStore.pushOwner}}
http://stackoverflow.com/questions/12419234/how-to-bind-an-object-to-jndi...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira