-
JEUS DOMAIN_WIDE Session 공유WAS/JEUS 2024. 11. 25. 14:23

개발 목적으로 Webtob/JEUS 구성을 위한 분들을 위한 가이드 포스팅 :)
TmaxSoft Engineer의 설치방식으로 진행되며, JEUS는 11년 연속 국내 1위 미들웨어입니다.
▶ 내용
DOMAIN_WIDE 모드는 JEUS 도메인의 구조적 스펙과는 다소 상충됩니다.
그래서 TmaxSoft는 특별한 상황이 아니라면 DOMAIN_WIDE를 권고하지 않습니다.
즉, 사용자 편의를 위해 제공되는 설정입니다.
이를 통해 가장 넓은 범위에서 세션 공유를 가능하게 하며, 간편한 설정으로 강력한 기능을 제공합니다.
▶ 특징
1. 웹 애플리케이션에 한정된 영향
• 이 설정은 EJB(Enterprise Java Bean)와는 전혀 관련이 없으며, 오직 웹 애플리케이션에만 영향을 미칩니다.
• 웹 애플리케이션의 세션 관리에 있어 편리한 기능을 제공합니다.
2. 클러스터링 설정과의 관계
• DOMAIN_WIDE 모드를 클러스터링 설정과 동시에 적용할 경우, 클러스터 설정이 무시될 가능성이 있습니다.
• 이는 클러스터를 활용한 세션 분산 및 복제 방식을 대체하기 때문에 발생하는 현상입니다.
3. 도메인 전체에 적용
• 설정 시 도메인 내의 모든 서버(domain.xml에 정의된)에 대해 적용되며, 특정 서버에만 선택적으로 적용하는 것은 불가능합니다.
• 따라서, 전체 도메인 구조에 대한 명확한 이해와 설계가 필요합니다.
4. 강제 세션 공유
• <shared> 옵션이 true로 설정되면, 도메인 내 모든 서버의 모든 애플리케이션에서 세션이 강제로 공유됩니다.
- DOMAIN_WIDE <shared>에 대해서는 패치 이력이 있습니다.(반영: JEUS 통합패치 2024.05_2)
• 이로 인해 애플리케이션 간 세션 충돌이나 예기치 못한 동작이 발생할 수 있으니, 적용 전에 신중한 검토가 필요합니다.
▶ 주의
1. 도메인 구조의 제약 이해하기
DOMAIN_WIDE 모드는 편리함을 제공하지만, 도메인의 기본적인 설계 규칙과 상충될 수 있습니다. 이로 인해 발생할 수 있는 문제를 사전에 파악하고 구조적인 영향을 검토해야 합니다.
2. 클러스터링 설정과의 상호작용 확인
클러스터링을 통한 세션 관리가 필요하다면 DOMAIN_WIDE 모드가 적합하지 않을 수 있습니다. 특정 워크로드나 요구 사항에 따라 적합한 설정을 선택해야 합니다.
3. 적용 범위의 제한
도메인 내의 모든 서버에 적용되므로, 일부 서버에서만 세션 공유가 필요한 경우에는 다른 방식을 고려해야 합니다.
▶ 설정
[ENV]
OS: Red Hat Enterprise Linux release 9.4
JAVA: openjdk version "11.0.24" 2024-07-16 LTS
WEB: WebtoB 5.0.0.4
WAS: JEUS8.5 - 2024.05_2 patch
[Draw.io]

[Work Flow]
1. Set Config
2. JEUS Restart
3. 호출 테스트
[ 1.Set Config > Session Mode : DOMAIN_WIDE ]

※ Exclude Das In Cluster : Cluster에 DAS를 강제로 참여하고 싶지 않을 때 설정한다. 도메인 와이드 모드일 경우에 의미가 있다.
true : 클러스터에 DAS가 포함되어 있더라도 클러스터링에 참여하지 않고 Stand-alone 동작.false : DAS를 다른 서버들과 동일하게 취급하여 클러스터링 참여 여부에 맞게 동작.(기본값)
※ Sticky Encoding Rule : BASE64 모드는 Base64 암호화 알고리즘을 사용/ RAW 모드는 인코딩 없이 doamin name, server name을 사용한다.
[ 2.JEUS Restart > 전체 재기동 ]

※ Need To Restart : 'true'로 출력된 서버는 설정 내용의 반영을 위해 재시작이 필요.
[jeus@admin:/home/jeus]$ dsa Attempting to connect to admin:10000. The connection has been established to Domain Administration Server adminServer in the domain jeus_domain. JEUS 8.5 Administration Tool To view help, use the 'help' command. [DAS]jeus_domain.adminServer>downall Executing this command affects the service. Do you want to continue? (y/n)y Stopping servers [admin-server1, adminServer, node1-server1]. Stop server message to all managed servers in the domain were successfully sent. Unable to shut down Domain Administration Server. To shutdown Domain Administration Server, use the jeusadmin's "local-shutdown" command instead.' [DAS]jeus_domain.adminServer>exit [jeus@admin:/home/jeus]$ dsdown Attempting to connect to admin:10000. The connection has been established to Domain Administration Server adminServer in the domain jeus_domain. The server [adminServer] has been shut down successfully. [jeus@admin:/home/jeus]$ dsboot ... [2024.11.25 02:07:07:708][0] [adminServer-1] [SERVER-0242] Successfully started the server. [2024.11.25 02:07:07:708][2] [adminServer-1] [SERVER-0248] The JEUS server is RUNNING. [2024.11.25 02:07:07][2] [launcher-15] [Launcher-0034] The server[adminServer] initialization completed successfully[pid : 1277]. [2024.11.25 02:07:07][0] [launcher-1] [Launcher-0040] Successfully started the server[adminServer]. The server state is now RUNNING. [jeus@admin:/home/jeus]$ dsa Attempting to connect to admin:10000. The connection has been established to Domain Administration Server adminServer in the domain jeus_domain. JEUS 8.5 Administration Tool To view help, use the 'help' command. [DAS]jeus_domain.adminServer>bootall Starting servers [admin-server1, node1-server1]. All managed servers in the domain have been successfully started.[ 3.호출 테스트 > session.jsp ]
First URL : localhost:20080/kior1/session.jsp

Second URL : localhost:20080/kior2/session.jsp

▶ Deep Dive
동작에 대해서 더 자세하게 session의 움직임을 확인하기 위하여
LOG Logger를 session을 추가하여 'FINEST'로 하여 로그를 확인합니다.
[ 1.Logger 설정 > jeus.session ]
# webadmin > Servers > 해당 Managed Server > System Logging > ADD(Lock & EDIT)


# webadmin > Servers > 해당 Managed Server > System Logging > jeus.session > FILE HANDLER


반드시 파란색 버튼(확인) 그리고 Activate Changes
로거 설정은 '동적'반영입니다!
[ 2.호출 테스트 > session.jsp ]
/kior1/session.jsp 그리고 /kior2/session.jsp를 차례대로 호출하였습니다.(위와 동일)
Session ID는
"0X1pwQL1a0e6i4LmBV87Gx3Zd4FO2w15EmuqUPIaq5ybphgtv1L1Eyq3Bes13Kxt.jeus_domain/admin-server1" 입니다.
[ 3.로그 분석 > jeus.session.log ]
# admin-server1
[2024.11.25 03:57:31][4] [admin-server1-45] [SESSION-2000] JeusDistributedSessionManager[admin-server1]: Starting session checking... • JeusDistributedSessionManager에서 세션 상태 점검을 시작. > 이는 서버 내에 존재하는 로컬 세션을 검사하는 작업. [2024.11.25 03:57:31][4] [admin-server1-45] [SESSION-2002] JeusDistributedSessionManager[admin-server1]: Local session is Empty... • 로컬 서버(admin-server1)에서 관리 중인 세션이 존재하지 않음.[2024.11.25 04:00:27][6] [admin-server1-57] [SESSION-0110] < JeusDistributedSessionManager[admin-server1] > : Finding the session(S1JRGUO1wW17314099527163O3cQbBUeKpTLtQGymxb0FEHXrJwqe1YzIBT1Gvj0mZjFjQCVFogT1.jeus_domain/adminServer)... • 특정 세션(S1JRGUO1...)을 검색하는 과정. [2024.11.25 04:00:27][5] [admin-server1-57] [D_SESSION-1322] This lock will be used to sync the session(id: S1JRGUO1wW17314099527163O3cQbBUeKpTLtQGymxb0FEHXrJwqe1YzIBT1Gvj0mZjFjQCVFogT1). lock object: jeus.sessionmanager.servlet.impl.distributed.JeusDistributedWebSessionManager$RemoteSessionJobMonitor@54b0c786 • 세션 동기화를 위해 lock object를 생성 및 사용. [2024.11.25 04:00:27][5] [admin-server1-57] [D_SESSION-1324] This thread try to get the session(id:S1JRGUO1wW17314099527163O3cQbBUeKpTLtQGymxb0FEHXrJwqe1YzIBT1Gvj0mZjFjQCVFogT1). lock object: jeus.sessionmanager.servlet.impl.distributed.JeusDistributedWebSessionManager$RemoteSessionJobMonitor@54b0c786 • 로컬 서버에서 세션을 찾을 수 없음. > 원격 서버에 세션이 존재하는지 확인하는 단계. [2024.11.25 04:00:27][4] [admin-server1-57] [D_SESSION-1302] <JeusDistributedSessionManager[admin-server1]> Finding the session(S1JRGUO1wW17314099527163O3cQbBUeKpTLtQGymxb0FEHXrJwqe1YzIBT1Gvj0mZjFjQCVFogT1)... trying the remote server... • 특정 세션(S1JRGUO1...)을 검색하는 과정. [2024.11.25 04:00:27][5] [admin-server1-57] [D_SESSION-1325] Trying to get the session(id:S1JRGUO1wW17314099527163O3cQbBUeKpTLtQGymxb0FEHXrJwqe1YzIBT1Gvj0mZjFjQCVFogT1) has done and the lock object was removed. lock object: jeus.sessionmanager.servlet.impl.distributed.JeusDistributedWebSessionManager$RemoteSessionJobMonitor@54b0c786} • 세션 동기화 작업이 완료. > 해당 락 객체(RemoteSessionJobMonitor)를 제거.
해당 과정을 2번 진행합니다...
이유는? 모르겠습니다 ㅎㅎ...
굳이 세션이 없는데... 굳이 찾는 로직이 있어서...
알게되면 남겨두겠습니다 :)
[2024.11.25 04:00:27][4] [admin-server1-57] [SESSION-2500] JeusDistributedSessionManager[admin-server1]: Notifying about a session creation(id=0X1pwQL1a0e6i4LmBV87Gx3Zd4FO2w15EmuqUPIaq5ybphgtv1L1Eyq3Bes13Kxt.jeus_domain/admin-server1). • 새로운 세션(0X1pwQL1...)이 생성되었음을 알림. > 세션 생성이 완료된 시점에서 관련 이벤트가 발생. [2024.11.25 04:00:27][4] [admin-server1-57] [SESSION-2505] admin-server1: Notifying about a session Serialization(id=0X1pwQL1a0e6i4LmBV87Gx3Zd4FO2w15EmuqUPIaq5ybphgtv1L1Eyq3Bes13Kxt.jeus_domain/admin-server1). • 생성된 세션의 직렬화(serialization)를 시작. > 직렬화는 세션 객체를 바이트 데이터로 변환하여 저장하거나, 백업 서버로 전송하는 과정을 의미. [2024.11.25 04:00:27][6] [admin-server1-57] [D_SESSION-2701] <BackupManager> Serializing the backup session. id = 0X1pwQL1a0e6i4LmBV87Gx3Zd4FO2w15EmuqUPIaq5ybphgtv1L1Eyq3Bes13Kxt, bytes length = 100 • 새로운 세션(0X1pwQL1...)의 백업 데이터를 직렬화. > 직렬화된 데이터 크기가 100 바이트. [2024.11.25 04:00:27][6] [admin-server1-52] [D_SESSION-3113] Beginning to send backup sessions to the backup server<[node1-server1]> . count = 1 • 백업 서버(node1-server1)로 직렬화된 세션을 전송하기 시작. > 이번 전송에서는 총 1개의 세션이 전송. [2024.11.25 04:00:27][2] [admin-server1-52] [D_SESSION-3105] <admin-server1> Successfully sent backup session(s) to the backup server( node1-server1 ). count = 1 • admin-server1에서 node1-server1로 세션 백업 전송이 성공적으로 완료. • 전송된 세션의 개수는 1개. [2024.11.25 04:00:55][4] [admin-server1-23] [SESSION-2505] admin-server1: Notifying about a session Serialization(id=0X1pwQL1a0e6i4LmBV87Gx3Zd4FO2w15EmuqUPIaq5ybphgtv1L1Eyq3Bes13Kxt.jeus_domain/admin-server1). • 이전과 동일한 세션(0X1pwQL1...)의 직렬화 작업이 다시 시작. > 이는 백업 데이터 갱신이나 세션 내용 업데이트와 관련. [2024.11.25 04:00:55][6] [admin-server1-25] [D_SESSION-3119] Successfully receive the update session from node1-server1 id = 0X1pwQL1a0e6i4LmBV87Gx3Zd4FO2w15EmuqUPIaq5ybphgtv1L1Eyq3Bes13Kxt • node1-server1에서 업데이트된 세션 데이터를 성공적으로 수신했음을 알림. > 세션 ID(0X1pwQL1...)와 관련된 변경 사항이 반영.< 다른 Managed Server(node1-server1) 동작>
[2024.11.25 03:57:31][4] [node1-server1-45] [SESSION-2000] JeusDistributedSessionManager[node1-server1]: Starting session checking... • JeusDistributedSessionManager가 세션 점검을 시작. [2024.11.25 03:57:31][4] [node1-server1-45] [SESSION-2002] JeusDistributedSessionManager[node1-server1]: Local session is Empty... • JeusDistributedSessionManager가 세션 점검을 시작. [2024.11.25 04:00:27][6] [node1-server1-24] [D_SESSION-3111] The backup session was received. id = 0X1pwQL1a0e6i4LmBV87Gx3Zd4FO2w15EmuqUPIaq5ybphgtv1L1Eyq3Bes13Kxt • node1-server1이 백업 세션을 수신했음을 나타냄. [2024.11.25 04:00:27][2] [node1-server1-24] [D_SESSION-3103] Successfully received backup sessions from <admin-server1> . count = 1# node1-server1
[2024.11.25 04:00:55][6] [node1-server1-59] [SESSION-0110] < JeusDistributedSessionManager[node1-server1] > : Finding the session(0X1pwQL1a0e6i4LmBV87Gx3Zd4FO2w15EmuqUPIaq5ybphgtv1L1Eyq3Bes13Kxt.jeus_domain/admin-server1)... • 메시지에서 특정 세션 ID에 대한 탐색이 시작. [2024.11.25 04:00:55][5] [node1-server1-59] [D_SESSION-1322] This lock will be used to sync the session(id: 0X1pwQL1a0e6i4LmBV87Gx3Zd4FO2w15EmuqUPIaq5ybphgtv1L1Eyq3Bes13Kxt). lock object: jeus.sessionmanager.servlet.impl.distributed.JeusDistributedWebSessionManager$RemoteSessionJobMonitor@42f70126 • 세션 동기화를 위해 lock object를 생성 및 사용. [2024.11.25 04:00:55][5] [node1-server1-59] [D_SESSION-1324] This thread try to get the session(id:0X1pwQL1a0e6i4LmBV87Gx3Zd4FO2w15EmuqUPIaq5ybphgtv1L1Eyq3Bes13Kxt). lock object: jeus.sessionmanager.servlet.impl.distributed.JeusDistributedWebSessionManager$RemoteSessionJobMonitor@42f70126 • 로컬 서버에서 세션을 찾을 수 없으므로, 원격 서버에 세션이 존재하는지 확인하는 단계. [2024.11.25 04:00:55][4] [node1-server1-59] [D_SESSION-1302] <JeusDistributedSessionManager[node1-server1]> Finding the session(0X1pwQL1a0e6i4LmBV87Gx3Zd4FO2w15EmuqUPIaq5ybphgtv1L1Eyq3Bes13Kxt)... trying the remote server... • 특정 세션(S1JRGUO1...)을 검색하는 과정. [2024.11.25 04:00:55][5] [node1-server1-59] [D_SESSION-1307] Finding primary session(0X1pwQL1a0e6i4LmBV87Gx3Zd4FO2w15EmuqUPIaq5ybphgtv1L1Eyq3Bes13Kxt) from server(admin-server1). • node1-server1이 원격 서버(admin-server1)에서 기본(primary) 세션을 찾으려고 시도. [2024.11.25 04:00:55][6] [node1-server1-59] [D_SESSION-1309] Getting the session(id: 0X1pwQL1a0e6i4LmBV87Gx3Zd4FO2w15EmuqUPIaq5ybphgtv1L1Eyq3Bes13Kxt, fromBackup: false) from remote server(admin-server1}. • 원격 서버로부터 세션이 성공적으로 가져와짐. [2024.11.25 04:00:55][4] [node1-server1-59] [SESSION-2506] node1-server1: Notifying about a session DeSerialization(id=0X1pwQL1a0e6i4LmBV87Gx3Zd4FO2w15EmuqUPIaq5ybphgtv1L1Eyq3Bes13Kxt.jeus_domain/admin-server1). • session에 대해서 역직렬화 알림. [2024.11.25 04:00:55][4] [node1-server1-59] [D_SESSION-1305] JeusDistributedSessionManager[node1-server1]: Finding the session(0X1pwQL1a0e6i4LmBV87Gx3Zd4FO2w15EmuqUPIaq5ybphgtv1L1Eyq3Bes13Kxt)... it was found on remote server(admin-server1). • 세션이 원격 서버에서 발견되었음을 확인. [2024.11.25 04:00:55][5] [node1-server1-59] [D_SESSION-1325] Trying to get the session(id:0X1pwQL1a0e6i4LmBV87Gx3Zd4FO2w15EmuqUPIaq5ybphgtv1L1Eyq3Bes13Kxt) has done and the lock object was removed. lock object: jeus.sessionmanager.servlet.impl.distributed.JeusDistributedWebSessionManager$RemoteSessionJobMonitor@42f70126} • get Session 완료 후 잠금 object를 제거.[2024.11.25 04:00:55][4] [node1-server1-59] [D_SESSION-1327] The copied session(id:0X1pwQL1a0e6i4LmBV87Gx3Zd4FO2w15EmuqUPIaq5ybphgtv1L1Eyq3Bes13Kxt}) was removed because it is not used anymore. • 더 이상 사용하지 않음으로 복제된 session 제거. [2024.11.25 04:00:55][6] [node1-server1-59] [D_SESSION-3116] Beginning to update session to the server<admin-server1> . • session 정보 업데이트 [2024.11.25 04:00:55][4] [node1-server1-59] [SESSION-2505] node1-server1: Notifying about a session Serialization(id=0X1pwQL1a0e6i4LmBV87Gx3Zd4FO2w15EmuqUPIaq5ybphgtv1L1Eyq3Bes13Kxt.jeus_domain/admin-server1). • 생성된 세션의 직렬화(serialization)를 시작합니다. • 직렬화는 세션 객체를 바이트 데이터로 변환하여 저장하거나, 백업 서버로 전송하는 과정을 의미합니다. [2024.11.25 04:00:55][4] [node1-server1-59] [D_SESSION-3117] Successfully update session to server<admin-server1> . id = ( 0X1pwQL1a0e6i4LmBV87Gx3Zd4FO2w15EmuqUPIaq5ybphgtv1L1Eyq3Bes13Kxt ). [2024.11.25 04:00:55][6] [node1-server1-22] [D_SESSION-3111] The backup session was received. id = 0X1pwQL1a0e6i4LmBV87Gx3Zd4FO2w15EmuqUPIaq5ybphgtv1L1Eyq3Bes13Kxt [2024.11.25 04:00:55][2] [node1-server1-22] [D_SESSION-3103] Successfully received backup sessions from <admin-server1> .
로그를 통해서 JEUS Session Server에 대한 동작을 100% 알 수 없습니다..
단, 대략적으로 동작 흐름을 알 수 있습니다.
JEUS7 이상부터는 무조건 Ring 구조를 가지며 instance 상태가
Live일 경우 scope 단위에서 해당 원격지에서찾는 것을 확인했습니다.
물론 Primary-Backup에 한계가 있지만 JEUS8.5부터는 옵션으로 전체 세션 테이블에서 조회하는
full-search 옵션이 존재합니다.
▶ 결론
JEUS DOMAIN_WIDE Session 공유는 단일 설정으로
도메인 내 모든 서버의 세션을 공유할 수 있는 강력한 기능을 제공합니다.
단, 설정 간섭 및 도메인 구조에 미치는 영향을 충분히 이해하고
적용해야 안정적인 서비스를 운영할 수 있습니다.(예: System Memory)

'WAS > JEUS' 카테고리의 다른 글
JEUS 중복로그인 설정 2탄 (Cluster Mode. DEFAULT) (0) 2025.05.13 JEUS 중복로그인 설정 1탄 (0) 2025.05.13 JEUS 웹어드민(webadmin) 특정 IP 허용 외 차단 (0) 2024.06.05 JEUS 2024년 변경된 Demo License 발급 정책 (0) 2024.03.14 JEUS n 중화 설정 (0) 2024.02.19