AEM 6.2 depcreated method | Community
Skip to main content
Level 4
October 7, 2016
Solved

AEM 6.2 depcreated method

  • October 7, 2016
  • 3 replies
  • 844 views

JackrabbitSession session = (JackrabbitSession) repository.loginAdministrative(null);

I am using this method in my bundle and  it works.

Why it is working if it is depcreated?

Any issue in using it ?

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

No issue other than a future version may drop it, However for now - it works. 

3 replies

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 7, 2016

No issue other than a future version may drop it, However for now - it works. 

Feike_Visser1
Adobe Employee
Adobe Employee
October 8, 2016

Two things here:

1. Try to avoid admin sessions if you can

2. Since 6.0 there is a preferred way to get this, see this article for more details: 

http://stackoverflow.com/questions/35859278/aem-how-to-get-administrative-resource-resolver-since-getadministrativeresourc

smacdonald2008
Level 10
October 8, 2016

To learn how to use a system user and sling mapping, see http://scottsdigitalcommunity.blogspot.ca/2014/12/querying-adobe-experience-manager-6.html?m=0. This links to article and video. In AEM 6.x, this is best practice: http://scottsdigitalcommunity.blogspot.ca/2014/12/querying-adobe-experience-manager-6.html?m=0