• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get J2EE Application Name

 
Osita Agbo
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,

I need to write code (Servlet/EJB) in an application that can figure out the name of the application it is deployed within. The name of the application is decleared in the Application.xml file.
I am working with more than one EAR file deployed on WebLogic Server 8.1 SP4

Thanks a lot for your response.

Osita Agbo.
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Osita,

You might consider storing the information inside your packages and retrieve them at runtime. More exactly you might store the next information inside of the manifest.mf file(s):

Next you can use the java.lang.Package class in order to get all these information at runtime. This class has specific methods like getName, getImplementationTitle, getSpecificationTitle, etc.
Regards.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!