Wildfly 10에서는 MDB의 주석 일부를 관련 리소스 어댑터로 옮기고 싶습니다.Wildfly 10에서 MDB 조회 속성을 Java 소스 코드의 컴파일 타임에 바인딩하지 않고 독립 실행 형 -full.xml에 지정할 수 있습니까?
(참조 페이지에서 여기에 복사) 다음과 같이 MDB에 주석을 달 수 Connect a pooled-connection-factory to a Remote Artemis Server 하나에 따르면 : 시간을 호출하는 컴파일 타임에서 조회 결정을 연기 할 수있는 방법이
@ResourceAdapter("remote-artemis")
@MessageDriven(name = "MyMDB", activationConfig = {
@ActivationConfigProperty(propertyName = "useJNDI", propertyValue = "false"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "myQueue"),
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge")
})
public class MyMDB implements MessageListener {
//
}
있습니까? "
@ResourceAdapter("my-remote")
@MessageDriven(name = "MyMDB", activationConfig = {
//try specifying the next 2 properties in the configuration file
//@ActivationConfigProperty(propertyName = "useJNDI", propertyValue = "false"),
//@ActivationConfigProperty(propertyName = "destination", propertyValue = "myQueue"),
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge")
})
public class MyMDB implements MessageListener {
//
}
을 그리고 구성 내 - : 내 독립-full.xml
나는 다음과 같이 MDB에 주석을 시도의 속성"useJNDI "와"대상 "의 값을 지정하고 싶습니다 독립-full.xml에서 "원격 다음과 같이
<pooled-connection-factory name="my-remote" entries="jms/RemoteCF"
connectors="batch-connector" consumer-window-size="0"
useJNDI="false" destination="myQueue"
user="user" password="password" />
그러나 다음과 같은 오류 메시지가 점점 :
Message: WFLYCTL0376: Unexpected attribute 'useJNDI' encountered. Valid attributes are: 'entries, discovery-group, connectors, ha, client-failure-check-period, connection-ttl, call-timeout, call-failover-timeout, consumer-window-size, consumer-max-rate, confirmation-window-size, producer-window-size, producer-max-rate, protocol-manager-factory, compress-large-messages, cache-large-message-client, min-large-message-size, client-id, dups-ok-batch-size, transaction-batch-size, block-on-acknowledge, block-on-non-durable-send, block-on-durable-send, auto-group, pre-acknowledge, retry-interval, retry-interval-multiplier, max-retry-interval, reconnect-attempts, failover-on-initial-connection, connection-load-balancing-policy-class-name, use-global-pools, scheduled-thread-pool-max-size, thread-pool-max-size, group-id, transaction, user, password, min-pool-size, use-auto-recovery, max-pool-size, managed-connection-pool, enlistment-trace, initial-message-packet-size, initial-connect-attempts'
컴파일 타임에 조회 속성을 지정해야합니까?
하나의 Wildfly 인스턴스가 jndi를 사용하여 조회해야하고 non-JNDI 이름을 사용하여 다른 조회를해야하는 경우, 실제로는 약간 다르게 주석 처리 된 두 개의 MDB를 작성해야합니까?
리조트 어댑터가 xml에 구성되어 있으면 @ResourceAdapter를 제외하고 mdb 주석이 필요하지 않습니다. – Nicholas