[jboss-user] [EJB3] - Re: Using ejb-jar.xml for @Singleton bean
jaikiran pai
do-not-reply at jboss.com
Mon Feb 14 04:00:57 EST 2011
jaikiran pai [http://community.jboss.org/people/jaikiran] created the discussion
"Re: Using ejb-jar.xml for @Singleton bean"
To view the discussion, visit: http://community.jboss.org/message/587178#587178
--------------------------------------------------------------
This looks like a bug. Can you try removing that @EJB(name = "ejb/VersionManager") altogether from the code and you this new ejb-jar.xml instead:
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
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"
version="3.1">
<enterprise-beans>
<session>
<ejb-name>StartupBean</ejb-name>
<ejb-class>com.example.services.startup.StartupBean</ejb-class>
<ejb-local-ref>
<ejb-ref-name>ejb/VersionManager</ejb-ref-name>
<local>com.example.services.version.VersionManager</local>
<injection-target>
<injection-target-class>com.example.services.startup.StartupBean</injection-target-class>
<injection-target-name>versionManager</injection-target-name>
</injection-target>
<lookup-name>01-services/VersionManagerBean/local</lookup-name>
</ejb-local-ref>
</session>
</enterprise-beans>
</ejb-jar>
Note that I have added the injection-target element in the ejb-jar.xml, to do the injection. See if that works.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/587178#587178]
Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110214/b54a5092/attachment-0001.html
More information about the jboss-user
mailing list