Is this a .jar file or a .ear file? Either way, can you post the output of:
jar -tf your-ejb-jar.jar
There are plenty of examples in the WildFly testsuite which use ejb-jar.xml, so I don't expect this basic feature to be broken Here's one of the testcases wildfly/DDBasedEJBTestCase.java at master · wildfly/wildfly · GitHub
jaikiran thanks for your response!
The file is a .jar and is packaged into a .war under WEB-INF/lib.
I have looked at the test case and still cannot figure out what I am doing wrong. Here is the requested output for my jar
As I said, even when I put completely invalid markup into ejb-jar.xml, Wildfly just does not care.
The EJB spec states that if you are packaging your EJBs within a .war file, then the ejb-jar.xml should be placed in the .war/WEB-INF/ directory.
OK I moved the ejb-jar.xml to /WEB-INF in the WAR but still the same issue. Here is the jar -tf output for the war:
Again, I tried ejb-jar.xml with valid and invalid content - both deploy fine and none of them works.
With the latest listing you posted, I don't see any obvious reason why that ejb-jar.xml isn't being picked up. Can you attach the application that reproduces this issue?
I noticed that this only happens when I deploy an exploded WAR from my IDE (IntelliJ). When I put the packaged .war into Wildfly deployments directory, everything works.
I inspected the contents of the exploded WAR directory and the layout is fine, i.e. I have WEB-INF/ejb-jar.xml in there. So why is it not picked up by the deployment in this case?
If it's working fine without the IDE in picture, then it isn't a bug (at least not in WildFly). I don't really use IDEs for deploying applications, so I won't be able to help you much on that front to narrow down why it's behaving the way it is. Maybe someone familiar with IntelliJ's integration with WildFly maybe able to help you in solving the IDE part of this.