Just add your share library jars in your.ear/lib directory.
Read Java EE spec 8.2.1, it tells you how to package EAR file and using shared library.
I would suggest you investing your time in EJB3, not 2.
1 of 1 people found this helpful
BTW, you shouldn't be tie any of your codes to the JBOSS's tmp directory. It shouldn't matter to you what the server does with it. It's just a "temp" for the server processing, and it's subject to change/delete upon each restart. Just like your Window's C:\temp, or Linux's /tmp.
Again, read the JBoss manual.