项目作者: marschall

项目描述 :
A JNDI ObjectFactory for a PolicyRegistration.
高级语言: Java
项目地址: git://github.com/marschall/policy-registration-factory.git
创建时间: 2016-12-07T18:25:22Z
项目社区:https://github.com/marschall/policy-registration-factory

开源协议:

下载


Policy Registration Factory Javadocs Maven Central

A JNDI ObjectFactory for a PolicyRegistration. This is a work around for SECURITY-864.

This uses deprecated API that is likely going away with Elytron.

Two classes are offered


com.github.marschall.policyregistrationfactory.EmptyPolicyRegistrationObjectFactory

Creates a PolicyRegistration that always throws an UnsupportedOperationException. Useful for cases when a PolicyRegistration is not needed but a lookup happens anyway.

com.github.marschall.policyregistrationfactory.JBossPolicyRegistrationObjectFactory

Creates a new JBossPolicyRegistration.

Installation

You need to create a JBoss module

  • put the jar in a ${JBOSS_HOME}/modules/system/layers/base/com/github/marschall/policyregistrationfactory/main folder (or whatever your distribution layer is)
  • add a module.xml to the folder into which you put the jar, you can take the one from the root of the JAR
  • configure the object factory and bind it to a name

For EmptyPolicyRegistrationObjectFactory add the following to your server configuration (eg. standalone.xml)

  1. <subsystem xmlns="urn:jboss:domain:naming:2.0">
  2. <bindings>
  3. <object-factory
  4. name="java:/policyRegistration"
  5. module="com.github.marschall.policyregistrationfactory"
  6. class="com.github.marschall.policyregistrationfactory.EmptyPolicyRegistrationObjectFactory"></object-factory>
  7. </bindings>
  8. </subsystem>

For JBossPolicyRegistrationObjectFactory add the following to your server configuration (eg. standalone.xml)

  1. <subsystem xmlns="urn:jboss:domain:naming:2.0">
  2. <bindings>
  3. <object-factory
  4. name="java:/policyRegistration"
  5. module="com.github.marschall.policyregistrationfactory"
  6. class="com.github.marschall.policyregistrationfactory.JBossPolicyRegistrationObjectFactory"></object-factory>
  7. </bindings>
  8. </subsystem>