Question

I'm currently migrating an Java/EE5 application to run with WildFly-8.0.0.Final. As stated here: https://docs.jboss.org/author/display/WFLY8/How+do+I+migrate+my+application+from+AS5+or+AS6+to+WildFly , the legacy jboss.xml file seems to be ignored by now. Unluckily (for me) I was unable to find a good resource for migrating the session part within enterprise-beans. My current jboss.xml looks like this:

<?xml version='1.0' encoding='UTF-8' ?>
<jboss xmlns="http://www.jboss.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss_5_1.xsd" version="5.1">
    <security-domain>java:/jaas/customAdmin</security-domain>
    <enterprise-beans>
        <session>
            <ejb-name>CustomConfigBean</ejb-name>
            <pool-config>
                <pool-value>StrictMaxPool</pool-value>
                <pool-max-size>10</pool-max-size>
                <pool-timeout>30002</pool-timeout>
            </pool-config>
        </session>
    </enterprise-beans>
    <assembly-descriptor>
        <security-role>
            <role-name>customUser</role-name>
            <principal-name>customUser</principal-name>
        </security-role>
        <security-role>
            <role-name>customAdmin</role-name>
            <principal-name>customAdmin</principal-name>
        </security-role>
    </assembly-descriptor>
</jboss>

What is required to make this run in jboss-ejb3.xml ?

Was it helpful?

Solution

Have you taken a look at the schema? It looks like it has the same elements so it should be rather straightforward to create jboss-ejb3.xml using your existing jboss.xml as a starting point.

Here's the jboss-ejb3.xml Reference.

NOTE: I think the schemaLocation is not correct in the reference. It uses http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd, which does not exist. The correct schema location is http://xmlns.jcp.org/xml/ns/javaee/ejb-jar_3_2.xsd. I just created a discussion in the Wildfly group about the schema location problem.

You don't mention where your jboss.xml is located so for completeness just a reminder that for Wildfly it should be in WEB-INF of a war, or META-INF of an EJB jar.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top