@Singleton bean can't be bound to a custom JNDI name
----------------------------------------------------
Key: JBAS-9249
URL:
https://issues.jboss.org/browse/JBAS-9249
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 6.0.0.Final
Reporter: Viggo Navarsete
I have a Singleton bean like this:
@Singleton
public class DummySingleton implements Dummy {
public String getHello() {
return "Hello Dummy!";
}
}
and an interface like this:
public interface Dummy {
public String getHello();
}
I've tried this in ejb-jar.xml (everything is packaged into an EAR file):
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar
xmlns="http://java.sun.com/xml/ns/javaee" version="3.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd">
<enterprise-beans>
<session>
<ejb-name>DummySingleton</ejb-name>
<ejb-class>com.tracetracker.global.aps.DummySingleton</ejb-class>
<session-type>Singleton</session-type>
<init-on-startup>false</init-on-startup>
<ejb-local-ref>
<ejb-ref-name>ejb3/hub/DummySingleton</ejb-ref-name>
<local>com.tracetracker.global.aps.Dummy</local>
</ejb-local-ref>
</session>
</enterprise-beans>
</ejb-jar>
I've also tried to add it to jboss.xml like this:
<session>
<ejb-name>DummySingleton</ejb-name>
<local-jndi>ejb3/hub/DummySingleton</local-jndi>
</session>
but no matter what I try it will not end up in JNDI bound to ejb3/hub/DummySingleton.
I can have normal session beans, and they will bind to ejb3/hub/xxxxx, but not when
it's a singleton.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira