-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Kasturi,
On 10/13/15 9:59 AM, kasturi wrote:
> We have recently upgraded Tomcat to 7.0.64 from 7.0.59. Our
> application extends SingleSignOn.java of catalina.jar to create a
> wrapper around it. Some methods in the SingleSignOn.java class has
> been deprecated because of which the compilation is failing.
> Details shared below.
>
> Catalina 7.0.59
>
> Catalina 7.0.64
The list has ruined your formatting. Can you post with a text-only
message?
> //SingleSingOn Class
>
> protected Map<Session, String> reverse = new HashMap();
>
> public void sessionEvent(SessionEvent event)
>
> {
>
> if (!getState().isAvailable()) {
>
> return;
>
> }
>
> if ((!"destroySession".equals(event.getType())) &&
> (!"passivateSession".equals(event.getType()))) {
>
> return;
>
> }
>
> Session session = event.getSession();
>
> if (this.containerLog.isDebugEnabled()) {
>
> this.containerLog.debug("Process session destroyed on " +
> session);
>
> }
>
> String ssoId = null;
>
> synchronized (this.reverse)
>
> {
>
> ssoId = (String)this.reverse.get(session);
>
> }
>
> if (ssoId == null) {
>
> return;
>
> }
>
> if (((session.getMaxInactiveInterval() > 0) &&
> (System.currentTimeMillis() - session.getThisAccessedTimeInternal()
> >= session.getMaxInactiveInterval() * 1000)) ||
> ("passivateSession".equals(event.getType())) ||
> (!session.getManager().getContainer().getState().isAvailable())) {
>
> removeSession(ssoId, session);
>
> } else {
>
> deregister(ssoId);
>
> }
>
> }
>
>
>
>
>
>
>
>
>
> //SingleSingOn Class
>
>
>
> Reverse Map does not exist
That doesn't look like a compiler message.
> sessionEvent() Method does not exist
Nor does this. Can you post actual compiler output?
> This new class has been introduced, but we cannot extend this class
> as we are already extending "SingleSignOn" class.
What new class?
> Also, to instantiate this class "SSOID" is required, as its
> constructor expects it. We are not sure what to pass here to
> instantiate it.
Which class requires SSOID to instantiate it? This class has a no-arg
constructor in 7.0.64:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/tags/TOMCAT_7_0_64/java/org/
apache/catalina/authenticator/SingleSignOn.java?view=markup
> //SingleSignOnListener
>
>
>
> public void sessionEvent(SessionEvent event)
>
> {
>
> if (!"destroySession".equals(event.getType())) {
>
> return;
>
> }
>
> Session session = event.getSession();
>
> Manager manager = session.getManager();
>
> if (manager == null) {
>
> return;
>
> }
>
> Context context = (Context)manager.getContainer();
>
> if (context == null) {
>
> return;
>
> }
>
> Authenticator authenticator = context.getAuthenticator();
>
> if (!(authenticator instanceof AuthenticatorBase)) {
>
> return;
>
> }
>
> SingleSignOn sso = ((AuthenticatorBase)authenticator).sso;
>
> if (sso == null) {
>
> return;
>
> }
>
> sso.sessionDestroyed(this.ssoId, session);
>
> }
>
> }
>
>
>
>
>
>
>
>
>
>
>
> //Our Code
>
>
>
> public class CiscoSSOValve extends SingleSignOn >> Extending
> Catalina Class
>
> {
>
>
>
> public void sessionEvent(SessionEvent event) {
>
>
>
> if(sNumTokens == 0) {
>
> super.sessionEvent(event); >>
> Overloading sessionEvent which does not exists in new Jar.
>
> return;
>
> }
>
>
>
> // We only care about session destroyed events
>
> if (!Session.SESSION_DESTROYED_EVENT.equals(event.getType())
>
> && (!Session.SESSION_PASSIVATED_EVENT.equals(event.getType()))){
>
> super.sessionEvent(event);
>
> return;
>
> }
>
>
>
>
>
> Compilation Error
>
>
>
> @
>
> "ucxn_build_stash.pl.log" [noeol] 20853L, 2963854C 1,1
> Top
>
> [javac] symbol: variable reverse
>
> [javac] location: class CiscoSSOValve
>
> [javac]
> /auto/ipcbu-ucxn-cache/CORES/BLD-cc_mainline_16-cct-ccm-d/unityconnect
ion/CL
>
>
NX_11.5.0.98/source/un_CUSA/Projects/cisco-unity-valve/src/com/cisco/uni
ty/t
> omcat/valve/CiscoSSOValve.java:98: error: cannot find symbol
>
> [javac] super.sessionEvent(event);
>
> [javac] ^
>
> [javac] symbol: method sessionEvent(SessionEvent)
>
> [javac]
> /auto/ipcbu-ucxn-cache/CORES/BLD-cc_mainline_16-cct-ccm-d/unityconnect
ion/CL
>
>
NX_11.5.0.98/source/un_CUSA/Projects/cisco-unity-valve/src/com/cisco/uni
ty/t
> omcat/valve/CiscoSSOValve.java:100: error: cannot find symbol
>
> [javac] if(null != lookup(ssoId)) {
>
> [javac] ^
>
> [javac] symbol: method lookup(String)
>
> [javac] location: class CiscoSSOValve
>
> [javac]
> /auto/ipcbu-ucxn-cache/CORES/BLD-cc_mainline_16-cct-ccm-d/unityconnect
ion/CL
>
>
NX_11.5.0.98/source/un_CUSA/Projects/cisco-unity-valve/src/com/cisco/uni
ty/t
> omcat/valve/CiscoSSOValve.java:149: error:
> associate(String,Session) in CiscoSSOValve cannot override
> associate(String,Session) in SingleSignOn
>
> [javac] protected void associate(String ssoId, Session session)
> {
>
> [javac] ^
>
> [javac] return type void is not compatible with boolean
>
> [javac] 7 errors
There are no deprecated methods in SingleSignOn.java. If you want to
know what happened to SingleSignOn.java, follow the revision history
which you can see here:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/tags/TOMCAT_7_0_64/java/org/
apache/catalina/authenticator/SingleSignOn.java?view=log
> We need assistance on below points:
>
> 1. How to fetch the SSOId corresponding to a session as
> 'reverse' map does not exists any more.
See r1675282.
> 2. How does the call flow happen of SingleSignOn methods?
Sorry, I can't help there. :/
- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
iQIcBAEBCAAGBQJWHWdaAAoJEBzwKT+lPKRYUdEP+gPgQvYqZu33mb0sXSGHzB3d
BOkcSr6CQCSseLn0vmvB9/bXQqw60l9s9DSUyGDGD+d58r7D+st7XJ+GspwT8UaX
kqIEhPyeHQtiCi3i2HiBWFSHdDjtc6ZoWFudekc/kR/oA8mXYDjz9TKeaKyT1gyq
pLZQRxa9u9nGOKFKlmyKOvabMvi8ozmb5KE/IIb8NzT9ChMb6bbFXpVu52hghA5X
UsqZAtDEdddBQcZyoWfrqjqdNTvTfWcGFeMrlvwpk2p5LfT9HUvlhIrWM878xIwN
0vmz30pEuZ4kXZEZI+qzhJulR88MjYemlq5Gt1MGtOGIPo5/W8yNqeTVsdpiqmDb
Jx2pv4AMlGUDMGxYF18TB+BaWVehgkQmk2nEsPSi1aOdyeAriZSOXdHGaMOhcjgt
FnPfmbTFjUTcgcy1jBuOx2TVownVkgfi64aaQdkw9HlhYJ3kyqsY+S+7np7i8ENZ
EKLNxBIdt3Q1sXBCSKNoBr+nnJE1jYbHzOadcwiYJo6aix11taqJQMP7WZ0lMrsw
8i3QHooGKJJqXGqiPYqqzpj5owL33UkMyqlwGeyOrQ9q+gqFm7QzSy1hjwclHB0M
nVo+I0+fPiF5QBUyCP2wdUZmDrarCfLZdfKdInzF9Ye1xzjj8h+vyADGtVJBeZs5
+NVJ8ICF3TAs5a0coIDN
=YnQX
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]