此内容没有您所选择的语言版本。
18.3. Enable Serialization on the Client
Prerequisites
- Server serialization must already be enabled.
Procedure 18.2. Task
- Create a public key certificate from the private keystore. (You can access the keytool by running
keytool -genkey -alias droolsKey -keyalg RSA -keystore
.):keytool -export -alias droolsKey -file droolsKey.crt -keystore
keytool -export -alias droolsKey -file droolsKey.crt -keystore
Copy to Clipboard Copied! Toggle word wrap Toggle overflow MyDroolsPrivateKeyStore.keystore Enter keystore password: Certificate stored in file <droolsKey.crtU>
MyDroolsPrivateKeyStore.keystore Enter keystore password: Certificate stored in file <droolsKey.crtU>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Import the public key certificate into a public keystore. (This is where it will be used by your client applications):
keytool -import -alias droolsKey -file droolsKey.crt -keystore
keytool -import -alias droolsKey -file droolsKey.crt -keystore
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Open the server configuration file:
vi grep drools jboss-as/server/default/deploy/properties-service.xml
- Replace keystoredir and MyPublicDroolsKeyStore.keystore with your keystore directory, and the name of the public keystore you created previously:
Drools Client Properties for Security Serialization
# Drools Client Properties for Security Serialization drools.serialization.public.keyStoreURL=file://$keystoredir/MyPublicDroolsKeyStore.keystore drools.serialization.public.keyStorePwd=drools
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Save the file and exit.
- Restart the JBoss Enterprise SOA Platform server.
- For Java client applications, set the system properties in your code like this:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Alternatively, open therun.sh
shell script (vi SOA_ROOT/jboss-as/bin/run.sh
) script and edit the JAVA_OPTS section:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace the values shown above with ones specific to your environment, and then restart the server instance.