1 25 package org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.simpleentry; 26 27 import javax.annotation.Resource; 28 import javax.ejb.Remote ; 29 import javax.ejb.SessionContext ; 30 import javax.ejb.Stateless ; 31 32 import org.objectweb.easybeans.tests.common.ejbs.base.ItfSimpleEnvEntryByDescriptor; 33 import org.objectweb.easybeans.tests.common.helper.ContextHelper; 34 35 36 42 @Stateless (name = "SLSBSimpleEnvEntryByDescriptor") 43 @Remote (ItfSimpleEnvEntryByDescriptor.class) 44 public class SLSBSimpleEnvEntryByDescriptor implements ItfSimpleEnvEntryByDescriptor{ 45 46 49 @Resource 50 private SessionContext sessionContext; 51 52 55 private String strInjection; 56 57 60 private String strNotOverride = DECLARED_STRING; 61 62 65 public void checkNotOverride00() { 66 if (!strNotOverride.equals(DECLARED_STRING)) { 67 throw new IllegalStateException ("There is not a default value declared in the deployment descriptor, " 68 + "so the container should not override the value specified in the variable declaration."); 69 } 70 } 71 72 75 public void checkStringInjection00() { 76 ContextHelper.checkSimpleEntry(sessionContext, "StringEntry", strInjection, INJECTED_STRING); 77 } 78 } 79 | Popular Tags |