This is an automated email from the ASF dual-hosted git repository.
jbertram pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-website.git
The following commit(s) were added to refs/heads/main by this push:
new c0e457974 NO-JIRA try to fix formatting
c0e457974 is described below
commit c0e457974fdde27e9f8aaf7c2c463c39bda85ff7
Author: Justin Bertram <[email protected]>
AuthorDate: Thu Feb 2 14:12:10 2023 -0600
NO-JIRA try to fix formatting
---
src/objectmessage.md | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/objectmessage.md b/src/objectmessage.md
index e485c1b42..60e9b80d3 100644
--- a/src/objectmessage.md
+++ b/src/objectmessage.md
@@ -30,17 +30,18 @@ will add `com.mycompany.myapp` package to the list of
trusted packages. Note tha
On the client side, you need to have this same mechanism as malicious code can
be deserialized on `ObjectMessage.getObject()` call, compromising your
application's environment. You can use the same configuration mechanism on the
broker and configure trusted classes using system properties. However, this is
usually not convenient in the client applications, so in **5.12.2** andĀ
**5.13.1** we introduced additional configuration mechanism using
`ActiveMQConnectionFactory`. There are two add [...]
* The `setTrustedPackages()` method allows you to set the list of trusted
packages you want to be to unserialize, like
-```
+```java
ActiveMQConnectionFactory factory = new
ActiveMQConnectionFactory("tcp://localhost:61616");
factory.setTrustedPackages(new
ArrayList(Arrays.asList("org.apache.activemq.test,org.apache.camel.test".split(","))));
```
* TheĀ `setTrustAllPackages()` allows you to turn off security check and
trust all classes. It's useful for testing purposes.
-```
+```java
ActiveMQConnectionFactory factory = new
ActiveMQConnectionFactory("tcp://localhost:61616");
factory.setTrustAllPackages(true);
```
You can set the same properties in Camel context like:
-```
+
+```xml
<bean id="connectionFactory"
class="org.apache.activemq.spring.ActiveMQConnectionFactory">
<property name="brokerURL" value="tcp://localhost:61616"/>
<property name="trustedPackages">
@@ -57,8 +58,10 @@ You can set the same properties in Camel context like:
<property name="configuration" ref="jmsConfig"/>
</bean>
```
+
or
-```
+
+```xml
<bean id="connectionFactory"
class="org.apache.activemq.spring.ActiveMQConnectionFactory">
<property name="brokerURL" value="tcp://localhost:61616"/>
<property name="trustAllPackages" value="true"/>
@@ -70,5 +73,6 @@ or
<property name="configuration" ref="jmsConfig"/>
</bean>
```
+
This configuration will override system properties if they are set.