Release History

Data format is : YYYY-MM-DD

Version format is : major.minor.patch

4.2.3 Released ( 2014-10-10 )

  • glue-ucube 모듈 추가

  • glue-xplatform 모듈 추가

  • glue-schema 모듈 수정

    1. layout, query, service 용 parser 를 com.poscoict.glueframework.schema.parser pacakge 변경
      • com.poscoict.glueframework.schema.layout.parser.GlueLayoutInfo deprecated
      • com.poscoict.glueframework.schema.layout.parser.GlueLayoutParser deprecated
      • com.poscoict.glueframework.schema.query.parser.GlueQueryMapInfo deprecated
      • com.poscoict.glueframework.schema.query.parser.GlueQueryParser deprecated
      • com.poscoict.glueframework.schema.service.parser.GlueServiceInfo deprecated
      • com.poscoict.glueframework.schema.service.parser.GlueServiceParser deprecated
      • com.poscoict.glueframework.schema.parser.GlueLayoutInfo 추가
      • com.poscoict.glueframework.schema.parser.GlueLayoutParser 추가
      • com.poscoict.glueframework.schema.parser.GlueQueryMapInfo 추가
      • com.poscoict.glueframework.schema.parser.GlueQueryParser 추가
      • com.poscoict.glueframework.schema.parser.GlueServiceInfo 추가
      • com.poscoict.glueframework.schema.parser.GlueServiceParser 추가
  • glue-core 모듈 수정

    1. dependency 변경
      • slf4j-api-1.7.2.jar -> slf4j-api-1.7.7.jar 으로 up.
        ehcache-core-2.6.6.jar -> ehcache-core-2.6.9.jar 으로 up.
    2. GlueEhCacheManager의 수정
      EhCache 의 CacheManager 생성/종료 구현.
      GlueCacheManager interface에 정의되지 않는 method 정리함.
      로깅 보완함. cache name(region name)이 주어지지 않는 경우 NullPointerException 발생 했으나 보완함
      • com.poscoict.glueframework.cache.ehcache.GlueEhCacheManager 수정
        public void clear( String cacheName, String managerName ) 삭제
        public CacheManager getCacheManager( String managerName ) 삭제
        public Object getCacheObject( Object cacheKey, String cacheName, String managerName, GlueCacheLoader loader ) 삭제
        public CacheManager getDefaultCacheManager() 삭제
        public boolean isPresendAndExpired( Object cacheKey, String cacheName, String managerName ) 삭제
        public boolean isPresent( Object cacheKey, String cacheName, String managerName ) 삭제
        public void putCacheObject( Object cacheKey, Object cacheObject, String cacheName, String managerName ) 삭제
        public void removeCacheObject( Object cacheKey, String cacheName, String managerName ) 삭제
      • 사용법 : EhCache.xml 및 Java Code
        <?xml version="1.0" encoding="UTF-8"?>
        <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd" updateCheck="false" name="__DEFAULT__">
            <cache name="_default-region" maxElementsInMemory="500" eternal="true" />
            <cache name="_sql-region" maxElementsInMemory="500" eternal="true" />
            <cache name="_message-definition-region" maxElementsInMemory="500" eternal="true" />
            <cache name="_service-region" maxElementsInMemory="500" eternal="true" />
            <cache name="_column-region" maxElementsInMemory="500" eternal="true" />
        </ehcache>
        
        GlueCacheManager cacheManager = . . .
        String cacheKey = . . .
        Object data = null;
        if ( cacheManager.isPresent( cacheKey ) )
        {
            data = cacheManager.getCacheObject( cacheKey );
        } else
        {
            data = loadData( cacheKey );
            cacheManager.putCacheObject( cacheKey, data );
        }
        
        GlueCacheManager cacheManager = . . .
        GlueCacheLoader cacheLoader = . . .
        String cacheKey = . . .
        String cacheRegion = . . .
        Object data = cacheManager.getCacheObject( cacheKey, cacheRegion, bizLoader );
        
    3. glue-schema 수정 사항 반영
      다음 class들의 import 문이 변경됨.
      • com.poscoict.glueframework.biz.control.GlueService 수정
      • com.poscoict.glueframework.biz.control.GlueServiceLoader 수정
      • com.poscoict.glueframework.dao.manager.GlueQueryLoader 수정
      • com.poscoict.glueframework.message.layout.GlueXmlMessageLayout 수정
    4. ServletContextListener 추가
      applicationContext.xml 에 등록된 bean 생성을 contextInitialized 시점에 진행되도록하고자 함.
      • com.poscoict.glueframework.web.GlueServletContextListener 추가
      • 사용법 : web.xml
        <?xml version="1.0" encoding="UTF-8"?>
        <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                 xmlns="http://java.sun.com/xml/ns/javaee" 
                 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
                                     http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
                 version="3.0">
        
            <listener>
                <listener-class>com.poscoict.glueframework.web.GlueServletContextListener</listener-class>
            </listener>
        </web-app>
        
    5. NonUI 수신 Servlet 수정
      GlueHttpReceiverAdapter은 수신 Data(message) 요건 변경.
      File 수신(type이 F인 경우)의 경우, 이전 버전에서는 case#1와 같이 'TC ID' 와 'File 경로'를 messgae로 수신받았으나, case#2과 case#3과 같은 형태도 수신받아서 처리할 수 있도록 함.
      GlueContext에 'ReceiveTCSequence', 'ReceiveTCType', 'ReceiveTCIfd', 'ReceiveTCTimestamp', 'ReceiveTCMsg' 추가함.
      GlueContext의 'ReceiveTC'는 type(T 또는 F)에 따라 java.lang.String 객체 또는 java.io.File 객체를 담도록 수정함
      • com.poscoict.glueframework.web.GlueHttpReceiverAdapter 수정
      • 수신Data 예 : message의 공백(' ')은 언더바('_')로 표현되었습니다.
        . type ifd message
        case#1 F IF-FILE-FILE MSGFW002_/APP/CHAIN/MSGFW002_20130201.dat
        case#2 F IF-FILE-FILE MSGFW002/APP/CHAIN/MSGFW002_20130201.dat
        case#3 F IF-FILE-FILE /APP/CHAIN/MSGFW002_20130201.dat
        case#4 T IF-TC-TC MSGFW00110abcde_________seoul________S________
    6. MessageParse Activity 수정
      GlueMessageParse 의 interface-type property 삭제함.
      GlueHttpReceiverAdapter 에서 GlueContext에 ReceiveTCType이 있으므로 불필요해짐.
      GlueMessageParse 는 message-id property 추가함.
      여러 개의 message를 한개의 layout으로 parsing 할 수 있음(case#1과 case #2). Parse activity에서 주어진 message-id인 MSGFW001에 근거해서 parsing이 가능함.
      GlueMessageParse 의 charset property와 charset-name property 에 근거해서 File 읽기를 하도록 함. File Encoding에 따라 한글이 깨질 수 있음.
      • com.poscoict.glueframework.biz.activity.GlueMessageParse 수정
      • com.poscoict.glueframework.util.GlueFileResourceUtil 수정
        public static List<String> readFile( File file, Charset charset ) 추가
      • 수신Data 예 : message의 공백(' ')은 언더바('_')로 표현되었습니다.
        . type ifd message
        case#1 T IF-TC-TC MSGFW00110abcde_________seoul________S________
        case#2 T IF-TC-TC MSGFW00510abcde_________seoul________S________
      • 사용법 : MSGFW005-service.xml
        <activity name="Parse" class="com.poscoict.glueframework.biz.activity.GlueMessageParse">
            <transition name="success" value="SetMessageKey" />
            <property name="layout" value="layout" />
            <property name="message-id" value="MSGFW001" />
        </activity>
        
        <activity name="ParseFile" class="com.poscoict.glueframework.biz.activity.GlueMessageParse">
            <transition name="success" value="SetMessageKey" />
            <property name="layout" value="layout" />
            <property name="charset" value="UTF-8" />
        </activity>
        
    7. DB Layout Manager 수정
      Oracle 대신 SQLite 사용시 ClassCastException 으로 "Message Definition loading error!!" 에러 발생함
      • com.poscoict.glueframework.message.layout.GlueDBMessageLayout 수정
      • 에러 로그
        중략 . . 
        [main] DEBUG com.poscoict.glueframework.dao.jdbc.GlueJdbcDao - Loaded JDBC Driver: SQLiteJDBC
        [main] DEBUG com.poscoict.glueframework.dao.jdbc.GlueJdbcDao - Loaded JDBC Driver Version: native
        [main] DEBUG com.poscoict.glueframework.dao.jdbc.GlueJdbcDao - DBMS Name: SQLite
        [main] DEBUG com.poscoict.glueframework.dao.jdbc.GlueJdbcDao - DBMS Version: 3.7.2
        [main] DEBUG com.poscoict.glueframework.dao.jdbc.GlueJdbcDao - DBMS URL: jdbc:sqlite:/C://eclipse/workspace-glue-4-sample/sample-parent/layout.db
        [main] DEBUG com.poscoict.glueframework.dao.jdbc.GlueJdbcDao - Batch Update: true
        중략 . .
        com.poscoict.glueframework.message.layout.GlueMessageDefinitionException: Message Definition loading error!!
            at com.poscoict.glueframework.message.layout.GlueDBMessageLayout.getAttributesDefinition(GlueDBMessageLayout.java:195) ~[glue-core-4.2.2-RELEASE.jar:na]
            at com.poscoict.glueframework.message.layout.GlueAbstractFixedLengthMessageLayout.getAttributes(GlueAbstractFixedLengthMessageLayout.java:309) ~[glue-core-4.2.2-RELEASE.jar:na]
            at com.poscoict.glueframework.biz.activity.GlueMessageParse.runActivity(GlueMessageParse.java:191) ~[glue-core-4.2.2-RELEASE.jar:na]
            at com.poscoict.glueframework.biz.control.GlueService$GlueActivityHandler.runActivity(GlueService.java:166) ~[glue-core-4.2.2-RELEASE.jar:na]
            at com.poscoict.glueframework.biz.control.GlueBizControllerImpl.doAction(GlueBizControllerImpl.java:288) ~[glue-core-4.2.2-RELEASE.jar:na]
            at test.Test_MSGFW001.main(Test_MSGFW001.java:30) [test-classes/:na]
        Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.math.BigDecimal
            at com.poscoict.glueframework.message.layout.GlueDBMessageLayout.getAttributesDefinition(GlueDBMessageLayout.java:163) ~[glue-core-4.2.2-RELEASE.jar:na]
            ... 5 common frames omitted
        중략 . .
        
      • SQLite
        Class.forName( "org.sqlite.JDBC" );
        Connection conn = DriverManager.getConnection( "jdbc:sqlite:layout.db" );
        Statement stmt = conn.createStatement();
        StringBuilder sb = new StringBuilder();
        sb.append( "create table LAYOUT(" );
        sb.append( "MDL_DEFINE_NM text not null" );
        sb.append( ", MDL_DEFINE_DT_NM_SEQ integer not null" );
        sb.append( ", MDL_DEFINE_DT_NM_GROUP_TP text not null" );
        sb.append( ", STANDARD_ENGLISH_ID text not null" );
        sb.append( ", STANDARD_KOREAN_NAME text not null" );
        sb.append( ", MDL_DEFINE_DT_NM_DATA_TP integer not null" );
        sb.append( ", MDL_DEFINE_DT_NM_LEN integer not null" );
        sb.append( ", MDL_DEFINE_DT_NM_V_DECI_PREC integer" );
        sb.append( ", CONSTRAINT LAYOUT_PK PRIMARY KEY (MDL_DEFINE_NM, MDL_DEFINE_DT_NM_SEQ))" );
        stmt.executeUpdate( sb.toString() );
        
        stmt.execute( "PRAGMA foreign_keys = ON" );
        stmt.executeUpdate( "insert into LAYOUT values('MSGFW001',1,'E','TRANSACTION_CODE','TransactionCode',1,8,null)" );
        stmt.executeUpdate( "insert into LAYOUT values('MSGFW001',2,'E','DEPTNO','부서번호',2,2,0)" );
        stmt.executeUpdate( "insert into LAYOUT values('MSGFW001',3,'E','DNAME','부서명',1,14,null)" );
        stmt.executeUpdate( "insert into LAYOUT values('MSGFW001',4,'E','DLOC','부서위치',1,13,null)" );
        stmt.executeUpdate( "insert into LAYOUT values('MSGFW001',5,'E','CRUD','CRUD',1,1,null)" );
        stmt.close();
        conn.close();
        
    8. PPAS(Postgres Plus Advanced Server)를 위한 GlueSequence 추가
      이전 버전에서는 GlueJdbcDao bean 생성시 "No Suitable Driver: Not support a sequence incrementer: EnterpriseDB" 라는 로그를 남기고, dao.getSequence() 시에 GlueException 발생
      • com.poscoict.glueframework.dao.sequence.GlueSequenceFactory 수정
      • 에러 로그
        중략 . . 
        [main] DEBUG com.poscoict.glueframework.dao.jdbc.GlueJdbcDao - Loaded JDBC Driver: Postgres Plus Advanced Server Native Driver
        [main] DEBUG com.poscoict.glueframework.dao.jdbc.GlueJdbcDao - Loaded JDBC Driver Version: Postgres Plus Advanced Server 9.3 (9.3.3.8)
        [main] DEBUG com.poscoict.glueframework.dao.jdbc.GlueJdbcDao - DBMS Name: EnterpriseDB
        [main] DEBUG com.poscoict.glueframework.dao.jdbc.GlueJdbcDao - DBMS Version: 9.3.5.14
        [main] DEBUG com.poscoict.glueframework.dao.jdbc.GlueJdbcDao - DBMS URL: jdbc:edb://localhost:5444/edb
        [main] DEBUG com.poscoict.glueframework.dao.jdbc.GlueJdbcDao - Batch Update: true
        [main] WARN  com.poscoict.glueframework.dao.jdbc.GlueJdbcDao - No Suitable Driver: Not support a sequence incrementer: EnterpriseDB
        중략 . . 
        Exception in thread "main" com.poscoict.glueframework.GlueException: Cannot get sequence: sequence object is null
            at com.poscoict.glueframework.dao.jdbc.GlueJdbcDao.getSequence(GlueJdbcDao.java:223)
            at sample.activity.GetSequenceFromEDB.runActivity(GetSequenceFromEDB.java:13)
            at com.poscoict.glueframework.biz.control.GlueService$GlueActivityHandler.runActivity(GlueService.java:166)
            at com.poscoict.glueframework.biz.control.GlueBizControllerImpl.doAction(GlueBizControllerImpl.java:287)
            at test.Test.main(Test.java:51)
        중략 . .
        
      • 사용법 : applictionContext.xml & Java Code
        <bean id="biz-dao" class="com.poscoict.glueframework.dao.jdbc.GlueJdbcDao">
            <property name="dataSource" ref="biz-dataSource"/>
            <property name="queryManager" ref="queryManager"/>
        </bean>
        <bean id="biz-dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
            <property name="driverClassName" value="com.edb.Driver"/>
            <property name="url" value="jdbc:edb://localhost:5444/edb"/>
            <property name="username" value="enterprisedb"/>
            <property name="password" value="password!"/>
            <property name="defaultAutoCommit" value="false"/>
            <property name="minIdle" value="0"/>
            <property name="maxActive" value="-1"/>
            <property name="maxIdle" value="1000"/>
        </bean>
        
        String SEQ = . . .;
        GlueGenericJdbcDao dao = . . .;
        GlueSequence sequence = dao.getSequence();
        Object value = sequence.getNextIntValue( SEQ )