From 5365f22c2917a09d78383deaa5b3b7f9df213e3f Mon Sep 17 00:00:00 2001 From: Alejandro Revilla Date: Wed, 2 Oct 2024 17:33:45 -0300 Subject: [PATCH] register adaptor at init time in order to be usable from EnvironmentProviders --- jpos/src/main/java/org/jpos/q2/security/SMAdaptor.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/jpos/src/main/java/org/jpos/q2/security/SMAdaptor.java b/jpos/src/main/java/org/jpos/q2/security/SMAdaptor.java index b14c445735..dfa93cb5fe 100644 --- a/jpos/src/main/java/org/jpos/q2/security/SMAdaptor.java +++ b/jpos/src/main/java/org/jpos/q2/security/SMAdaptor.java @@ -56,6 +56,7 @@ protected void initService () throws Exception { sm = (SMAdapter) factory.newInstance (getImpl ()); factory.setLogger (sm, e); factory.setConfiguration (sm, e); + NameRegistrar.register (getName (), sm); } public void setImpl (String clazz) { @@ -65,10 +66,6 @@ public void setImpl (String clazz) { public String getImpl() { return clazz; } - - protected void startService () throws Exception { - NameRegistrar.register (getName (), sm); - } protected void stopService () throws Exception { NameRegistrar.unregister (getName ()); }