Expand my Community achievements bar.

SOLVED

programatically get the version of AEM inside a servlet

Avatar

Level 2

Hi all,

 I have custom app which runs on AEM. For certain use case I need to get the version of the AEM on which the app is running on. how can get this version number inside a servlet.

Any help would be appreciated.

thanks,

Kevin

1 Accepted Solution

Avatar

Correct answer by
Level 10
3 Replies

Avatar

Correct answer by
Level 10

Avatar

Level 10

One area to explore is using MBEAN app logic to get information from CQ. See this AEM topic that talks about MBEAN:

http://docs.adobe.com/docs/en/cq/5-5/developing/jmx-integration.html

We have a community article that shows you how to use MBEAN from within an OSGi service operation:

http://helpx.adobe.com/experience-manager/using/aem-first-components1.html

This article shows how to use MBEAN within an OSGi to count stale workflows - replace that MBEAN logic with the MBEAN logic you need to address your use case. Something like:

http://stackoverflow.com/questions/1270173/accessing-a-remote-mbean-server

Update: You can get crx version using jmx - use the Product API to get server version.  

Avatar

Level 2

Hello everyone,

Thank you Sham and smacdonald2008 for the quick response. I tried out Sham suggestion first (cause that was the shorter one :P) and that worked. Here is what I added to my servlet

@Reference private ProductInfoProvider productInfo;

and then referred the version like

productInfo.getProductInfo().getShortVersion();

Thanks again,

 

best,

kevin