Hello!
Recently, I had problems with scoped-EARs deployment. I checked the
working test case and found that a bean despite of whether it has
only a local interface must have unique <jndi-name> besides
<local-jndi-name>.
The reason is that Container's jmx name is constructed with the
following method:
public ObjectName getJmxName()
{
String jndiName = getBeanMetaData().getJndiName();
if (jndiName == null)
{
throw new IllegalStateException("cannot get Container object name unless jndi
name is set!");
} // end of if ()
if (jmxName == null)
{
jmxName = ObjectNameFactory.create(BASE_EJB_CONTAINER_NAME + ",jndiName=" +
jndiName);
} // end of if ()
return jmxName;
}
My beans with local intf didn't suspect this and didn't specify
<jndi-name>. When container was registered it asked a jndi-name.
BeanMetaData can't refuse with null value and returns ejb-name if
jndi-name is absent. Thus I couldn't get EARs scoped-deployed.
The conclusion is: to get EARs scoped-deployed, beans should have
different ejb-name, or jndi-name.
Or maybe it's better to change jmx name for container?
Say, change jndiName in the getJmxName() as:
BeanMetaData bmd = getBeanMetaData();
jndiName = bmd.getHome() != null ? bmd.getJndiName() : bmd.getLocalJndiName();
or construct jmxName as ObjectNameFactory.create(BASE_EJB_CONTAINER_NAME +
",localJndiName=" + localJndiName);
if bean doesn't have remote intf. But in this case conatiners will
have different name structure.
Any comments? TIA.
--
Best regards,
Alex Loubyansky
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development