[jboss-jira] [JBoss JIRA] Commented: (JBAS-8732) @Singleton broken

jaikiran pai (JIRA) jira-events at lists.jboss.org
Sat Dec 11 02:48:52 EST 2010


    [ https://issues.jboss.org/browse/JBAS-8732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12569419#comment-12569419 ] 

jaikiran pai commented on JBAS-8732:
------------------------------------

This isn't a bug. The deployment that you attached has 2 issues:

1) @Singleton beans are available in EJB3.1. So you should be using 3.1 version of the xsd in the ejb-jar.xml. You are however using 3.0:

<?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"
         version="3.0"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
         http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
</ejb-jar>

2) You are deploying a EJB through a .war file. For that to work, you should be using 3.0 version of web-app xsd. You however are using 2.5:

<web-app version="2.5" 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/web-app_2_5.xsd">

Please take a look at these wiki articles for some quick examples:

http://community.jboss.org/wiki/EJB31inAS600M2
http://community.jboss.org/wiki/EJB31SingletonBeansinAS600M3

Other related articles can be found here http://community.jboss.org/en/ejb3?view=documents

I'll close this JIRA. If you have any further questions, feel free to create a discussion in our EJB3 user forum http://community.jboss.org/en/ejb3?view=discussions and we'll be glad to help.


> @Singleton broken
> -----------------
>
>                 Key: JBAS-8732
>                 URL: https://issues.jboss.org/browse/JBAS-8732
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: EJB3
>    Affects Versions: 6.0.0.CR1
>         Environment: Ubuntu Linux, JBoss AS 6 Trunk (r109826)
>            Reporter: Tobias Sarnowski
>            Assignee: jaikiran pai
>         Attachments: singleton-test.tgz
>
>
> I found some tickets mentioning that Singletons were broken in the last releases of JBossAS 6 but they were marked as fixed. I checked out the current trunk an hour ago (rev 109826) , built the distribution zip with "./build.sh -P-sources,dist-zip" (no special maven settings in my settings.xml) and unzipped it to my home directory. I tested it with my current project and it failed again. I wrote a little test project to give you my exact setup to reproduce the error. I hope I didn't misused the spec but to my understanding, this testcase should work.
> The attached file has an OUTPUT.txt file which contains the log and error message.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list