i have quite a huge development environment that i've been wanting to migrate from jboss as 5.1.0 to wildfly 8.1

i have some ear with a lot of ejb in it (totalling at around a hundred), and some jar outside the ear that acts as a persistence and jpa entity. i set up the project this way since the jpa entities needs to be used across many different applications on the same server. In wildfly 8.1 i run into a problem that the ejb within the ear are not able to locate the persistence unit that's defined in persistence.xml inside the jar. as per the answer in How to make persistence unit visible for other deployments (not EAR) by Scott Marlow, there's no code that scans persistence unit outside of it's own deployment, so i can't use a persistence unit outside of my ear, unless i use the jndi alternative. doing this would mean that i need to change all the classes in my ejb to use jndi rather than the usual annotation way.

Is there any workaround about this issue? and why does wildfly built this way? is there any security or performance reason that accessing other deployments persistence might bring?

As of yet, I have not heard of any security or performance reasons for not allowing this. A few years ago, we discussed this on the as-dev mailing list. It is theoretically possible but the result would be an extension that is not part of the EE standard.

If you or anyone else is seriously interested in contributing a code change to allow this. There will be a learning curve that will start with solving other issues first. I had a volunteer once before for doing this change but we didn't properly address the learning curve part (by having them work on easier jiras first). I understand that you probably have limited time to spend on something like this but, what do you want to see in the long run? Your application using a feature like your looking for? Or a change to your application.

i would be glad to help, since in my country jboss/wildfly is used widely and it would be beneficial to me if i can understand how things works. I would also be able to create other application using the design that i have now. I'm a beginner in java EE though, but i'm no stranger to java programming itself. how do i begin?