Your app should not be in the lib directory, it should be in server/xxx/deploy.
I know. But if I deploy it to deploy folder, I cannot just instantiate my class from other-jar's code, I must use session beans in that case. So, this way is a bit easier. (And in fact, it's my boss's idea.)
The same code will work in a client if you provide a jndi.properties file - the client's JNDI code will load the properties from that file. Usually that is the best way to provide the properties because then you can easily change the host name or IP address.
I know. I've tried that version of code too, and I've sent you most compact code version to review. Of course I will return these settings to file.
What kind of app do you have?
In that jar I have small set of frequently-used utility classes, which all of our (wanna be SOA) services will use. That jar should be deployed on all production jboss instances.
You can provide a jboss-specific config file that includes a dependency on the queue's mbean - this way your app will not be deployed until the queue is deployed.
Hmm... sounds nice. I'll think that way. Thanks.