org.glassfish.examples.ctm
Class ServiceProviderEngine
java.lang.Object
org.glassfish.examples.ctm.ServiceProviderEngine
@Service
@Singleton
public class ServiceProviderEngine
- extends Object
In the example, this code uses the Environment object, which sometimes
will be from Tenant1, and other times from Tenant2. However, since this
class is in the Singleton scope, the Environment object cannot be re-injected.
Not to fear, because the Environment object is produced as part of a Proxiable
scope so the injected entity is actually a proxy. Hence, when this service
uses the Environment object when Tenant1 is in effect it will get the values
for Tenant1, and when Tenant2 is in effect it will get the values for Tenant2.
- Author:
- jwells
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getTenantName
public String getTenantName()
getTenantMin
public int getTenantMin()
getTenantMax
public int getTenantMax()
Copyright © 2013 Oracle Corporation. All Rights Reserved.