I'm running jruby + java inside glassfish application container. 
I wonder if there is a way to get the name of application deployment from inside glassfish application. (appl is deployed using asadmin deploy --name ...)

In other words, I'm looking for a way for an application (java or ruby code running) to know under which name it has been deployed. 

Or maybe it there some other way to detect what deployment command was used to deploy the application from inside the application.