user66332
user66332

Reputation: 189

Wildfly 10 Shared EJB

I currently have an EAR consisting of shared common.jar, an EJB.jar, and several WARs. Recreating the entire EAR and redeploying it can be time consuming when I only need to make small change.

So now, I am attempting to deploy the JAR, EJB, and WARs independently in my dev environment. I am able to deploy the JAR and any WARs that don't require EJBs without issue. Any of the WARs that require the EJB fail with:

WFLYEJB0406: No EJB found with interface of type 'foo.IBar' for binding foo.Baz/myBean

I added the following to the EJB pom for maven-ejb-plugin to reference the JAR:

<configuration>
    <archive>                   
        <manifestEntries>
            <Dependencies>deployment.common-${project.version}.jar export</Dependencies>
        </manifestEntries>
    </archive>
</configuration>

I added the following to the WAR poms that require access to the EJBs:

<configuration>
    <archive>
        <manifestEntries>
            <Dependencies>deployment.ejb-${project.version}.jar</Dependencies>
        </manifestEntries>
    </archive>
</configuration> 

What am I missing to get my WARs to pick up the EJB deployment when not using an EAR?

Upvotes: 1

Views: 654

Answers (1)

Ebuzer Taha KANAT
Ebuzer Taha KANAT

Reputation: 933

I suggest you to declare your module dependencies with jboss-deployment-structure.xml . To answer your question there seems to be no module dependency related problem if it was you would see the module not found or similiar exceptions on deployment. I think problem is inter deployment EJB calls requires lookup .

You can look here for example.

Upvotes: 1

Related Questions