That's not what the static modules are meant for. What exactly are you trying to do with that approach?
Actually,I have created a custom module "com.test.my.Login.java" and a module.xml for that . I have all the dependent jars for this module inside my.ear/lib. I want to use those jar instead of putting jars in the same module directory as module.xml. So, I'll use the module.xml but jar should be picked from my.ear/lib directory .
<module xmlns="urn:jboss:module:1.3" name="com.test.my.login">
That's not possible, the module is static library whereas a deployment is a dynamic one which can disapear during runtime.
Modules are meant more as a fix resource.
Do you need access to the classes in the application when that application calls a method in the module? If so, you can get them by looking at the TCCL -