GlueSDK °¡ Release µÇ¾ú½À´Ï´Ù. [ Release Note ] - dependency º¯°æ 1. license-api º¯°æ : 1.0.1 -> 1.1.0À¸·Î up. - commons-codec, bcprov °¡ ¹Ù²ñ. commons-codec-1.7.jar -> commons-codec-1.6.jar À¸·Î down. bcprov-jdk16-1.46.jar -> bcprov-jdk15-1.46.jar À¸·Î java ¹öÀü down. - lib/gluelib/[glue-core] ¸ðµâ ¼öÁ¤ 1. spring mvcÀÇ controller Ãß°¡ - com.poscoict.glueframework.web.control.spring.GlueJsonController Ãß°¡ 2. biz controller ÀÇ monitoring ±â´É Ãß°¡. - ÀÎÅÍÆäÀ̽º com.poscoict.glueframework.biz.control.GlueMoniHelper Ãß°¡ - Ŭ·¡½º com.poscoict.glueframework.biz.control.GlueBizControllerImpl ¼öÁ¤ GlueMoniHeler º¯¼ö Ãß°¡ÇÔ. »ý¼º½Ã applicationContext.xmlÀÇ bean Á¤ÀÇ À¯¹«¸¦ È®ÀÎÇÔ. monitoring ±â´ÉÀ» »ç¿ëÇÏ°íÀÚ ÇÒ °æ¿ì, applicationContext.xml¿¡ moniHelper beanÀ» Ãß°¡ÇÏ¸é µÊ. GlueMoniHelper ±¸Çö Ŭ·¡½º´Â º°µµ ¸ðµâ¿¡ Æ÷ÇÔµÊ. - »ç¿ë¹ý <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:task="http://www.springframework.org/schema/task" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> <bean id="serviceManager" class="com.poscoict.glueframework.biz.control.GlueServiceManagerImpl"> <property name="cacheManager" ref="cacheManager" /> <property name="serviceLoader" ref="serviceLoader" /> </bean> <bean id="serviceLoader" class="com.poscoict.glueframework.biz.control.GlueServiceLoader"/> <bean id="cacheManager" class=". . ."/> <bean id="moniHelper" class=". . ."/> </beans> 3. µ¿Àû property ¼³Á¤ ±â´É Ãß°¡ - com.poscoict.glueframework.biz.activity.GlueActivity ¼öÁ¤ Map<String, String> dynamicProperties º¯¼ö : µ¿Àû property¸¦ °ü¸®Çϸç, Á÷Á¢ Á¢±Ù °¡´ÉÇÔ. Set<String> getPropertyNames() method Ãß°¡ : Á¤Àû property ÀÇ nameÀ» ȹµæÇÏ´Â ¸Þ¼Òµå. 4. bean À¯¹« È®ÀÎ ±â´É Ãß°¡. - com.poscoict.glueframework.bean.GlueBeanFactory ¼öÁ¤ containsBean(String) method Ãß°¡ com.poscoict.glueframework.bean.GlueBeanFactoryImpl Ŭ·¡½º¿¡ Ãß°¡ method ±¸Çö. - »ç¿ë¹ý GlueServiceManager bean = null; if ( GlueStaticContext.getBeanFactory().containsBean( "serviceManager" ) ) { bean = GlueStaticContext.getBeanFactory().getBeanObject( "serviceManager", GlueServiceManager.class ); } 5. query loaderÀÇ query file loading ½Ã vfs üũ ¹× log º¸¿Ï - com.poscoict.glueframework.dao.manager.GlueQueryLoader ¼öÁ¤ ±âÁ¸¿¡´Â query Æú´õ°¡ directoryÀÎÁö(FileÀÇ isDirectory() »ç¿ë)¸¸ üũÇÔ. protocalÀÌ ¹«¾ùÀÎÁö(URLÀÇ getProtocol() »ç¿ë) Ãß°¡·Î üũÇؼ­ ó¸®ÇÔ. trace ·¹º§·Î query Æú´õ¿¡ ´ëÇØ »ó¼¼ ·Î±× Ãß°¡ÇÔ. - lib/gluelib/[glue-schedule] ¸ðµâ ¼öÁ¤ 1. Quartz Job È£Ãâ activity ¼öÁ¤ - com.poscoict.glueframework.scheduling.activity.GlueJobCall ¼öÁ¤ 'server-ip'¿Í 'server-port'À» 'server-address' ·Î ÅëÇÕ. - »ç¿ë¹ý <activity name="FireJob" class="com.poscoict.glueframework.scheduling.activity.GlueJobCall"> <transition name="success" value="end" /> <property name="sender" value="eventSender" /> <property name="server-address" value="schedulerServer" /> <property name="job-name" value="jobName" /> <property name="job-log-no" value="requestID" /> <property name="result-key" value="jobName_call_result" /> </activity> - application º¯°æ ÇÊ¿äÇÔ. ¼öÁ¤Àü ¿¹. <activity name="FireJob" class="com.poscoict.glueframework.scheduling.activity.GlueJobCall"> <transition name="success" value="end" /> <property name="sender" value="eventSender" /> <property name="server-ip" value="remoteServerIP" /> <property name="server-port" value="remoteServerPort" /> <property name="job-name" value="jobName" /> <property name="job-log-no" value="requestID" /> <property name="result-key" value="jobName_call_result" /> </activity> 2. Scheduler Launch½Ã bean Áߺ¹ »ý¼º ¹æÁö. - com.poscoict.glueframework.scheduling.server.GlueSchedulerHttpServer ¼öÁ¤ applicationContext.xml ¿¡ Á¤ÀÇµÈ beanÀ» ¸ÕÀú »ý¼ºÇϵµ·Ï ÇÔ. quartz_scheduler.xml ¶Ç´Â spring_schduler.xml °¡ Á¸ÀçÇÒ °æ¿ì bean Áߺ¹ »ý¼º ¹æÁö¸¦ À§ÇÔ. java -jar user-application.jar spring spring_scheduler.xml java -jar user-application.jar quartz quartz_scheduler.xml 3. Quartz Job ¹× Spring TaskÀÇ ¼öÇà ½ÇÀû µî·Ï º¸¿Ï - com.poscoict.glueframework.scheduling.GlueQuartzJobBean ¼öÁ¤ - com.poscoict.glueframework.scheduling.task.GlueTaskScheduler ¼öÁ¤ - com.poscoict.glueframework.scheduling.store.GlueScheduledJobInfoLogger ¼öÁ¤ - com.poscoict.glueframework.scheduling.store.GlueScheduledTaskLogger Ãß°¡ quartz job ½ÇÇà½Ã°£ °è»ê º¯°æ. System.currentTimeMillis() ´ë½Å¿¡ JobExecutionContextÀÇ getJobRunTime() ¸¦ ÀÌ¿ëÇÔ. ServiceName Á¸Àç¿©ºÎ´Â È®ÀηÎÁ÷ Á¦°ÅÇÔ. biz controller¿¡¼­ ó¸®Çϵµ·Ï ÇÔ. task ±â´É°ú task ½ÇÇà½ÇÀû °ü¸®¿ë logging ±â´É ºÐ¸®. oracle¿ë ¼öÇà½ÇÀû °ü¸® db »ý¼º script Ãß°¡ÇÔ.(SchedulerHisotry_Oracle.sql) - »ç¿ë¹ý [quartz scheduler] <bean id="scheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean" lazy-init="true"> <property name="triggers"> . . . </property> <property name="globalJobListeners"> <list> <ref local="dblogging"/> </list> </property> </bean> <bean id="dblogging" class="com.poscoict.glueframework.scheduling.store.GlueScheduledJobInfoLogger"> <property name="dataSource" ref="logging-ds"/> </bean> <bean id="logging-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> . . . </bean> [spring scheduler] <bean id="glue-task-1" class="com.poscoict.glueframework.scheduling.task.GlueTaskScheduler"> <property name="ServiceName" value="sample51-service"/> <property name="dataMap"> <map> <entry key="deptno" value="10"/> <entry key="find" value="1"/> </map> </property> <property name="logger" ref="dbLogging"/> </bean> <bean id="dbLogging" class="com.poscoict.glueframework.scheduling.store.GlueScheduledTaskDBLoggerImpl"> <property name="dataSource" ref="logging-ds"/> </bean> <bean id="logging-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> . . . </bean> - application º¯°æ ÇÊ¿äÇÔ. ¼öÁ¤Àü quartz scheduler ¿¹. <bean id="scheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean" lazy-init="true"> <property name="triggers"> . . . </property> <property name="globalJobListeners"> <list> <ref local="dblogging"/> </list> </property> </bean> <bean id="dblogging" class="com.poscoict.glueframework.scheduling.store.GlueScheduledJobInfoLogger"> <property name="dao" ref="schedulerDao"/> <property name="transactionManager" ref="schedulerTx"/> </bean> ¼öÁ¤Àü spring scheduler ¿¹. <bean id="gluetask" class="com.poscoict.glueframework.scheduling.task.GlueTaskScheduler"> <property name="contextMap"> <map> <entry key="ServiceName" value="sample51-service"/> <entry key="deptno" value="10"/> <entry key="find" value="1"/> </map> </property> <property name="dbLogging"> <map> <entry key="dao" value="test-dao"/> <entry key="tm" value="test-tx"/> </map> </property> </bean> - GlueAPI º¸¿Ï