| 목차 >> Core +- Glue Service +- GlueContext +- GlueActivity +- GlueStaticContext |
GlueContext는 임시 데이타 저장소로써 Glue Service 단위로 Control layer에서 생성되어 사용된다면, GlueStaticContext는 Application 전 영역에서 사용하는 객체(또는 데이타)에 접근할 수 있습니다 (GlueAPI 참고).
| 그림 : GlueStaticContext |

GlueStaticContext를 다음과 관련된 api를 제공하고 있습니다.
applicationContext.xml 에 정의되어 있는 bean 오브젝트에 접근할 수 있습니다.
<beans ...>
<bean id="serviceManager" class="com.poscoict.glueframework.biz.control.GlueServiceManagerImpl">
<property name="cacheManager" ref="cacheManager" />
<property name="serviceLoader" ref="serviceLoader" />
</bean>
<bean id="cacheManager" class=.../>
<bean id="serviceLoader" class="com.poscoict.glueframework.biz.control.GlueServiceLoader"/>
</beans>
...
GlueCacheManager cacheManager
= GlueStaticContext.getBeanFactory().getBeanObject("cacheManager", GlueCacheManager.class);
...
Java Option, Glue Property, Custom Property에 접근할 수 있습니다.
public class MainClass{
public static void main(String[] arg){
String key = "CONFIG_PATH";
String value = GlueStaticContext.getSystemProperty(key);
System.out.println("System Property : "+key+"="+value);
key = "company";
value = GlueStaticContext.getSystemProperty(key);
System.out.println("System Property : "+key+"="+value);
key = "msg.parsing.type";
value = GlueStaticContext.getGlueProperty(key);
System.out.println("Glue Property : "+key+"="+value);
key = "biz.server.type";
value = GlueStaticContext.getGlueProperty(key);
System.out.println("Glue Property : "+key+"="+value);
key = "biz.server.type";
value = GlueStaticContext.getCustomProperty(key);
System.out.println("Custom Property : "+key+"="+value);
key = "biz.sso";
value = GlueStaticContext.getCustomProperty(key);
System.out.println("Custom Property : "+key+"="+value);
}
}
msg.parsing.type=byte biz.server.type=development glue.custom.property=C:\tmp\biz.properties
biz.server.type=test biz.sso=true
java -DCONFIG_PATH=C:\tmp -Dcompany=poscoict ...중략... MainClass
라이선스의 유효여부와 라이선스모드를 얻어올수 있습니다.
| Prev | Home | Next |