Create jboss-deployment-structure.xml in your application's WEB-INF folder. And paste following content in it -
<?xml version="1.0" encoding="UTF-8"?>
Make a build & deploy your WAR.
That doesn't work. I can still see both the JARs loaded.
best thing to do is to remove your JMS jar from your application.
if you are using maven, jms-api dependency you are using, should be set to scope=provided
You can also not enable messaging support in app server by running with standalone.xml instead of standalone-full.xml
but that will disable all JMS related functionality, for example MDBs wouldn't work anymore.
I did that. I removed the JMS jar from my application. But it resulted an error while deploying the WAR. NoClassDefFoundError: javax/jms/Destination