[jboss-dev-forums] [Design of POJO Server] - Re: So what does unification mean for the ejb containers
wolfc
do-not-reply at jboss.com
Wed Oct 17 10:14:39 EDT 2007
I can't make the jboss_5_0.xsd, namespace restrictions and model fit together. The spec xsds don't expose any elements, so the only way to use an element in another namespace is by using a ref on a group or by extension. This leads to very weird constructs:<?xml version="1.0"?>
| <jboss
| xmlns="http://www.jboss.com/xml/ns/javaee"
| xmlns:jee="http://java.sun.com/xml/ns/javaee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee
| http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
| version="3.0">
| <enterprise-beans>
| <service>
| <ejb-name>ServiceSix</ejb-name>
| <ejb-class>org.jboss.ejb3.test.service.ServiceSix</ejb-class>
| <object-name>object name</object-name>
| <local>org.jboss.ejb3.test.service.ServiceSixLocal</local>
| <remote>org.jboss.ejb3.test.service.ServiceSixRemote</remote>
| <management>org.jboss.ejb3.test.service.ServiceSixManagement</management>
| <xmbean>xmbean</xmbean>
| <remote-binding>
| <client-bind-url>client bind url</client-bind-url>
| </remote-binding>
| <jndi-name>serviceSix/remote</jndi-name>
| <local-jndi-name>serviceSix/local</local-jndi-name>
| <ejb-ref>
| <ejb-ref-name>ejb/StatelessBean</ejb-ref-name>
| <ejb-ref-type>Session</ejb-ref-type>
| <remote>org.jboss.ejb3.test.service.StatelessRemote</remote>
| <ejb-link>StatelessBean</ejb-link>
| <jee:injection-target>
| <jee:injection-target-class>org.jboss.ejb3.test.service.ServiceSix</jee:injection-target-class>
| <jee:injection-target-name>stateless</jee:injection-target-name>
| </jee:injection-target>
| <jndi-name>StatelessBean/remote</jndi-name>
| </ejb-ref>
| <ejb-local-ref>
| <ejb-ref-name>ejb/StatelessLocal</ejb-ref-name>
| <ejb-ref-type>Session</ejb-ref-type>
| <local>org.jboss.ejb3.test.service.StatelessLocal</local>
| <ejb-link>StatelessBean</ejb-link>
| <jee:injection-target>
| <jee:injection-target-class>org.jboss.ejb3.test.service.ServiceSix</jee:injection-target-class>
| <jee:injection-target-name>setStatelessLocal</jee:injection-target-name>
| </jee:injection-target>
| <jndi-name>StatelessBean/local</jndi-name>
| </ejb-local-ref>
| <security-identity>
| <jee:run-as>
| <jee:role-name>role name</jee:role-name>
| </jee:run-as>
| <!-- FIXME
| <run-as-principal>run as principal</run-as-principal>
| -->
| </security-identity>
| <resource-ref>
| <res-ref-name>testDatasource</res-ref-name>
| <res-type>javax.sql.DataSource</res-type>
| <res-auth>Container</res-auth>
| <res-sharing-scope>Shareable</res-sharing-scope>
| <mapped-name>java:/DefaultDS</mapped-name>
| <jee:injection-target>
| <jee:injection-target-class>org.jboss.ejb3.test.service.ServiceSix</jee:injection-target-class>
| <jee:injection-target-name>testDatasource</jee:injection-target-name>
| </jee:injection-target>
| </resource-ref>
| <resource-env-ref>
| <jee:description>A test of the resource-env-ref tag</jee:description>
| <jee:resource-env-ref-name>res/aQueue</jee:resource-env-ref-name>
| <jee:resource-env-ref-type>javax.jms.Queue</jee:resource-env-ref-type>
| <jndi-name>queue/mdbtest</jndi-name>
| </resource-env-ref>
| <message-destination-ref>
| <message-destination-ref-name>messageDestinationRef</message-destination-ref-name>
| <jee:mapped-name>mappedName</jee:mapped-name>
| </message-destination-ref>
| <security-domain>security domain</security-domain>
| <method-attributes>
| <method>
| <method-name>test</method-name>
| <transaction-timeout>1</transaction-timeout>
| </method>
| </method-attributes>
| </service>
| </enterprise-beans>
| </jboss>
|
All elements directly under service are in jboss namespace, I could make an extension on session-beanType, but that would throw the model into a fit.
ejb-ref and ejb-local-ref are pretty consistent.
security-identity somehow defies the xsd I've defined for it, but fits the model.
Then wickedness ensues: resource-ref can't be an extension, because it redefines the usage of mapped-name. It should however be an extension (as resource-env-ref) because now description won't fit the model.
It leads to a mapped-name from a different namespace as shown in message-destination-ref. And thus I can't fit both of them into one unified model. So currently I'm at a stalemate.
Any suggestions?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096105#4096105
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096105
More information about the jboss-dev-forums
mailing list