[Design of POJO Server] - Re: jboss.xml service-ref
by scott.stark@jboss.org
The general approach we are taking is to make the jboss metadata an extension of any corresponding spec metadata. The JBossServiceReferenceMetaData would then include the javaee:service-refGroup and jboss:service-refGroup types for something like:
| package org.jboss.metadata.javaee.jboss;
|
| import javax.xml.bind.annotation.XmlElement;
| import javax.xml.bind.annotation.XmlType;
| import javax.xml.namespace.QName;
|
| import org.jboss.metadata.javaee.spec.PortComponentRef;
| import org.jboss.metadata.javaee.spec.ResourceInjectionMetaData;
| import org.jboss.metadata.javaee.spec.ServiceReferenceHandlerChainsMetaData;
| import org.jboss.metadata.javaee.spec.ServiceReferenceHandlersMetaData;
| import org.jboss.metadata.javaee.spec.ServiceReferenceMetaData;
| import org.jboss.metadata.javaee.support.MergeableMappedMetaData;
|
| @XmlType(name="service-refType")
| public class JBossServiceReferenceMetaData
| extends ResourceInjectionMetaData
| implements MergeableMappedMetaData<JBossServiceReferenceMetaData>
| {
| /** The serialVersionUID */
| private static final long serialVersionUID = 1;
|
| /** The service interface */
| private String serviceInterface;
|
| /** The service reference type */
| private String serviceRefType;
|
| /** The wsdl file */
| private String wsdlFile;
|
| /** The jaxrpc mapping file */
| private String jaxrpcMappingFile;
|
| /** The service qname */
| private QName serviceQname;
|
| /** The port-component-ref */
| private PortComponentRef portComponentRef;
|
| /** The handlers */
| private ServiceReferenceHandlersMetaData handlers;
|
| /** The handler chains */
| private ServiceReferenceHandlerChainsMetaData handlerChains;
|
| /** The service-impl-class */
| private String serviceClass;
|
| /** The config-name */
| private String configName;
| /** The config-file */
| private String configFile;
|
| /** The handler-chain */
| private String handlerChain;
|
| /** The wsdl file override */
| private String wsdlOverride;
|
| /**
| * Create a new JBossServiceReferenceMetaData.
| */
| public JBossServiceReferenceMetaData()
| {
| // For serialization
| }
|
| public JBossServiceReferenceMetaData merge(JBossServiceReferenceMetaData original)
| {
| JBossServiceReferenceMetaData merged = new JBossServiceReferenceMetaData();
| merged.merge(this, original);
| return merged;
| }
|
|
| /**
| * Get the serviceRefName.
| *
| * @return the serviceRefName.
| */
| public String getServiceRefName()
| {
| return getName();
| }
|
| public ServiceReferenceHandlerChainsMetaData getHandlerChains()
| {
| return handlerChains;
| }
|
| public void setHandlerChains(ServiceReferenceHandlerChainsMetaData handlerChains)
| {
| this.handlerChains = handlerChains;
| }
|
| public ServiceReferenceHandlersMetaData getHandlers()
| {
| return handlers;
| }
|
| public void setHandlers(ServiceReferenceHandlersMetaData handlers)
| {
| this.handlers = handlers;
| }
|
| public String getJaxrpcMappingFile()
| {
| return jaxrpcMappingFile;
| }
|
| public void setJaxrpcMappingFile(String jaxrpcMappingFile)
| {
| this.jaxrpcMappingFile = jaxrpcMappingFile;
| }
|
| public String getServiceInterface()
| {
| return serviceInterface;
| }
|
| public void setServiceInterface(String serviceInterface)
| {
| this.serviceInterface = serviceInterface;
| }
|
| public String getServiceRefType()
| {
| return serviceRefType;
| }
|
| public void setServiceRefType(String serviceRefType)
| {
| this.serviceRefType = serviceRefType;
| }
|
| public String getWsdlFile()
| {
| return wsdlFile;
| }
|
| public void setWsdlFile(String wsdlFile)
| {
| this.wsdlFile = wsdlFile;
| }
|
| /**
| * Set the serviceRefName.
| *
| * @param serviceRefName the serviceRefName.
| * @throws IllegalArgumentException for a null serviceRefName
| */
| @XmlElement(name="service-ref-name")
| public void setServiceRefName(String serviceRefName)
| {
| setName(serviceRefName);
| }
|
| public String getConfigFile()
| {
| return configFile;
| }
|
| public void setConfigFile(String configFile)
| {
| this.configFile = configFile;
| }
|
| public String getConfigName()
| {
| return configName;
| }
|
| public void setConfigName(String configName)
| {
| this.configName = configName;
| }
|
| public String getHandlerChain()
| {
| return handlerChain;
| }
|
| public void setHandlerChain(String handlerChain)
| {
| this.handlerChain = handlerChain;
| }
|
| public PortComponentRef getPortComponentRef()
| {
| return portComponentRef;
| }
|
| public void setPortComponentRef(PortComponentRef portComponentRef)
| {
| this.portComponentRef = portComponentRef;
| }
|
| public String getServiceClass()
| {
| return serviceClass;
| }
|
| public void setServiceClass(String serviceClass)
| {
| this.serviceClass = serviceClass;
| }
|
| public QName getServiceQname()
| {
| return serviceQname;
| }
|
| public void setServiceQname(QName serviceQname)
| {
| this.serviceQname = serviceQname;
| }
|
| public String getWsdlOverride()
| {
| return wsdlOverride;
| }
|
| public void setWsdlOverride(String wsdlOverride)
| {
| this.wsdlOverride = wsdlOverride;
| }
| }
|
One could either specify the full metadata via the jboss descriptor, or compose it from the spec descriptor + the jboss descriptor settings that only provided the legacy override only information.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098004#4098004
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098004
17 years, 3 months
[Design of Security on JBoss] - Re: Bringing together an unified security view
by julien@jboss.com
in that case it would be wiser if we only go for what was the *initial* requirement that started this thread : something that provides ACL based authorization.
we leave the identity part out of it, if it does not fit all.
"tom.baeyens(a)jboss.com" wrote : "mark.proctor(a)jboss.com" wrote : Portal already has a use case driven Identity component, so Julian's requirements and code should be taken into account.
|
| the current layering of the portal identity component is a no go for jbpm.
|
| Julien, correct me if I'm wrong.
|
| The problem is not in the model of the data. I think we can easily find a common datamodel. The problem is in the pluggability layer of the portal component.
|
| Portal defines a session facade interface that provides access to users and group objects. Those objects themselves don't expose relation getters. Instead, the session facade contains the methods for traversing the relations.
|
| The motivation for the ession facade approach is to have different implementations. One for DB with hibernate, one for LDAP and so on.
|
|
| From jBPM perspective, what I would like is for the shared identity component to look like this:
|
| * a set of java classes with getters and setters also for the relation properties.
|
| * hibernate persistence for those classes
|
| * JSF UI components as building blocks to create a identity management console.
|
| Then portal can still leverage such a component as 1 implementation (the DB/hibernate impl) of their own identity abstraction interfaces.
|
| I don't think it is feasible in the short term to come up with an interface that suits all requirements and that can switch between DB, LDAP and maybe other stores like e.g. XML files. But I do think it is feasible to create 1 implementation of a DB-schema/Java objects/hibernate mappings that everyone can leverage, leaving the abstraction interfaces still to the individual projects.
|
| E.g. in our case, those abstraction interfaces are on a per-use-case basis: an assignment handler for assigning a task to a user or a set of candidates. and an email address resolver that converts user ids into email adresses.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097999#4097999
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097999
17 years, 3 months
[Design of POJO Server] - duplicate jndi-name in jboss_5_0.xsd
by scott.stark@jboss.org
There is a conflict in the current use of the jndi-name from ejb-local-refType and ejb-refTypes because they define both a jndi-name element, and refer to the jboss:resourceGroup:
| <xsd:complexType name="ejb-local-refType">
| <xsd:sequence>
| <xsd:element name="description" type="javaee:descriptionType" minOccurs="0"
| maxOccurs="unbounded"/>
| <xsd:element name="ejb-ref-name" type="javaee:ejb-ref-nameType" minOccurs="0"/>
| ...
| <xsd:group ref="jboss:resourceGroup"/>
| <xsd:element name="jndi-name" type="javaee:jndi-nameType" minOccurs="0"/>
| </xsd:sequence>
|
| ...
| <!-- Bring resourceGroup into jboss namespace -->
| <xsd:group name="resourceGroup">
| <xsd:sequence>
| <!-- In jboss xml we allow the use of jndi-name instead of mapped-name -->
| <xsd:choice>
| <xsd:element name="jndi-name" type="javaee:jndi-nameType"
| minOccurs="0" />
| <xsd:element name="mapped-name" type="javaee:xsdStringType"
| minOccurs="0" />
| </xsd:choice>
|
It looks like the jndi-name should just be dropped and just the jboss:resourceGroup used.
By the way, I use the http://www.oxygenxml.com/ plugin for eclipse that allows for validation and navigation of schemas very easily within the project if your looking for a good xml/xsd tool.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097992#4097992
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097992
17 years, 3 months
[Design of POJO Server] - jboss.xml service-ref
by scott.stark@jboss.org
We are not using the full jboss overriden service-ref in the jboss_5_0.xsd. The jndiEnvironmentRefsGroup is referring to a remapped javaee:service-refGroup:
| <xsd:group name="jndiEnvironmentRefsGroup">
| <xsd:sequence>
| ...
| <xsd:group ref="jboss:service-refGroup" />
| ...
| </xsd:sequence>
| </xsd:group>
|
| <!-- Bring service-refGroup into jboss namespace from javaee_web_services_client_1_2 -->
| <xsd:group name="service-refGroup">
| <xsd:sequence>
| <xsd:element name="service-ref" type="javaee:service-refType"
| minOccurs="0" maxOccurs="unbounded">
| <xsd:key name="service-ref_handler-name-key">
| <xsd:selector xpath="javaee:handler" />
| <xsd:field xpath="javaee:handler-name" />
| </xsd:key>
| </xsd:element>
| </xsd:sequence>
| </xsd:group>
|
| ...
|
Some beans are referring to the javaee:service-refType:
| <xsd:complexType name="message-driven-beanType">
| <xsd:sequence>
| <xsd:group ref="javaee:descriptionGroup"/>
| <xsd:element name="ejb-name" type="javaee:ejb-nameType"/>
| ...
| <xsd:element name="service-ref" type="javaee:service-refType" minOccurs="0"
| maxOccurs="unbounded"/>
|
while the full jboss-service-refType type is unused:
| <xsd:complexType name="jboss-service-refType">
| <xsd:sequence>
| <xsd:element name="service-ref-name" type="xsd:string"/>
| <xsd:element name="service-impl-class" type="xsd:string" minOccurs="0" maxOccurs="1"/>
| <xsd:element name="service-qname" type="xsd:string" minOccurs="0" maxOccurs="1"/>
| <xsd:element name="config-name" type="xsd:string" minOccurs="0" maxOccurs="1"/>
| <xsd:element name="config-file" type="xsd:string" minOccurs="0" maxOccurs="1"/>
| <xsd:element name="handler-chain" type="xsd:string" minOccurs="0" maxOccurs="1"/>
| <xsd:element name="port-component-ref" type="jboss:port-component-ref-type" minOccurs="0" maxOccurs="unbounded"/>
| <xsd:element name="wsdl-override" type="xsd:string" minOccurs="0" maxOccurs="1"/>
| </xsd:sequence>
| <xsd:attribute name="id" type="xsd:ID"/>
| </xsd:complexType>
|
| <xsd:complexType name="port-component-ref-type">
| <xsd:sequence>
| <xsd:element name="service-endpoint-interface" type="xsd:string" minOccurs="0" maxOccurs="1"/>
| <xsd:element name="port-qname" type="xsd:string" minOccurs="0" maxOccurs="1"/>
| <xsd:element name="config-name" type="xsd:string" minOccurs="0" maxOccurs="1"/>
| <xsd:element name="config-file" type="xsd:string" minOccurs="0" maxOccurs="1"/>
| <xsd:element name="stub-property" type="jboss:stub-property-type" minOccurs="0" maxOccurs="unbounded"/>
| </xsd:sequence>
| </xsd:complexType>
|
| <xsd:complexType name="stub-property-type">
| <xsd:sequence>
| <xsd:element name="prop-name" type="xsd:string" minOccurs="0" maxOccurs="1"/>
| <xsd:element name="prop-value" type="xsd:string" minOccurs="0" maxOccurs="1"/>
| </xsd:sequence>
| </xsd:complexType>
|
All of the service-refs need to be of type jboss-service-refType, and we need to add a JBossServiceReferencesMetaData extension. The associated jira issue I'm working on is:
http://jira.jboss.com/jira/browse/JBAS-4895
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097985#4097985
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097985
17 years, 3 months