jboss-ejb3-spec-2_0.xsd 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ~ JBoss, Home of Professional Open Source.
  4. ~ Copyright (c) 2011, Red Hat, Inc., and individual contributors
  5. ~ as indicated by the @author tags. See the copyright.txt file in the
  6. ~ distribution for a full listing of individual contributors.
  7. ~
  8. ~ This is free software; you can redistribute it and/or modify it
  9. ~ under the terms of the GNU Lesser General Public License as
  10. ~ published by the Free Software Foundation; either version 2.1 of
  11. ~ the License, or (at your option) any later version.
  12. ~
  13. ~ This software is distributed in the hope that it will be useful,
  14. ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. ~ Lesser General Public License for more details.
  17. ~
  18. ~ You should have received a copy of the GNU Lesser General Public
  19. ~ License along with this software; if not, write to the Free
  20. ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  21. ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  22. -->
  23. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  24. targetNamespace="http://java.sun.com/xml/ns/javaee"
  25. xmlns:javaee="http://java.sun.com/xml/ns/javaee"
  26. xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
  27. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  28. xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd"
  29. elementFormDefault="qualified"
  30. attributeFormDefault="unqualified"
  31. version="2.0">
  32. <!-- xs:include schemaLocation="ejb-jar_3_1.xsd"/ -->
  33. <!--
  34. <xs:include schemaLocation="http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"/>
  35. -->
  36. <xs:import namespace="http://www.jboss.com/xml/ns/javaee" schemaLocation="jboss-ejb3-2_0.xsd"/>
  37. <xs:redefine schemaLocation="http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd">
  38. <xs:complexType name="assembly-descriptorType">
  39. <xs:complexContent>
  40. <xs:extension base="javaee:assembly-descriptorType">
  41. <xs:sequence>
  42. <xs:element ref="javaee:assembly-descriptor-entry" minOccurs="0" maxOccurs="unbounded"/>
  43. </xs:sequence>
  44. </xs:extension>
  45. </xs:complexContent>
  46. </xs:complexType>
  47. </xs:redefine>
  48. <xs:redefine schemaLocation="http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd">
  49. <xs:complexType name="container-transactionType">
  50. <xs:complexContent>
  51. <xs:extension base="javaee:container-transactionType">
  52. <xs:sequence>
  53. <xs:element ref="javaee:container-transaction-entry" minOccurs="0" maxOccurs="unbounded"/>
  54. </xs:sequence>
  55. </xs:extension>
  56. </xs:complexContent>
  57. </xs:complexType>
  58. </xs:redefine>
  59. <xs:element name="assembly-descriptor-entry" abstract="true" type="javaee:jboss-assembly-descriptor-entryType"/>
  60. <xs:complexType abstract="true" name="jboss-assembly-descriptor-entryType">
  61. <xs:sequence>
  62. <xs:element name="description"
  63. type="javaee:descriptionType"
  64. minOccurs="0"
  65. maxOccurs="unbounded"/>
  66. </xs:sequence>
  67. </xs:complexType>
  68. <xs:complexType name="jboss-assembly-descriptor-bean-entryType">
  69. <xs:complexContent>
  70. <xs:extension base="javaee:jboss-assembly-descriptor-entryType">
  71. <xs:sequence>
  72. <xs:element name="ejb-name"
  73. type="javaee:string"/>
  74. </xs:sequence>
  75. </xs:extension>
  76. </xs:complexContent>
  77. </xs:complexType>
  78. <xs:complexType name="jboss-assembly-descriptor-bean-method-entryType">
  79. <xs:complexContent>
  80. <xs:extension base="javaee:jboss-assembly-descriptor-bean-entryType">
  81. <xs:sequence>
  82. <xs:element name="method"
  83. type="javaee:named-methodType"
  84. minOccurs="0"/>
  85. </xs:sequence>
  86. </xs:extension>
  87. </xs:complexContent>
  88. </xs:complexType>
  89. <xs:complexType name="jboss-assembly-descriptor-method-entryType">
  90. <xs:complexContent>
  91. <xs:extension base="javaee:jboss-assembly-descriptor-entryType">
  92. <xs:sequence>
  93. <xs:element name="method"
  94. type="javaee:methodType"
  95. maxOccurs="unbounded"/>
  96. </xs:sequence>
  97. </xs:extension>
  98. </xs:complexContent>
  99. </xs:complexType>
  100. <xs:element name="container-transaction-entry" abstract="true" type="javaee:jboss-container-transaction-entryType"/>
  101. <xs:complexType abstract="true" name="jboss-container-transaction-entryType"/>
  102. <xs:complexType name="jboss-ejb-beanType">
  103. <xs:sequence>
  104. <xs:group ref="javaee:descriptionGroup"/>
  105. <xs:element name="ejb-name"
  106. type="javaee:ejb-nameType"/>
  107. <xs:element name="mapped-name"
  108. type="javaee:xsdStringType"
  109. minOccurs="0"/>
  110. <xs:group ref="javaee:jndiEnvironmentRefsGroup"/>
  111. </xs:sequence>
  112. </xs:complexType>
  113. <xs:complexType name="jboss-ejb-jarType">
  114. <xs:complexContent>
  115. <xs:extension base="javaee:ejb-jarType">
  116. <xs:sequence>
  117. <xs:element ref="jboss:enterprise-beans" minOccurs="0"/>
  118. <xs:element name="assembly-descriptor" type="javaee:assembly-descriptorType" minOccurs="0"/>
  119. </xs:sequence>
  120. <xs:attribute name="impl-version" type="javaee:dewey-versionType" fixed="2.0" use="required"/>
  121. </xs:extension>
  122. </xs:complexContent>
  123. </xs:complexType>
  124. <!--
  125. The standard enterprise-beansType starts with a choice which mandates at least one element.
  126. This effectively makes it non-extensible.
  127. -->
  128. <xs:complexType name="jboss-enterprise-beansType">
  129. <!--
  130. <xs:complexContent>
  131. <xs:extension base="javaee:enterprise-beansType">
  132. <xs:choice maxOccurs="unbounded">
  133. <xs:element ref="jboss:ejb" minOccurs="0" maxOccurs="unbounded"/>
  134. </xs:choice>
  135. </xs:extension>
  136. </xs:complexContent>
  137. -->
  138. <xs:annotation>
  139. <xs:documentation>
  140. The enterprise-beansType declares one or more enterprise
  141. beans. Each bean can be a session, entity or message-driven
  142. bean.
  143. </xs:documentation>
  144. </xs:annotation>
  145. <xs:choice maxOccurs="unbounded">
  146. <xs:element ref="jboss:ejb"/>
  147. <xs:element name="session"
  148. type="javaee:session-beanType">
  149. <!--
  150. <xs:unique name="session-ejb-local-ref-name-uniqueness">
  151. <xs:annotation>
  152. <xs:documentation>
  153. The ejb-ref-name element contains the name of
  154. an EJB reference. The EJB reference is an entry in
  155. the component's environment and is relative to the
  156. java:comp/env context. The name must be unique within
  157. the component.
  158. It is recommended that name be prefixed with "ejb/".
  159. </xs:documentation>
  160. </xs:annotation>
  161. <xs:selector xpath="javaee:ejb-local-ref"/>
  162. <xs:field xpath="javaee:ejb-ref-name"/>
  163. </xs:unique>
  164. <xs:unique name="session-ejb-ref-name-uniqueness">
  165. <xs:annotation>
  166. <xs:documentation>
  167. The ejb-ref-name element contains the name of an EJB
  168. reference. The EJB reference is an entry in the
  169. component's environment and is relative to the
  170. java:comp/env context. The name must be unique
  171. within the component.
  172. It is recommended that name is prefixed with "ejb/".
  173. </xs:documentation>
  174. </xs:annotation>
  175. <xs:selector xpath="javaee:ejb-ref"/>
  176. <xs:field xpath="javaee:ejb-ref-name"/>
  177. </xs:unique>
  178. <xs:unique name="session-resource-env-ref-uniqueness">
  179. <xs:annotation>
  180. <xs:documentation>
  181. The resource-env-ref-name element specifies the name
  182. of a resource environment reference; its value is
  183. the environment entry name used in the component
  184. code. The name is a JNDI name relative to the
  185. java:comp/env context and must be unique within an
  186. component.
  187. </xs:documentation>
  188. </xs:annotation>
  189. <xs:selector xpath="javaee:resource-env-ref"/>
  190. <xs:field xpath="javaee:resource-env-ref-name"/>
  191. </xs:unique>
  192. <xs:unique name="session-message-destination-ref-uniqueness">
  193. <xs:annotation>
  194. <xs:documentation>
  195. The message-destination-ref-name element specifies the name
  196. of a message destination reference; its value is
  197. the message destination reference name used in the component
  198. code. The name is a JNDI name relative to the
  199. java:comp/env context and must be unique within an
  200. component.
  201. </xs:documentation>
  202. </xs:annotation>
  203. <xs:selector xpath="javaee:message-destination-ref"/>
  204. <xs:field xpath="javaee:message-destination-ref-name"/>
  205. </xs:unique>
  206. <xs:unique name="session-res-ref-name-uniqueness">
  207. <xs:annotation>
  208. <xs:documentation>
  209. The res-ref-name element specifies the name of a
  210. resource manager connection factory reference. The name
  211. is a JNDI name relative to the java:comp/env context.
  212. The name must be unique within an component.
  213. </xs:documentation>
  214. </xs:annotation>
  215. <xs:selector xpath="javaee:resource-ref"/>
  216. <xs:field xpath="javaee:res-ref-name"/>
  217. </xs:unique>
  218. <xs:unique name="session-env-entry-name-uniqueness">
  219. <xs:annotation>
  220. <xs:documentation>
  221. The env-entry-name element contains the name of a
  222. component's environment entry. The name is a JNDI
  223. name relative to the java:comp/env context. The
  224. name must be unique within an component.
  225. </xs:documentation>
  226. </xs:annotation>
  227. <xs:selector xpath="javaee:env-entry"/>
  228. <xs:field xpath="javaee:env-entry-name"/>
  229. </xs:unique>
  230. -->
  231. </xs:element>
  232. <xs:element name="entity"
  233. type="javaee:entity-beanType">
  234. <!--
  235. <xs:unique name="entity-ejb-local-ref-name-uniqueness">
  236. <xs:annotation>
  237. <xs:documentation>
  238. The ejb-ref-name element contains the name of
  239. an EJB reference. The EJB reference is an entry in
  240. the component's environment and is relative to the
  241. java:comp/env context. The name must be unique within
  242. the component.
  243. It is recommended that name be prefixed with "ejb/".
  244. </xs:documentation>
  245. </xs:annotation>
  246. <xs:selector xpath="javaee:ejb-local-ref"/>
  247. <xs:field xpath="javaee:ejb-ref-name"/>
  248. </xs:unique>
  249. <xs:unique name="entity-ejb-ref-name-uniqueness">
  250. <xs:annotation>
  251. <xs:documentation>
  252. The ejb-ref-name element contains the name of an EJB
  253. reference. The EJB reference is an entry in the
  254. component's environment and is relative to the
  255. java:comp/env context. The name must be unique
  256. within the component.
  257. It is recommended that name is prefixed with "ejb/".
  258. </xs:documentation>
  259. </xs:annotation>
  260. <xs:selector xpath="javaee:ejb-ref"/>
  261. <xs:field xpath="javaee:ejb-ref-name"/>
  262. </xs:unique>
  263. <xs:unique name="entity-resource-env-ref-uniqueness">
  264. <xs:annotation>
  265. <xs:documentation>
  266. The resource-env-ref-name element specifies the name
  267. of a resource environment reference; its value is
  268. the environment entry name used in the component
  269. code. The name is a JNDI name relative to the
  270. java:comp/env context and must be unique within an
  271. component.
  272. </xs:documentation>
  273. </xs:annotation>
  274. <xs:selector xpath="javaee:resource-env-ref"/>
  275. <xs:field xpath="javaee:resource-env-ref-name"/>
  276. </xs:unique>
  277. <xs:unique name="entity-message-destination-ref-uniqueness">
  278. <xs:annotation>
  279. <xs:documentation>
  280. The message-destination-ref-name element specifies the name
  281. of a message destination reference; its value is
  282. the message destination reference name used in the component
  283. code. The name is a JNDI name relative to the
  284. java:comp/env context and must be unique within an
  285. component.
  286. </xs:documentation>
  287. </xs:annotation>
  288. <xs:selector xpath="javaee:message-destination-ref"/>
  289. <xs:field xpath="javaee:message-destination-ref-name"/>
  290. </xs:unique>
  291. <xs:unique name="entity-res-ref-name-uniqueness">
  292. <xs:annotation>
  293. <xs:documentation>
  294. The res-ref-name element specifies the name of a
  295. resource manager connection factory reference. The name
  296. is a JNDI name relative to the java:comp/env context.
  297. The name must be unique within an component.
  298. </xs:documentation>
  299. </xs:annotation>
  300. <xs:selector xpath="javaee:resource-ref"/>
  301. <xs:field xpath="javaee:res-ref-name"/>
  302. </xs:unique>
  303. <xs:unique name="entity-env-entry-name-uniqueness">
  304. <xs:annotation>
  305. <xs:documentation>
  306. The env-entry-name element contains the name of a
  307. component's environment entry. The name is a JNDI
  308. name relative to the java:comp/env context. The
  309. name must be unique within an component.
  310. </xs:documentation>
  311. </xs:annotation>
  312. <xs:selector xpath="javaee:env-entry"/>
  313. <xs:field xpath="javaee:env-entry-name"/>
  314. </xs:unique>
  315. -->
  316. </xs:element>
  317. <xs:element name="message-driven"
  318. type="javaee:message-driven-beanType">
  319. <!--
  320. <xs:unique name="messaged-ejb-local-ref-name-uniqueness">
  321. <xs:annotation>
  322. <xs:documentation>
  323. The ejb-ref-name element contains the name of
  324. an EJB reference. The EJB reference is an entry in
  325. the component's environment and is relative to the
  326. java:comp/env context. The name must be unique within
  327. the component.
  328. It is recommended that name be prefixed with "ejb/".
  329. </xs:documentation>
  330. </xs:annotation>
  331. <xs:selector xpath="javaee:ejb-local-ref"/>
  332. <xs:field xpath="javaee:ejb-ref-name"/>
  333. </xs:unique>
  334. <xs:unique name="messaged-ejb-ref-name-uniqueness">
  335. <xs:annotation>
  336. <xs:documentation>
  337. The ejb-ref-name element contains the name of an EJB
  338. reference. The EJB reference is an entry in the
  339. component's environment and is relative to the
  340. java:comp/env context. The name must be unique
  341. within the component.
  342. It is recommended that name is prefixed with "ejb/".
  343. </xs:documentation>
  344. </xs:annotation>
  345. <xs:selector xpath="javaee:ejb-ref"/>
  346. <xs:field xpath="javaee:ejb-ref-name"/>
  347. </xs:unique>
  348. <xs:unique name="messaged-resource-env-ref-uniqueness">
  349. <xs:annotation>
  350. <xs:documentation>
  351. The resource-env-ref-name element specifies the name
  352. of a resource environment reference; its value is
  353. the environment entry name used in the component
  354. code. The name is a JNDI name relative to the
  355. java:comp/env context and must be unique within an
  356. component.
  357. </xs:documentation>
  358. </xs:annotation>
  359. <xs:selector xpath="javaee:resource-env-ref"/>
  360. <xs:field xpath="javaee:resource-env-ref-name"/>
  361. </xs:unique>
  362. <xs:unique name="messaged-message-destination-ref-uniqueness">
  363. <xs:annotation>
  364. <xs:documentation>
  365. The message-destination-ref-name element specifies the name
  366. of a message destination reference; its value is
  367. the message destination reference name used in the component
  368. code. The name is a JNDI name relative to the
  369. java:comp/env context and must be unique within an
  370. component.
  371. </xs:documentation>
  372. </xs:annotation>
  373. <xs:selector xpath="javaee:message-destination-ref"/>
  374. <xs:field xpath="javaee:message-destination-ref-name"/>
  375. </xs:unique>
  376. <xs:unique name="messaged-res-ref-name-uniqueness">
  377. <xs:annotation>
  378. <xs:documentation>
  379. The res-ref-name element specifies the name of a
  380. resource manager connection factory reference. The name
  381. is a JNDI name relative to the java:comp/env context.
  382. The name must be unique within an component.
  383. </xs:documentation>
  384. </xs:annotation>
  385. <xs:selector xpath="javaee:resource-ref"/>
  386. <xs:field xpath="javaee:res-ref-name"/>
  387. </xs:unique>
  388. <xs:unique name="messaged-env-entry-name-uniqueness">
  389. <xs:annotation>
  390. <xs:documentation>
  391. The env-entry-name element contains the name of a
  392. component's environment entry. The name is a JNDI
  393. name relative to the java:comp/env context. The
  394. name must be unique within an component.
  395. </xs:documentation>
  396. </xs:annotation>
  397. <xs:selector xpath="javaee:env-entry"/>
  398. <xs:field xpath="javaee:env-entry-name"/>
  399. </xs:unique>
  400. -->
  401. </xs:element>
  402. </xs:choice>
  403. <xs:attribute name="id"
  404. type="xs:ID"/>
  405. </xs:complexType>
  406. </xs:schema>