BEA-010157: Only instances of beans with container-managed transaction demarcation can use setRollbackOnly().
라는 error log가 떨어졌다.
이는 container managed transaction이 활성화 되어 있지 않은 상태에서 EJB에서 setRollbackOnly() 함수를 사용했기에 나타나는 error이다.
# container managed transaction이란?
- 컨테이너(JEE 서버)가 transaction의 경계, 시작 시간, commit 또는 rollback을 제어하는 위치로 간주된다. 모든 시작, commit 및 rollback 작업이 container에서 처리되며, 프로세스를 제어하기 위해 특정 코드를 제공하지 않아도 되기에 transaction 관리 process를 단순화한다.
(참고 : https://flylib.com/books/en/2.96.1.202/1/)
# error 해결 방법
- setRollbackOnly() 함수를 사용하기 위해서는 container managed transaction이 사용되어야 한다. setRollbackOnly()를 제거하거나 container managed transaction을 활성화 해야 한다.
# container managed transaction 활성화 방법
- EJB에 존재하는 ejb-jar.xml에 다음과 같은 설정을 해주면 된다.
<transaction-type>Container</transaction-type> |
# 고민해볼 점
=> transcation이니까 webLogic 단에서 처리할 수 있는 옵션이 있지 않을까 개인적인 의문.
JTA(Java Transaction API) 관련된 설정이 있을 수도 있을듯...
'Oracle > TroubleShooting' 카테고리의 다른 글
WebLogic Deploy 시 jndi 관련 error (0) | 2022.07.11 |
---|---|
root로 기동 후 일반 계정으로 weblogic 기동 시 에러 (0) | 2022.07.01 |
java.lang.VerifyError: class net.sf.cglib.core.DebuggingClassWriter (0) | 2022.06.09 |
Broken Pipe (0) | 2022.06.02 |
oracle.jdbc.driver.T4CConnection.logon (0) | 2022.05.03 |