5.3. 런타임 빈 배포 정보

빈 배포에서 런타임 메타데이터를 사용할 수 있으므로 빈의 성능을 모니터링할 수 있습니다.

런타임 메타데이터는 다음 유형의 빈에 사용할 수 있습니다.

  • 상태 저장 세션 빈
  • 상태 비저장 세션 빈
  • Singleton 빈
  • 메시지 중심 빈

빈 애플리케이션에는 코드 또는 배포 설명자에 있는 주석으로 메타데이터가 포함됩니다. 애플리케이션은 두 옵션을 모두 사용할 수 있습니다. 사용 가능한 런타임 데이터에 대한 자세한 내용은 JBoss EAP 관리 모델의 tekton 3 하위 시스템을 참조하십시오.

추가 리소스

5.3.1. Jakarta Enterprisehieras에서 런타임 데이터를 검색하기 위한 명령줄 옵션

Jakarta Enterprisehieras의 런타임 데이터는 관리 CLI에서 제공되므로 Jakarta Enterprisehieras의 성능을 평가할 수 있습니다.

모든 유형의 빈에 대한 런타임 데이터를 검색하는 명령은 다음 패턴을 사용합니다.

/deployment=<deployment_name>/subsystem=ejb3/<bean_type>=<bean_name>:read-resource(include-runtime)

<deployment_name> 을 런타임 데이터를 검색할 배포 .jar 파일의 이름으로 바꿉니다. <bean_type> 을 런타임 데이터를 검색할 빈 유형으로 바꿉니다. 이 자리 표시자에 대해 유효한 옵션은 다음과 같습니다.

  • stateless-session-bean
  • stateful-session-bean
  • singleton-bean
  • message-driven-bean

<bean_name> 을 런타임 데이터를 검색할 빈 이름으로 바꿉니다.

이 시스템은 JSON(JavaScript Object Notation) 데이터로 stdout 형식으로 결과를 제공합니다.

dpdk -management.jar라는 파일에 배포된 ManagedSingletonBean 이라는 Singleton 빈의 런타임 데이터를 검색하는 명령의 예

/deployment=ejb-management.jar/subsystem=ejb3/singleton-bean=ManagedSingletonBean:read-resource(include-runtime)

Singleton 빈의 출력 런타임 데이터 예

{
    "outcome" => "success",
    "result" => {
        "async-methods" => ["void async(int, int)"],
        "business-local" => ["sample.ManagedSingletonBean"],
        "business-remote" => ["sample.BusinessInterface"],
        "component-class-name" => "sample.ManagedSingletonBean",
        "concurrency-management-type" => undefined,
        "declared-roles" => [
            "Role3",
            "Role2",
            "Role1"
        ],
        "depends-on" => undefined,
        "execution-time" => 156L,
        "init-on-startup" => false,
        "invocations" => 3L,
        "jndi-names" => [
            "java:module/ManagedSingletonBean!sample.ManagedSingletonBean",
            "java:global/ejb-management/ManagedSingletonBean!sample.ManagedSingletonBean",
            "java:app/ejb-management/ManagedSingletonBean!sample.ManagedSingletonBean",
            "java:app/ejb-management/ManagedSingletonBean!sample.BusinessInterface",
            "java:global/ejb-management/ManagedSingletonBean!sample.BusinessInterface",
            "java:module/ManagedSingletonBean!sample.BusinessInterface"
        ],
        "methods" => {"doIt" => {
            "execution-time" => 156L,
            "invocations" => 3L,
            "wait-time" => 0L
        }},
        "peak-concurrent-invocations" => 1L,
        "run-as-role" => "Role3",
        "security-domain" => "other",
        "timeout-method" => "public void sample.ManagedSingletonBean.timeout(javax.ejb.Timer)",
        "timers" => [{
            "time-remaining" => 4304279L,
            "next-timeout" => 1577768415000L,
            "calendar-timer" => true,
            "persistent" => false,
            "info" => "timer1",
            "schedule" => {
                "year" => "*",
                "month" => "*",
                "day-of-month" => "*",
                "day-of-week" => "*",
                "hour" => "0",
                "minute" => "0",
                "second" => "15",
                "timezone" => undefined,
                "start" => undefined,
                "end" => undefined
            }
        }],
        "transaction-type" => "CONTAINER",
        "wait-time" => 0L,
        "service" => {"timer-service" => undefined}
    }
}

tekton- management.jar라는 파일에 배포된 NoTimerMDB 라는 메시지 기반 빈의 런타임 데이터를 검색하는 명령의 예

/deployment=ejb-management.jar/subsystem=ejb3/message-driven-bean=NoTimerMDB:read-resource(include-runtime)

메시지 기반 빈의 출력 예

{
    "outcome" => "success",
    "result" => {
        "activation-config" => [
            ("destination" => "java:/queue/NoTimerMDB-queue"),
            ("destinationType" => "javax.jms.Queue"),
            ("acknowledgeMode" => "Auto-acknowledge")
        ],
        "component-class-name" => "sample.NoTimerMDB",
        "declared-roles" => [
            "Role3",
            "Role2",
            "Role1"
        ],
        "delivery-active" => true,
        "execution-time" => 0L,
        "invocations" => 0L,
        "message-destination-link" => "queue/NoTimerMDB-queue",
        "message-destination-type" => "javax.jms.Queue",
        "messaging-type" => "javax.jms.MessageListener",
        "methods" => {},
        "peak-concurrent-invocations" => 0L,
        "pool-available-count" => 16,
        "pool-create-count" => 0,
        "pool-current-size" => 0,
        "pool-max-size" => 16,
        "pool-name" => "mdb-strict-max-pool",
        "pool-remove-count" => 0,
        "run-as-role" => "Role3",
        "security-domain" => "other",
        "timeout-method" => undefined,
        "timers" => [],
        "transaction-type" => "CONTAINER",
        "wait-time" => 0L,
        "service" => undefined
    }
}