jms

Is it possible to secure whole Controller in Symfony 2?

杀马特。学长 韩版系。学妹 提交于 2020-01-15 04:25:07
问题 I am using JMSSecurityExtra bundle for securing methods in my contoller. But is there any way that i can secure the whole controller with @Secure ? 回答1: This can be done as per Documentaion https://github.com/schmittjoh/JMSSecurityExtraBundle/issues/50 Tip: If you like to secure all actions of the controller with the same rule, you may also specify @PreAuthorize on the class itself. Caution though, this rule is only applied to the methods which are declared in the class. use JMS

Spring integration inbound-gateway Fire an event when queue is empty

空扰寡人 提交于 2020-01-15 03:37:09
问题 I'm a newbie around but I'll try to be consice. {INPUT QUEUE}->[INBOUND-GATEWAY-1]-->[ROUTER]----------->(ACTIVATOR)<--------------- \ / \-->{HOLD QUEUE}--->[INBOUND-GATEWAY-2]--^ I'm having an scenario in which I have to dynamically change routing conditions in a flow like the former. Messages comming from a queue are sent to an activator to be processed, or another queue to be put on hold. At certain time, I have to close INBOUND-GATEWAY-1 so no new messages come into the flow, and open

Exclude null properties in JMS Serializer

半城伤御伤魂 提交于 2020-01-14 17:55:54
问题 My consumed XML API has an option to retrieve only parts of the response. This causes the resulting object to have a lot of NULL properties if this feature is used. Is there a way to actually skip NULL properties? I tried to implement an exclusion strategy with shouldSkipProperty(PropertyMetadata $property, Context $context)` but i realized there is no way to access the current property value. An example would be the following class class Hotel { /** * @Type("string") */ public $id; /** *

Exclude null properties in JMS Serializer

橙三吉。 提交于 2020-01-14 17:54:17
问题 My consumed XML API has an option to retrieve only parts of the response. This causes the resulting object to have a lot of NULL properties if this feature is used. Is there a way to actually skip NULL properties? I tried to implement an exclusion strategy with shouldSkipProperty(PropertyMetadata $property, Context $context)` but i realized there is no way to access the current property value. An example would be the following class class Hotel { /** * @Type("string") */ public $id; /** *

Create durable topic and subscriber spring boot jms with ActiveMQ

落爺英雄遲暮 提交于 2020-01-13 18:18:08
问题 I need to create a topic and a durable subscriber for ActiveMQ, my problem is that I don't know where to specify that. I am able to create the topic and consume the messages, but when I turn off the subscriber then keep sending messages and turn on the subscriber again, it won't read them. This is what I have so far: Sending the message : JmsTemplate jmsTemplate = context.getBean(JmsTemplate.class); jmsTemplate.setPubSubDomain(true); jmsTemplate.setDeliveryMode(DeliveryMode.PERSISTENT);

How to convert a JMS message received using Message Listener to domain object

落花浮王杯 提交于 2020-01-13 10:19:06
问题 I am using: Spring 3.1.1 ActiveMQ 5.6.0 I have two JMS apps: App A uses JmsTemplate to send a domain object using jmsTemplate.convertAndSend(msg); App B uses Message Listener and a Message Converter is registered When the the received message is converted, null values are extracted. I know that this must be fairly simple but I am getting null values and I haven't find an example to see what I am doing wrong. Can some one explain please how this works? Domain Object public class MyDomainObj

Unit testing with JMS (ActiveMQ)

梦想与她 提交于 2020-01-12 14:05:43
问题 How to do unit testing with JMS ? Is it some de-facto for this ? I googled something - Unit testing for JMS: http://activemq.apache.org/how-to-unit-test-jms-code.html - jmsTemplate: activemq.apache.org/jmstemplate-gotchas.html - mockRunner : mockrunner.sourceforge.net/ Do you have any good experience on those and suggestion for me ? 回答1: In my experience (after trying to do the same thing) when you are using JMS you are doing something like 1) Get JMS Message 2) Extract Object from Message 3)

Using a JMS Session from different threads

微笑、不失礼 提交于 2020-01-12 04:46:09
问题 From the javadoc for Session it states: A Session object is a single-threaded context for producing and consuming messages. So I understand that you shouldn't use a Session object from two different threads at the same time . What I'm unclear on is if you could use the Session object (or children such as a Queue) from a different thread than the one it created. In the case I'm working on, I'm considering putting my Session objects into a pool of available sessions that any thread could borrow

WebSphere MQ v7.1 Security User Credentials

核能气质少年 提交于 2020-01-11 03:58:07
问题 Linux Server Box running WebSphere MQ Server v7.1: I have created a user 'mq-user' that belongs to 'mq-users' group in Linux. Then I created a queue manager QM_TEST , and used MQSC to issue the following commands to create a queue and set up the security: SET AUTHREC OBJTYPE(QMGR) PRINCIPAL('mq-user') AUTHADD(ALL) SET AUTHREC PROFILE(SYSTEM.MQEXPLORER.REPLY.MODEL) OBJTYPE(QUEUE) PRINCIPAL('mq-user') AUTHADD(INQ,DSP,GET) SET SET AUTHREC PROFILE(SYSTEM.ADMIN.COMMAND.QUEUE) OBJTYPE(QUEUE)

Which is better: PooledConnectionFactory or CachingConnectionFactory?

。_饼干妹妹 提交于 2020-01-09 12:17:47
问题 We use Spring (3.2.4) with ActiveMQ (5.8.0) in Tomcat (7.0.41) and it is not clear what the best usage. We want to use JmsTemplate to produce and MessageListenerContainer to receive messages. Should we use caching in receiver side? (related link) Works CachingConnectionFactory with ActiveMQ and failover? (related link) Need to set useAsyncSend="true" when we use PooledConnectionFactory? (related link) 回答1: From here: The difference between the PooledConnectionFactory and the