Lets say, i have a class in bundle "Main" that calls a method from a class
that is exported from "BundleA" and it calls the setConfiguration() method
of the javax.security.auth.login.Cofiguration. That method is static and
sets a static member. Now, lets say i have that same class in bundle "Main"
call a method from a class that is exported from "BundleB" and that method
also calls the setConfiguration() method. Will i have two instances of the
same singleton because the caller is in two different bundles? or will i
have one instance because they are both called from the bundle "Main"???
// Main bundle
class Main {
public void someMethod() {
servicea.methodA();
serviceb.methodB();
}
}
// BundleA
import javax.security.auth.login.*;
class Servicea {
public void methodA() {
Configuration.setConfiguration(a);
}
}
// BundleB
import javax.security.auth.login.*;
class Serviceb {
public void methodB() {
Configuration.setConfiguration(b);
}
}
--
View this message in context:
http://www.nabble.com/Static-member-question-tp23450349p23450349.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]