こんにちは!
私はgrails jmsと大気プラグインを使用しています...
springSecurityService を Jms-Atmosphere Service クラスに注入しようとすると、このオブジェクトへの参照がある間、プリンシパル/currentUser が null になります (springSecurityService は null ではありません)。
//Grails Service class
class UserMessageService {
static transactional = true
static exposes = ['jms']
static destination = "queue.usermessage"
def jmsService
def springSecurityService
public def onMessage(msg) {
sleep(2000) // slow it down
log.info "sending jms mssage"
//User is null!!
User user = springSecurityService.currentUser
jmsService.send(topic:'msgevent', msg)
return null
}
}
だから私は疑問に思っています...
それはプラグインの問題ですか、それともjmsプラグインから公開されたイベントを(イベントリスナーとして)リッスンする際の問題ですか? Atmosphere プラグインを使用して Atmosphere Handler をサービスとして使用すると、同じ問題が発生します。この場合、雰囲気サービスも JMS イベントに公開する必要があります。これに対処するためのアイデアを教えてください...おそらく回避策...ありがとう