libjboss-integration-java-5.0.3.GA.orig/0000755000175000017500000000000011116055616017753 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/build/0000755000175000017500000000000011116055611021045 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/build/src/0000755000175000017500000000000011116055610021633 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/build/src/assembly/0000755000175000017500000000000011116055610023452 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/build/src/assembly/bin-jdk14.xml0000644000175000017500000000111011017563642025661 0ustar twernertwerner jar false jboss-classloading-spi/target/classes-jdk14 / jboss-transaction-spi/target/classes-jdk14 / jboss-corba-ots-spi/target/classes-jdk14 / libjboss-integration-java-5.0.3.GA.orig/build/src/assembly/sources.xml0000644000175000017500000000175511111467354025676 0ustar twernertwerner sources jar false ../jboss-classloading-spi/src/main/java / ../jboss-corba-ots-spi/src/main/java / ../jboss-deployment-spi/src/main/java / ../jboss-jca-spi/src/main/java / ../jboss-profileservice-spi/src/main/java / ../jboss-transaction-spi/src/main/java / libjboss-integration-java-5.0.3.GA.orig/build/src/assembly/bin.xml0000644000175000017500000000174011111467354024755 0ustar twernertwerner jar false ../jboss-classloading-spi/target/classes / ../jboss-corba-ots-spi/target/classes / ../jboss-deployment-spi/target/classes / ../jboss-jca-spi/target/classes / ../jboss-profileservice-spi/target/classes / ../jboss-transaction-spi/target/classes / libjboss-integration-java-5.0.3.GA.orig/build/.project0000644000175000017500000000030610642715352022523 0ustar twernertwerner build libjboss-integration-java-5.0.3.GA.orig/build/pom-jdk14.xml0000644000175000017500000001143210674474442023315 0ustar twernertwerner org.jboss jboss-parent 3 4.0.0 org.jboss jboss-integration-jdk14 5.0.0-SNAPSHOT pom JBoss Integration 5.0 Build http://www.jboss.com The JBoss Integration SPI classes src/main src/tests ${artifactId} src/etc **/* true src/resources **/* true maven-assembly-plugin package assembly assembly/bin.xml assembly/sources.xml false maven-surefire-plugin false true **/**TestCase.java true jboss.maven-plugins jboss-deploy-maven-plugin 1.3-SNAPSHOT jboss JBoss Repository default http://repository.jboss.org/maven2/ true org.apache.maven.plugins maven-project-info-reports-plugin dependencies issue-tracking license scm org.jboss jboss-common-core-jdk14 2.2.1-SNAPSHOT org.jboss.javaee jboss-jca-api-jdk14 1.5-SNAPSHOT org.jboss.javaee jboss-transaction-api-jdk14 1.0.1-SNAPSHOT libjboss-integration-java-5.0.3.GA.orig/build/pom.xml0000644000175000017500000000402411111467354022370 0ustar twernertwerner org.jboss.integration jboss-integration-parent 5.0.3.GA 4.0.0 jboss-integration 5.0.3.GA pom JBoss Integration 5.0 Aggregate Build http://www.jboss.com The JBoss Integration SPI classes assembly !skip.assembly maven-assembly-plugin package attached src/assembly/bin.xml src/assembly/sources.xml false org.jboss.maven.plugins maven-jboss-deploy-plugin 1.3 jboss-deploy ${jboss.repository.root} libjboss-integration-java-5.0.3.GA.orig/build/lgpl.txt0000644000175000017500000006347610642715352022574 0ustar twernertwerner GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! libjboss-integration-java-5.0.3.GA.orig/build/README0000644000175000017500000000007210642715352021734 0ustar twernertwernerTo package the whole stuff: mvn package assembly:assembly libjboss-integration-java-5.0.3.GA.orig/jboss-corba-ots-spi/0000755000175000017500000000000011116055611023546 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-corba-ots-spi/pom-jdk14.xml0000644000175000017500000001233510674474442026021 0ustar twernertwerner org.jboss jboss-integration-jdk14 5.0.0-SNAPSHOT ../build/pom-jdk14.xml 4.0.0 jboss jboss-corba-orb-spi-jdk14 5.0.0-SNAPSHOT jar JBoss 5.0.0 CORBA OTS SPI http://www.jboss.org SPI to be implemented by CORBA OTS providers for JBoss 5.0.0 ${outputDirectory} ${testOutputDirectory} org.jboss.maven.plugins maven-jboss-retro-plugin 1.0-beta-1 weave-classes weave ${project.build.directory}/classes-jdk14 weave-test-classes weave-tests ${project.build.directory}/test-classes-jdk14 org.jboss.weaver.retro.WeaverRetroJdk14 org.apache.maven.plugins maven-jar-plugin ${project.build.directory}/classes-jdk14 org.apache.maven.plugins maven-surefire-plugin true run-jdk14-tests target/classes-jdk14 target/test-classes-jdk14 org.apache.maven.plugins maven-enforcer-plugin 1.0-alpha-3 enforce-jdk14-property enforce-once java14_home The property java14_home should be set to a valid installation of jdk1.4. The jdk14 tests cannot be run without this property. org.apache.maven.plugins maven-surefire-plugin ${java14_home}/bin/java always false ${project.build.directory}/surefire-reports-jdk14 org.jboss.javaee jboss-transaction-api-jdk14 target/classes target/test-classes libjboss-integration-java-5.0.3.GA.orig/jboss-corba-ots-spi/.classpath0000644000175000017500000000107411103656662025544 0ustar twernertwerner libjboss-integration-java-5.0.3.GA.orig/jboss-corba-ots-spi/.project0000644000175000017500000000056310776245731025240 0ustar twernertwerner jboss-corba-ots-spi SPI to be implemented by CORBA OTS providers for JBoss 5.0.0 org.eclipse.jdt.core.javabuilder org.eclipse.jdt.core.javanature libjboss-integration-java-5.0.3.GA.orig/jboss-corba-ots-spi/src/0000755000175000017500000000000011116055611024335 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-corba-ots-spi/src/main/0000755000175000017500000000000011116055611025261 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-corba-ots-spi/src/main/java/0000755000175000017500000000000011116055611026202 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-corba-ots-spi/src/main/java/org/0000755000175000017500000000000011116055611026771 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-corba-ots-spi/src/main/java/org/jboss/0000755000175000017500000000000011116055611030111 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-corba-ots-spi/src/main/java/org/jboss/iiop/0000755000175000017500000000000011116055611031051 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-corba-ots-spi/src/main/java/org/jboss/iiop/tm/0000755000175000017500000000000011116055611031471 5ustar twernertwerner././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-corba-ots-spi/src/main/java/org/jboss/iiop/tm/InboundTransactionCurrent.javalibjboss-integration-java-5.0.3.GA.orig/jboss-corba-ots-spi/src/main/java/org/jboss/iiop/tm/InboundT0000644000175000017500000000477510674513004033156 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2005, JBoss Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.iiop.tm; import javax.transaction.Transaction; import org.omg.CORBA.LocalInterface; import org.omg.CORBA.Current; /** * Interface to be implemented by a CORBA OTS provider for integration with * JBossAS. The CORBA OTS provider must (i) create an object that implements * this interface and (ii) register an initial reference for that object * with the JBossAS ORB, under name "InboundTransactionCurrent". *

* Step (ii) above should be done by a call * orbInitInfo.register_initial_reference within the * pre_init method of an * org.omg.PortableInterceptor.ORBInitializer, * which will probably be also the initializer that registers a server request * interceptor for the OTS provider. * * @author Francisco Reverbel * @version $Revision$ */ public interface InboundTransactionCurrent extends LocalInterface, Current { public final String NAME = "InboundTransactionCurrent"; /** * Gets the Transaction instance associated with the current incoming * request. This method should be called only by code that handles incoming * requests; its return value is undefined in the case of a call issued * outside of a request scope. * * @return the javax.transaction.Transaction instance associated with the * current incoming request, or null if that request was not issued * within the scope of some transaction. */ Transaction getCurrentTransaction(); } libjboss-integration-java-5.0.3.GA.orig/jboss-corba-ots-spi/.settings/0000755000175000017500000000000011116055611025464 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-corba-ots-spi/.settings/org.eclipse.jdt.core.prefs0000644000175000017500000000031410674474442032463 0ustar twernertwerner#Wed Jul 04 03:05:53 CEST 2007 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.source=1.5 org.eclipse.jdt.core.compiler.compliance=1.5 libjboss-integration-java-5.0.3.GA.orig/jboss-corba-ots-spi/pom.xml0000644000175000017500000000166011111467354025074 0ustar twernertwerner org.jboss.integration jboss-integration-parent 5.0.3.GA 4.0.0 jboss-corba-ots-spi 5.0.3.GA jar JBoss CORBA OTS 5.0.0 SPI http://www.jboss.org SPI to be implemented by CORBA OTS providers for JBoss 5.0.0 org.jboss.javaee jboss-transaction-api jacorb jacorb libjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/0000755000175000017500000000000011116055612022413 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/src/0000755000175000017500000000000011116055611023201 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/src/main/0000755000175000017500000000000011116055611024125 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/src/main/java/0000755000175000017500000000000011116055611025046 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/src/main/java/org/0000755000175000017500000000000011116055611025635 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/src/main/java/org/jboss/0000755000175000017500000000000011116055611026755 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/src/main/java/org/jboss/jca/0000755000175000017500000000000011116055611027512 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/src/main/java/org/jboss/jca/spi/0000755000175000017500000000000011116055612030306 5ustar twernertwerner././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/src/main/java/org/jboss/jca/spi/ComponentStack.javalibjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/src/main/java/org/jboss/jca/spi/ComponentStack0000644000175000017500000000360411103656662033174 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.jca.spi; import java.util.Set; import javax.resource.ResourceException; /** * ComponentStack. * * @author Adrian Brock * @version $Revision: 1.1 $ */ public interface ComponentStack { /** * Push a component context * * @param rawKey the raw key, e.g. the servlet or ejb context * @param unsharableResources a set of real jndi names marked as unshareable * @throws ResourceException for any error */ @SuppressWarnings("unchecked") void pushMetaAwareObject(final Object rawKey, Set unsharableResources) throws ResourceException; /** * Pop a component context * * @param unsharableResources a set of real jndi names marked as unshareable * @throws ResourceException for any error */ @SuppressWarnings("unchecked") void popMetaAwareObject(Set unsharableResources) throws ResourceException; } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/src/main/java/org/jboss/jca/spi/AOPEndpoint.javalibjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/src/main/java/org/jboss/jca/spi/AOPEndpoint.ja0000644000175000017500000000251311000616411032733 0ustar twernertwerner/* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.jca.spi; import org.jboss.aop.advice.Interceptor; /** * Define an AOP endpoint. * * @author Adrian Brock * @author Jesper Pedersen * @version $Revision: $ */ public interface AOPEndpoint extends Interceptor { } libjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/src/main/java/org/jboss/jca/spi/Endpoint.java0000644000175000017500000000324411000616411032724 0ustar twernertwerner/* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.jca.spi; import java.lang.reflect.Method; /** * The endpoint. * * @author Adrian Brock * @author Jesper Pedersen * @version $Revision: $ */ public interface Endpoint { /** * Should the delivery by transacted for the method * @param method The method * @return True if transacted otherwise false */ boolean isDeliveryTransacted(Method method); /** * Get the transaction timeout for the method * @param method The method * @return The transaction timeout in seconds */ int getTransactionTimeout(Method method); } libjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/src/main/java/org/jboss/jca/spi/xa/0000755000175000017500000000000011116055612030716 5ustar twernertwerner././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/src/main/java/org/jboss/jca/spi/EndpointActivation.javalibjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/src/main/java/org/jboss/jca/spi/EndpointActiva0000644000175000017500000000252511000616411033135 0ustar twernertwerner/* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.jca.spi; /** * The EndpointActivation. * * @author Adrian Brock * @author Jesper Pedersen * @version $Revision: $ */ public interface EndpointActivation { /** * Deactivate an endpoint */ void deactivate(); } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/src/main/java/org/jboss/jca/spi/RarSelection.javalibjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/src/main/java/org/jboss/jca/spi/RarSelection.j0000644000175000017500000000310411000616411033041 0ustar twernertwerner/* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.jca.spi; import java.util.Map; /** * The RAR selection. * * @author Adrian Brock * @author Jesper Pedersen * @version $Revision: $ */ public interface RarSelection { /** * Get the name * @return The name */ String getName(); /** * Get the listener type * @return The listener type */ Class getListenerType(); /** * Get the properties * @return The properties */ Map getProperties(); } ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/src/main/java/org/jboss/jca/spi/ActivationConfigProperty.javalibjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/src/main/java/org/jboss/jca/spi/ActivationConf0000644000175000017500000000526611017235430033147 0ustar twernertwerner/* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.jca.spi; import java.io.Serializable; /** * The ActivationConfigProperty - similar to the javax.ejb annotation * * @author Adrian Brock * @author Jesper Pedersen * @version $Revision: $ */ public class ActivationConfigProperty implements Serializable { /** Serial UID */ static final long serialVersionUID = 4504308146998800021L; /** The name */ private String name; /** The value */ private String value; /** * Constructor */ public ActivationConfigProperty() { } /** * Constructor * @param name The name * @param value The value */ public ActivationConfigProperty(String name, String value) { setName(name); setValue(value); } /** * Get the name * @return The name */ public String getName() { return name; } /** * Set the name * @param name The name */ public void setName(String name) { this.name = name; } /** * Get the value * @return The value */ public String getValue() { return value; } /** * Set the value * @param value The value */ public void setValue(String value) { this.value = value; } /** * String representation * @return The representation */ public String toString() { StringBuffer sb = new StringBuffer(ActivationConfigProperty.class.getName()); sb = sb.append("{"); sb = sb.append("name=" + name); sb = sb.append(", "); sb = sb.append("value=" + value); sb = sb.append("}"); return sb.toString(); } } ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/src/main/java/org/jboss/jca/spi/EndpointActivationBus.javalibjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/src/main/java/org/jboss/jca/spi/EndpointActiva0000644000175000017500000000437411002076562033152 0ustar twernertwerner/* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.jca.spi; import java.util.Set; import javax.resource.spi.ActivationSpec; /** * The EndpointActivationBus. * * @author Adrian Brock * @author Jesper Pedersen * @version $Revision: $ */ public interface EndpointActivationBus { /** * Activate an Endpoint * @param endpoint The endpoint * @param spec The activation spec * @return The endpoint activation */ EndpointActivation activate(Endpoint endpoint, ActivationSpec spec); /** * Activate an Endpoint * @param endpoint The endpoint * @param properties Activation configuration properties * @param selection The resource adaptor selection * @return The endpoint activation */ EndpointActivation activate(Endpoint endpoint, Set properties, RarSelection selection); /** * Determine the dependency name for the rar * @param properties The config properties * @param selection The rar selection parameters * @return The dependency name, e.g. JMX object name or MC name or null if it cannot be determined */ String resolveRarContext(Set properties, RarSelection selection); } libjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/.classpath0000644000175000017500000000174111103656662024411 0ustar twernertwerner libjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/.project0000644000175000017500000000052011021067623024057 0ustar twernertwerner jboss-jca-spi The JBoss JCA 5.0.0 SPI classes org.eclipse.jdt.core.javabuilder org.eclipse.jdt.core.javanature libjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/.settings/0000755000175000017500000000000011116055612024331 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/.settings/org.eclipse.jdt.core.prefs0000644000175000017500000000031411000616411031301 0ustar twernertwerner#Wed Jul 04 03:05:53 CEST 2007 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.source=1.5 org.eclipse.jdt.core.compiler.compliance=1.5 libjboss-integration-java-5.0.3.GA.orig/jboss-jca-spi/pom.xml0000644000175000017500000000213311111467354023734 0ustar twernertwerner org.jboss.integration jboss-integration-parent 5.0.3.GA 4.0.0 jboss-jca-spi 5.0.3.GA jar JBoss JCA 5.0.0 SPI http://www.jboss.org The JBoss JCA 5.0.0 SPI classes org.jboss.aop jboss-aop client org.jboss jboss-common-core org.jboss.javaee jboss-jca-api libjboss-integration-java-5.0.3.GA.orig/jboss-deployment-spi/0000755000175000017500000000000011116055613024037 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-deployment-spi/src/0000755000175000017500000000000011116055612024625 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-deployment-spi/src/main/0000755000175000017500000000000011116055612025551 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-deployment-spi/src/main/java/0000755000175000017500000000000011116055612026472 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-deployment-spi/src/main/java/org/0000755000175000017500000000000011116055612027261 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-deployment-spi/src/main/java/org/jboss/0000755000175000017500000000000011116055612030401 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-deployment-spi/src/main/java/org/jboss/deployment/0000755000175000017500000000000011116055612032561 5ustar twernertwerner././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-deployment-spi/src/main/java/org/jboss/deployment/spi/libjboss-integration-java-5.0.3.GA.orig/jboss-deployment-spi/src/main/java/org/jboss/deployment/spi/0000755000175000017500000000000011116055613033355 5ustar twernertwerner././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-deployment-spi/src/main/java/org/jboss/deployment/spi/EndpointType.javalibjboss-integration-java-5.0.3.GA.orig/jboss-deployment-spi/src/main/java/org/jboss/deployment/spi/0000644000175000017500000000306010776246272033374 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2007, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.deployment.spi; /** * Constants for the known endpoint types * * @author Scott.Stark@jboss.org * @version $Revision:$ */ public interface EndpointType { public static final String EJB = "ejb"; public static final String MCMBean = "mcbean"; public static final String MBean = "mbean"; public static final String MessageDestination = "message-destination"; public static final String PersistenceUnit = "persistence-unit"; public static final String Servlet = "servlet"; public static final String WebService = "web-service"; } ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-deployment-spi/src/main/java/org/jboss/deployment/spi/EndpointInfo.javalibjboss-integration-java-5.0.3.GA.orig/jboss-deployment-spi/src/main/java/org/jboss/deployment/spi/0000644000175000017500000000563611021143156033364 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2007, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.deployment.spi; import java.io.Serializable; /** * Encapsulation of a deployment endpoint * * @author Scott.Stark@jboss.org * @version $Revision:$ */ public class EndpointInfo implements Serializable { private static final long serialVersionUID = 1; /** VFS relative path of the endpoints deployment */ private String pathName; /** The deployment unique component name */ private String name; /** The endpoint type */ private String type; /** * @param pathName - the vfs relative path of the deployment containing the endpoint * @param name - the deployment local unique name of the endpoing * @param type - the endpoint type(ejb, message-destination, ...) * @see EndpointType */ public EndpointInfo(String pathName, String name, String type) { super(); this.pathName = pathName; this.name = name; this.type = type; } /** * @return the vfs relative path for the endpoint's deployment */ public String getPathName() { return pathName; } /** * * @return the deployment local unique name of the endpoing */ public String getName() { return name; } /** * @return the endpoint type(ejb, message-destination, ...) * @see EndpointType */ public String getType() { return type; } /** * Get the deployment unique key for the endpoint * @return the unique key formed from the tuple (type, vfs relative path, name): * type + "/" + pathName + "#" + name */ public String getComponentKey() { return type + "/" + pathName + "#" + name; } @Override public String toString() { StringBuilder tmp = new StringBuilder("EndpointInfo(pathName="); tmp.append(pathName); tmp.append(",name="); tmp.append(name); tmp.append(",type="); tmp.append(type); tmp.append(")"); return tmp.toString(); } } ././@LongLink0000000000000000000000000000020400000000000011561 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-deployment-spi/src/main/java/org/jboss/deployment/spi/DeploymentEndpointResolver.javalibjboss-integration-java-5.0.3.GA.orig/jboss-deployment-spi/src/main/java/org/jboss/deployment/spi/0000644000175000017500000000472511104563051033364 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2008, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.deployment.spi; /** * An interface for resolving deployment endpoints by reference name or * interface type. * * @author Scott.Stark@jboss.org * @version $Revision:$ */ public interface DeploymentEndpointResolver { /** * Find the deployment endpoint info for the given business interface and * expected endpoint type. * * @param businessIntf - the interface the endpoint should implement * @param endpointType - the type of endpoint * @param vfsContext - the vfs relative path for the deployment initiating * the resolution request. This is used to properly resolve * interface scopes from the inside out. * @return the matching endpoint info if found, null otherwise */ @SuppressWarnings("unchecked") EndpointInfo getEndpointInfo(Class businessIntf, String endpointType, String vfsContext); /** * Find the deployment endpoint for the given reference name. This may be * relative name qualified by a path prefix, or just the endpoint name. * * @param ref - relative or exact endpoint name * @param endpointType the type of endpoint * @param vfsContext - the vfs relative path for the deployment initiating * the resolution request. This is used to properly resolve * relative references. * @return the matching endpoint info if found, null otherwise * @see EndpointType */ EndpointInfo getEndpointInfo(String ref, String endpointType, String vfsContext); } libjboss-integration-java-5.0.3.GA.orig/jboss-deployment-spi/.classpath0000644000175000017500000000032211021067623026016 0ustar twernertwerner libjboss-integration-java-5.0.3.GA.orig/jboss-deployment-spi/.project0000644000175000017500000000054010776246272025523 0ustar twernertwerner jboss-deployment-spi The JBossAS Deployment 5.0.0 SPI classes org.eclipse.jdt.core.javabuilder org.eclipse.jdt.core.javanature libjboss-integration-java-5.0.3.GA.orig/jboss-deployment-spi/.settings/0000755000175000017500000000000011116055613025755 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-deployment-spi/.settings/org.eclipse.jdt.core.prefs0000644000175000017500000000031310776246272032752 0ustar twernertwerner#Sun Apr 06 15:13:16 PDT 2008 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.source=1.5 org.eclipse.jdt.core.compiler.compliance=1.5 libjboss-integration-java-5.0.3.GA.orig/jboss-deployment-spi/pom.xml0000644000175000017500000000122111111467354025354 0ustar twernertwerner org.jboss.integration jboss-integration-parent 5.0.3.GA 4.0.0 jboss-deployment-spi 5.0.3.GA jar JBoss Deployment 5.0.0 SPI http://www.jboss.org The JBossAS Deployment 5.0.0 SPI classes libjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/0000755000175000017500000000000011116055615024702 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/0000755000175000017500000000000011116055613025467 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/0000755000175000017500000000000011116055613026413 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/0000755000175000017500000000000011116055613027334 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/0000755000175000017500000000000011116055613030123 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/0000755000175000017500000000000011116055614031244 5ustar twernertwerner././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/libjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileserv0000755000175000017500000000000011116055613033524 5ustar twernertwerner././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/libjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileserv0000755000175000017500000000000011116055614033525 5ustar twernertwerner././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/repository/libjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileserv0000755000175000017500000000000011116055614033525 5ustar twernertwerner././@LongLink0000000000000000000000000000021600000000000011564 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/repository/MutableRepository.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileserv0000644000175000017500000000433010674024124033527 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2007, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.profileservice.spi.repository; import java.util.Collection; /** * A mutable extension of the OBR Repository * * @author Scott.Stark@jboss.org * @version $Revision: 65458 $ */ public interface MutableRepository extends Repository { /** */ public enum ModifyStatus {ADDED, MODIFIED, REMOVED}; /** * Add a resource to the repository. * @param resource the resource to add * @throws Exception thrown on any addition failure */ public void addResource(Resource resource) throws Exception; /** * Remove a resource from the repository * @param name the resource SYMBOLIC_NAME or ID * @return the Resource that was removed if found, null otherwise. * @throws Exception thrown on any remove failure */ public Resource removeResource(String name) throws Exception; /** * Return a collection of resources that have been modified since * the last call to this method. The returned resources contain * a modifyStatus property of type ModifyStatus to indicate the * type of change. * * @return The Resources that have been modified. * @throws Exception */ public Collection getModifiedResources() throws Exception; } ././@LongLink0000000000000000000000000000021400000000000011562 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/repository/RepositoryAdmin.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileserv0000644000175000017500000000554710674023354033546 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2007, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.profileservice.spi.repository; import java.net.URI; /** * Mirror the OBR RepositoryAdmin interface with URI instead of URL. * * @author Scott.Stark@jboss.org * @version $Revision: 65457 $ */ public interface RepositoryAdmin { /** * Discover any resources that match the given filter. * * This is not a detailed search, but a first scan of applicable resources. * * ### Checking the capabilities of the filters is not possible because that * requires a new construct in the filter. * * The filter expression can assert any of the main headers of the resource. * The attributes that can be checked are: * *

    *
  1. name
  2. *
  3. version (uses filter matching rules)
  4. *
  5. description
  6. *
  7. category
  8. *
  9. copyright
  10. *
  11. license
  12. *
  13. source
  14. *
* * @param filterExpr * A standard OSGi filter * @return List of resources matching the filters. */ Resource[] discoverResources(String filterExpr); /** * Create a resolver. * * @param resource * @return */ Resolver resolver(); /** * Add a new repository to the federation. * * The url must point to a repository XML file. * * @param repository * @return * @throws Exception */ Repository addRepository(URI repository) throws Exception; /** * The OBR version does not include this. * * @param repository * @return the Repository instance for the * @throws Exception */ Repository getRepository(URI repository) throws Exception; boolean removeRepository(URI repository); /** * List all the repositories. * * @return */ Repository[] listRepositories(); Resource getResource(String respositoryId); } ././@LongLink0000000000000000000000000000020700000000000011564 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/repository/Repository.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileserv0000644000175000017500000000303310674023354033532 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2007, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.profileservice.spi.repository; import java.net.URI; /** * Mirror the OBR Repository * * @author Scott.Stark@jboss.org * @version $Revision: 65457 $ */ public interface Repository { /** * Return the associated URI for the repository. * */ URI getURI(); /** * Return the resources for this repository. */ Resource[] getResources(); /** * Return the name of this reposotory. * * @return a non-null name */ String getName(); long getLastModified(); } ././@LongLink0000000000000000000000000000021000000000000011556 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/repository/Requirement.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileserv0000644000175000017500000000371011110316634033524 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2007, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.profileservice.spi.repository; /** * Mirror the OBR Requirement * * @author Scott.Stark@jboss.org * @version $Revision: 81170 $ */ public interface Requirement { /** * Return the name of the requirement. * * @return name */ String getName(); /** * Return the filter. * * @return filter string */ String getFilter(); /** * Is multiple. * * @return true for multiple, false otherwise */ boolean isMultiple(); /** * Is optional. * * @return true for optional, false otherwise */ boolean isOptional(); /** * Is extended. * * @return true for extended, false otherwise */ boolean isExtend(); /** * Get comment. * * @return the comment */ String getComment(); /** * Is satisfied. * * @param capability the capability to check * @return true for satisfied, false otherwise */ boolean isSatisfied(Capability capability); } ././@LongLink0000000000000000000000000000020700000000000011564 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/repository/Capability.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileserv0000644000175000017500000000273410674023354033541 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2007, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.profileservice.spi.repository; import java.util.Map; /** * A named set of properties representing some capability that is provided by * its owner. * * @author Scott.Stark@jboss.org * @version $Revision: 65457 $ */ public interface Capability { /** * Return the name of the capability. * */ String getName(); /** * Return the map of properties. * * @return a Map */ Map getProperties(); } ././@LongLink0000000000000000000000000000020500000000000011562 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/repository/Resolver.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileserv0000644000175000017500000000302510674023354033533 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2007, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.profileservice.spi.repository; /** * Mirror the OBR Resolver * * @author Scott.Stark@jboss.org * @version $Revision: 65457 $ */ public interface Resolver { void add(Resource resource); Requirement[] getUnsatisfiedRequirements(); Resource[] getOptionalResources(); Requirement[] getReason(Resource resource); Resource[] getResources(Requirement requirement); Resource[] getRequiredResources(); Resource[] getAddedResources(); boolean resolve(); void deploy(boolean start); } ././@LongLink0000000000000000000000000000020400000000000011561 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/repository/Version.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileserv0000644000175000017500000002721610674023354033543 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2006, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.profileservice.spi.repository; import java.util.NoSuchElementException; import java.util.StringTokenizer; /** * OSGI version impl for now. * * Version identifier for bundles and packages. * *

* Version identifiers have four components. *

    *
  1. Major version. A non-negative integer.
  2. *
  3. Minor version. A non-negative integer.
  4. *
  5. Micro version. A non-negative integer.
  6. *
  7. Qualifier. A text string. See Version(String) for the * format of the qualifier string.
  8. *
* *

* Version objects are immutable. * * @version $Revision: 65457 $ * @since 1.3 * @author Scott.Stark@jboss.org * @author Copyright (c) OSGi Alliance (2004, 2006). All Rights Reserved. */ public class Version implements Comparable { private final int major; private final int minor; private final int micro; private final String qualifier; private static final String SEPARATOR = "."; //$NON-NLS-1$ /** * The empty version "0.0.0". Equivalent to calling * new Version(0,0,0). */ public static final Version emptyVersion = new Version(0, 0, 0); /** * Creates a version identifier from the specified numerical components. * *

* The qualifier is set to the empty string. * * @param major * Major component of the version identifier. * @param minor * Minor component of the version identifier. * @param micro * Micro component of the version identifier. * @throws IllegalArgumentException * If the numerical components are negative. */ public Version(int major, int minor, int micro) { this(major, minor, micro, null); } /** * Creates a version identifier from the specifed components. * * @param major * Major component of the version identifier. * @param minor * Minor component of the version identifier. * @param micro * Micro component of the version identifier. * @param qualifier * Qualifier component of the version identifier. If * null is specified, then the qualifier will be set * * to the empty string. * @throws IllegalArgumentException * If the numerical components are negative or the qualifier * string is invalid. */ public Version(int major, int minor, int micro, String qualifier) { if (qualifier == null) { qualifier = ""; //$NON-NLS-1$ } this.major = major; this.minor = minor; this.micro = micro; this.qualifier = qualifier; validate(); } /** * Created a version identifier from the specified string. * *

* Here is the grammar for version strings. * *

    * version ::= major('.'minor('.'micro('.'qualifier)?)?)?
    * major ::= digit+
    * minor ::= digit+
    * micro ::= digit+
    * qualifier ::= (alpha|digit|'_'|'-')+
    * digit ::= [0..9]
    * alpha ::= [a..zA..Z]
    * 
* * There must be no whitespace in version. * * @param version * String representation of the version identifier. * @throws IllegalArgumentException * If version is improperly formatted. */ public Version(String version) { int major = 0; int minor = 0; int micro = 0; String qualifier = ""; //$NON-NLS-1$ try { StringTokenizer st = new StringTokenizer(version, SEPARATOR, true); major = Integer.parseInt(st.nextToken()); if (st.hasMoreTokens()) { st.nextToken(); // consume delimiter minor = Integer.parseInt(st.nextToken()); if (st.hasMoreTokens()) { st.nextToken(); // consume delimiter micro = Integer.parseInt(st.nextToken()); if (st.hasMoreTokens()) { st.nextToken(); // consume delimiter qualifier = st.nextToken(); if (st.hasMoreTokens()) { throw new IllegalArgumentException("invalid format"); //$NON-NLS-1$ } } } } } catch (NoSuchElementException e) { throw new IllegalArgumentException("invalid format"); //$NON-NLS-1$ } this.major = major; this.minor = minor; this.micro = micro; this.qualifier = qualifier; validate(); } /** * Called by the Version constructors to validate the version components. * * @throws IllegalArgumentException * If the numerical components are negative or the qualifier * string is invalid. */ private void validate() { if (major < 0) { throw new IllegalArgumentException("negative major"); //$NON-NLS-1$ } if (minor < 0) { throw new IllegalArgumentException("negative minor"); //$NON-NLS-1$ } if (micro < 0) { throw new IllegalArgumentException("negative micro"); //$NON-NLS-1$ } int length = qualifier.length(); for (int i = 0; i < length; i++) { if ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-".indexOf(qualifier.charAt(i)) == -1) { //$NON-NLS-1$ throw new IllegalArgumentException("invalid qualifier"); //$NON-NLS-1$ } } } /** * Parses a version identifier from the specified string. * *

* See Version(String) for the format of the version string. * * @param version * String representation of the version identifier. Leading and * trailing whitespace will be ignored. * @return A Version object representing the version * identifier. If version is null or * the empty string then emptyVersion will be * returned. * @throws IllegalArgumentException * If version is improperly formatted. */ public static Version parseVersion(String version) { if (version == null) { return emptyVersion; } version = version.trim(); if (version.length() == 0) { return emptyVersion; } return new Version(version); } /** * Returns the major component of this version identifier. * * @return The major component. */ public int getMajor() { return major; } /** * Returns the minor component of this version identifier. * * @return The minor component. */ public int getMinor() { return minor; } /** * Returns the micro component of this version identifier. * * @return The micro component. */ public int getMicro() { return micro; } /** * Returns the qualifier component of this version identifier. * * @return The qualifier component. */ public String getQualifier() { return qualifier; } /** * Returns the string representation of this version identifier. * *

* The format of the version string will be major.minor.micro * if qualifier is the empty string or * major.minor.micro.qualifier otherwise. * * @return The string representation of this version identifier. */ public String toString() { String base = major + SEPARATOR + minor + SEPARATOR + micro; if (qualifier.length() == 0) { //$NON-NLS-1$ return base; } else { return base + SEPARATOR + qualifier; } } /** * Returns a hash code value for the object. * * @return An integer which is a hash code value for this object. */ public int hashCode() { return (major << 24) + (minor << 16) + (micro << 8) + qualifier.hashCode(); } /** * Compares this Version object to another object. * *

* A version is considered to be equal to another version if the * * major, minor and micro components are equal and the qualifier component is * equal (using String.equals). * * @param object * The Version object to be compared. * @return true if object is a * Version and is equal to this object; * false otherwise. */ public boolean equals(Object object) { if (object == this) { // quicktest return true; } if (!(object instanceof Version)) { return false; } Version other = (Version) object; return (major == other.major) && (minor == other.minor) && (micro == other.micro) && qualifier.equals(other.qualifier); } /** * Compares this Version object to another object. * *

* A version is considered to be less than another version if its * major component is less than the other version's major component, or the * major components are equal and its minor component is less than the other * version's minor component, or the major and minor components are equal and * its micro component is less than the other version's micro component, or * the major, minor and micro components are equal and it's qualifier * * component is less than the other version's qualifier component (using * * String.compareTo). * *

* A version is considered to be equal to another version if the * major, minor and micro components are equal and the qualifier component is * equal (using String.compareTo). * * @param object * The Version object to be compared. * @return A negative integer, zero, or a positive integer if this object is * less than, equal to, or greater than the specified * Version object. * @throws ClassCastException * If the specified object is not a Version. */ public int compareTo(Object object) { if (object == this) { // quicktest return 0; } Version other = (Version) object; int result = major - other.major; if (result != 0) { return result; } result = minor - other.minor; if (result != 0) { return result; } result = micro - other.micro; if (result != 0) { return result; } return qualifier.compareTo(other.qualifier); } } ././@LongLink0000000000000000000000000000020500000000000011562 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/repository/Resource.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileserv0000644000175000017500000000450110674023354033533 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2007, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.profileservice.spi.repository; import java.net.URI; import java.util.Map; /** * Mirror the OBR Resource view. * A resource is an abstraction of a downloadable thing, like a bundle. * * Resources have capabilities and requirements. All a resource's requirements * must be satisfied before it can be installed. * * @version $Revision: 65457 $ */ public interface Resource { final String LICENSE_URL = "license"; final String DESCRIPTION = "description"; final String DOCUMENTATION_URL = "documentation"; final String COPYRIGHT = "copyright"; final String SOURCE_URL = "source"; final String SYMBOLIC_NAME = "symbolicname"; final String PRESENTATION_NAME = "presentationname"; final String ID = "id"; final String VERSION = "version"; final String URI = "uri"; final String SIZE = "size"; final static String[] KEYS = { DESCRIPTION, SIZE, ID, LICENSE_URL, DOCUMENTATION_URL, COPYRIGHT, SOURCE_URL, PRESENTATION_NAME, SYMBOLIC_NAME, VERSION, URI }; Map getProperties(); String getSymbolicName(); String getPresentationName(); Version getVersion(); String getId(); URI getURI(); Requirement[] getRequirements(); Capability[] getCapabilities(); String[] getCategories(); Repository getRepository(); } ././@LongLink0000000000000000000000000000021700000000000011565 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/repository/CapabilityProvider.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileserv0000644000175000017500000000302310674023354033531 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2007, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.profileservice.spi.repository; /** * Mirror the OBR Capability * @author Scott.Stark@jboss.org * @version $Revision: 65457 $ */ public interface CapabilityProvider { /** * Return a set of capabilities. * * These capabilities are considered part of the platform. Bundles can * require these capabilities during selection. All capabilities from * different providers are considered part of the platform. * * @return Set of capabilities */ Capability[] getCapabilities(); } ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/types/libjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileserv0000755000175000017500000000000011116055614033525 5ustar twernertwerner././@LongLink0000000000000000000000000000021700000000000011565 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/types/ControllerStateMetaType.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileserv0000644000175000017500000000350011111450003033507 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2008, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.profileservice.spi.types; import java.util.Arrays; import org.jboss.dependency.spi.ControllerState; import org.jboss.metatype.api.types.EnumMetaType; /** * An EnumMetaType for the kernel ControllerState values. * * @author Scott.Stark@jboss.org * @version $Revision: 81394 $ */ public class ControllerStateMetaType extends EnumMetaType { private static final long serialVersionUID = 2; private static final String[] VALID_VALUES = { "**ERROR**", "Not Installed", "PreInstall", "Described", "Instantiated", "Configured", "Create", "Start", "Installed" }; public static final EnumMetaType TYPE = new ControllerStateMetaType(); private ControllerStateMetaType() { super(ControllerState.class.getName(), Arrays.asList(VALID_VALUES)); } } ././@LongLink0000000000000000000000000000020300000000000011560 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ProfileRepository.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileserv0000644000175000017500000000534011107313201033516 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2006, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.profileservice.spi; import java.io.IOException; import java.util.Collection; /** * An interface for obtaining DeploymentRepository for a Profile. * * @author Scott.Stark@jboss.org * @version $Revision:$ */ public interface ProfileRepository { /** * Get the keys for all known profiles * @return keys for all known profiles */ public Collection getProfileKeys(); /** * Create a new DeploymentRepository for a profile. * * @param key - the key for the Profile to create the DeploymentRepository for. * @return the profile DeploymentRepository * @throws IOException thrown if the repository cannot be created or * already exists * @throws Exception for any error */ public DeploymentRepository createProfileDeploymentRepository(ProfileKey key) throws Exception; /** * Get the DeploymentRepository for the given profile key. * * @param key - the key for the Profile to obtain the DeploymentRepository for. * @return the profile DeploymentRepository * @throws NoSuchProfileException thrown if there is no such profile. * @throws Exception for any error */ public DeploymentRepository getProfileDeploymentRepository(ProfileKey key) throws Exception, NoSuchProfileException; /** * Remove the DeploymentRepository for the given profile key. * @param key - the key for the Profile to obtain the DeploymentRepository for. * @throws IOException thrown on error removing the repository * @throws NoSuchProfileException thrown if there is no such profile. * @throws Exception for any error */ public void removeProfileDeploymentRepository(ProfileKey key) throws Exception, NoSuchProfileException; } ././@LongLink0000000000000000000000000000021300000000000011561 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/NoSuchDeploymentException.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileserv0000644000175000017500000000300711107313201033514 0ustar twernertwerner/* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.profileservice.spi; /** * An exception thrown when there is no matching deployment. * * @author Scott.Stark@jboss.org * @version $Revision$ */ public class NoSuchDeploymentException extends Exception { private static final long serialVersionUID = 1; public NoSuchDeploymentException() { } public NoSuchDeploymentException(String msg) { super(msg); } public NoSuchDeploymentException(String msg, Throwable cause) { super(msg, cause); } } ././@LongLink0000000000000000000000000000021000000000000011556 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/NoSuchProfileException.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileserv0000644000175000017500000000313711107313201033520 0ustar twernertwerner/* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.profileservice.spi; /** * Exception thrown when a profile query failes to find a match. * * @author Scott.Stark@jboss.org * @version $Revision$ */ public class NoSuchProfileException extends Exception { /** The serialVersionUID */ private static final long serialVersionUID = 461561859030090797L; public NoSuchProfileException(String message) { super(message); } public NoSuchProfileException(String message, Throwable cause) { super(message, cause); } public NoSuchProfileException(Throwable cause) { super(cause); } } ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/Profile.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileserv0000644000175000017500000001401311111467354033531 0ustar twernertwerner/* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.profileservice.spi; import java.util.Collection; import java.util.Map; import java.util.Set; import org.jboss.deployers.vfs.spi.client.VFSDeployment; import org.jboss.managed.api.ManagedComponent; import org.jboss.managed.api.ManagedDeployment.DeploymentPhase; import org.jboss.virtual.VirtualFile; /** * A profile represents a named collection of deployments on a server * * @author Scott.Stark@jboss.org * @author adrian@jboss.org * @version $Revision$ */ public interface Profile { /** * Get the key used to create the Profile * @return the key used to create the Profile */ ProfileKey getKey(); /** * The x.y.z version of the profile * * @return the version if known, null if its unspecified. */ String getVersion(); /** * Get the system time in milliseconds the profile was last modified. * @return System.currentTimeMillis of last modification */ long getLastModified(); /** * Get the names of the deployments in the profile * @return names of deployments */ Set getDeploymentNames(); /** * Get the names of the deployments for the given phase defined in this profile * @param phase - the phase of the deployment as it relates to when the * deployment is loaded * @return names of deployments */ Set getDeploymentNames(DeploymentPhase phase); //public DeploymentInfo getDeploymentInfo(String name); /** * Get the root for deployments of the given phase. * * @param phase the deployment phase * @return the VirtualFile directory that contains deployments of the * given phase. * @throws Exception for any error */ VirtualFile getRootFile(DeploymentPhase phase) throws Exception; /** * Add a deployment * * @param d the deployment * @param phase - the phase of the deployment as it relates to when the * deployment is loaded * @throws Exception for any error */ void addDeployment(VFSDeployment d, DeploymentPhase phase) throws Exception; /** * Update a deployment. This can be used to save attachments, other * metadata of the deployment. * * @param d the deployment * @param phase - the phase of the deployment as it relates to when the * deployment is loaded * @param attachments - the attachments that have been modified * @throws Exception for any error */ void updateDeployment(VFSDeployment d, DeploymentPhase phase, ManagedComponent comp) throws Exception; /** * Remove a deployment * * @param name the deployment name * @param phase - the phase of the deployment as it relates to when the * deployment is loaded * @return the DeploymentContext for the name if found * @throws Exception for any error */ VFSDeployment removeDeployment(String name, DeploymentPhase phase) throws Exception; /** * Get a named deployment. * * @param name - the deployment name * @param phase - the phase of the deployment as it relates to when the * deployment is loaded. If null, then all phases are queried. * @return the named bootstrap * @throws Exception for any error * @throws NoSuchDeploymentException - if there is no such bootstrap */ VFSDeployment getDeployment(String name, DeploymentPhase phase) throws Exception, NoSuchDeploymentException; /** * @param phase - the phase of the deployment as it relates to when the * deployment is loaded * @return the bootstrap instances in this profile. * @throws Exception for any error */ Collection getDeployments(DeploymentPhase phase) throws Exception; /** * Get all deployments defined in this profile * * @return the deployment instances in this profile. * @throws Exception for any error */ Collection getDeployments() throws Exception; /** * Get the deployments that have been modified since the last * check. * * @return the modified deployments, empty if none exist or * the profile does not support hot deployments. * * @throws Exception - thrown on error scanning for deployments */ Collection getModifiedDeployments() throws Exception; /** * Enable/disable the getModifiedDeployments results. This can be * used to disable the getModifiedDeployments results during * periods such as bootstrap where changes should be delayed. * @see #getModifiedDeployments * @param flag - the enable/disable flag */ void enableModifiedDeploymentChecks(boolean flag); /** * Get the config * * @return the config */ Map getConfig(); /** * Checks whether a deployment context is available in the basic profile service. * * @param name the name of the deployment * @param phase optionally a deployment phase, if null search all * @return true if the deployment is found or false otherwise */ boolean hasDeployment(String name, DeploymentPhase phase); } ././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/DeploymentRepository.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileserv0000644000175000017500000002346011111467354033537 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2006, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.profileservice.spi; import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.net.URISyntaxException; import java.util.Collection; import java.util.Set; import org.jboss.deployers.spi.attachments.Attachments; import org.jboss.deployers.vfs.spi.client.VFSDeployment; import org.jboss.managed.api.ManagedComponent; import org.jboss.managed.api.ManagedDeployment.DeploymentPhase; import org.jboss.virtual.VirtualFile; /** * An interface for managing the contents of a Profile. * * @author Scott.Stark@jboss.org * @author adrian@jboss.org * @version $Revision: 81408 $ */ public interface DeploymentRepository { /** * Get the admin attachments root path * @return path to the root directory for attachments */ public String getAttachmentsRoot(); /** * Set the admin attachments root path * @param root - path to the root directory for attachments */ public void setAttachmentsRoot(String root); /** * Create the repository * @throws Exception */ public void create() throws Exception; /** * Load the repository contents * @throws Exception */ public void load() throws Exception; /** * Delete the repository * @throws Exception */ public void remove() throws Exception; /** * Get the time any contents were last modified * @return */ public long getLastModified(); /** * Get the URI of the root of deployments for the given phase. * @param phase - the phase of deployment * @return URI of the root of deployments for the given phase. */ public URI getDeploymentURI(DeploymentPhase phase); /** * Get the URI of the root of deployments for the given phase. * @param phase - the phase of deployment * @param uri - URI of the root of deployments */ public void setDeploymentURI(URI uri, DeploymentPhase phase); /** * Get the names of all deployments in the repository * @return */ public Set getDeploymentNames(); /** * Get the names of all deployments in the repository for the * given phase. * @param phase - the phase of deployment * @return names of all deployments */ public Set getDeploymentNames(DeploymentPhase phase); /** * Upload raw deployment content to a profile repository. This does not make * the deployment avaialble to * @param vfsPath - the vfs path relative to the phase root * @param contentIS - the input stream for the deployment contents * @param phase - the phase of the deployment as it relates to when the * deployment is loaded * @throws IOException * @return the unique name of the deployment in the repository */ public String addDeploymentContent(String vfsPath, InputStream contentIS, DeploymentPhase phase) throws IOException; /** * Get repository names. * * @param names the names * @param phase the deployment phase * @return full repository names * @throws IOException for any error */ public String[] getRepositoryNames(String[] names, DeploymentPhase phase) throws IOException; /** * Get the repository virtual file for the given deployment name * @param name - the unique virtual file URI name as returned by addDeploymentContent * @param phase - the phase of the deployment as it relates to when the deployment is loaded * @return the deployment content virtual file * @throws IOException for any error */ public VirtualFile getDeploymentContent(String name, DeploymentPhase phase) throws IOException, URISyntaxException; /** * lock deployment content and exclude it from modified deployment checks. * @param vfsPath - the content vfs path relative to the deployment phase root * @param phase - the deployment phase * @return the deployment content flags, {@linkplain DeploymentContentFlags} */ public int lockDeploymentContent(String vfsPath, DeploymentPhase phase); /** * Unlock a previously locked deployment content. * @param vfsPath - the content vfs path relative to the deployment phase root * @param phase - the deployment phase * @return the deployment content flags, {@linkplain DeploymentContentFlags} */ public int unlockDeploymentContent(String vfsPath, DeploymentPhase phase); /** * Get the status flags for the deployment path * @param vfsPath - the content vfs path relative to the deployment phase root * @param phase - the deployment phase * @return the deployment content flags, {@linkplain DeploymentContentFlags} */ public int getDeploymentContentFlags(String vfsPath, DeploymentPhase phase); /** * Set one or more flags for the deployment. * @see #clearDeploymentContentFlags(String, DeploymentPhase, int) * * @param vfsPath - the content vfs path relative to the deployment phase root * @param phase - the deployment phase * @param flags - the deployment content flags, {@linkplain DeploymentContentFlags} */ public int setDeploymentContentFlags(String vfsPath, DeploymentPhase phase, int flags); /** * Clear one or more flags for the deployment. This ands the compliment of * the flags argument into the existing content flags and returns the result. * * @param vfsPath - the content vfs path relative to the deployment phase root * @param phase - the deployment phase * @param flags - the deployment content flags, {@linkplain DeploymentContentFlags} */ public int clearDeploymentContentFlags(String vfsPath, DeploymentPhase phase, int flags); /** * Does a deployment content have the indicated flag. * * @param vfsPath - the content vfs path relative to the deployment phase root * @param phase - the deployment phase * @param flags - the deployment content flags, {@linkplain DeploymentContentFlags} * @return true if the content flags contains the flag, false otherwise. */ public boolean hasDeploymentContentFlags(String vfsPath, DeploymentPhase phase, int flag); /** * Acquire the repository write lock. This generally prevents content * uploads and {@link #getModifiedDeployments()} calls while the lock is * held. */ public void acquireDeploymentContentLock(); /** * Release the previously aquired repository write lock. */ public void releaseDeploymentContentLock(); /** * Add a deployment * * @param vfsPath the path * @param d the deployment * @param phase - the phase of the deployment as it relates to when the * deployment is loaded * @throws Exception for any error */ public void addDeployment(String vfsPath, VFSDeployment d, DeploymentPhase phase) throws Exception; /** * Update a deployments attachments. This persists the deployments * pre-determined attachments. * * @param vfsPath - the vfs path relative to the phase root for the deployment * @param phase - the deployment phase * @param comp - the ManagedComponent that has been modified * @throws Exception */ public void updateDeployment(VFSDeployment d, DeploymentPhase phase, ManagedComponent comp) throws Exception; /** * Get a named deployment. * * @param name - the deployment name * @param phase - the phase of the deployment as it relates to when the * deployment is loaded * @return the named bootstrap * @throws NoSuchDeploymentException - if there is no such bootstrap * @throws IOException * @throws Exception for any error */ public VFSDeployment getDeployment(String name, DeploymentPhase phase) throws NoSuchDeploymentException, Exception; /** * Remove a deployment * * @param vfsPath - the vfs path * @param phase - the phase of the deployment as it relates to when the * deployment is loaded * @return the removed deployment * @throws Exception for any error */ public VFSDeployment removeDeployment(String vfsPath, DeploymentPhase phase) throws Exception; /** * Get all deployments for the given phase defined in this profile * * @param phase - the phase of the deployment as it relates to when the * deployment is loaded * @return the bootstrap instances in this profile. * @throws Exception for any error */ public Collection getDeployments(DeploymentPhase phase) throws Exception; /** * Get all deployments defined in this profile * * @return the deployment instances in this profile. * @throws Exception for any error */ public Collection getDeployments() throws Exception; public Collection getModifiedDeployments() throws Exception; // Managed object attachments for a deployment public void addManagedObject(String vfsPath, Attachments edits) throws Exception; } ././@LongLink0000000000000000000000000000020700000000000011564 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/AttachmentsSerializer.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileserv0000644000175000017500000000263211106630026033525 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2006, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.profileservice.spi; /** * An interface that allows externalization of the attachment * serialization details. * * @author Scott.Stark@jboss.org * @version $Revision:$ */ public interface AttachmentsSerializer { public void saveAttachment(String baseName, Object attachment) throws Exception; public T loadAttachment(String baseName, Class expected) throws Exception; } ././@LongLink0000000000000000000000000000020200000000000011557 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ModificationInfo.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileserv0000644000175000017500000000401310640767315033536 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2006, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.profileservice.spi; import java.io.Serializable; import org.jboss.deployers.vfs.spi.client.VFSDeployment; /** * Represents a modified deployment returned from the modified deployments scan. * * @see Profile#getModifiedDeployments() * * @author Scott.Stark@jboss.org * @author adrian@jboss.org * @version $Revision: 63730 $ */ public class ModificationInfo implements Serializable { private final static long serialVersionUID = 1; public enum ModifyStatus {ADDED, MODIFIED, REMOVED}; private VFSDeployment deployment; private long lastModified; private ModifyStatus status; public ModificationInfo(VFSDeployment deployment, long lastModified, ModifyStatus status) { this.deployment = deployment; this.lastModified = lastModified; this.status = status; } public VFSDeployment getDeployment() { return deployment; } public long getLastModified() { return lastModified; } public ModifyStatus getStatus() { return status; } } ././@LongLink0000000000000000000000000000020000000000000011555 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ProfileService.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileserv0000644000175000017500000000604211107313201033516 0ustar twernertwerner/* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.profileservice.spi; import java.util.Collection; import org.jboss.deployers.spi.management.ManagementView; import org.jboss.deployers.spi.management.deploy.DeploymentManager; /** * The entry point service for accessing/administiring server profiles * * @todo this should be broken up into different feature plugin services * * @author Scott.Stark@jboss.org * @version $Revision$ */ public interface ProfileService { // Querying profiles /** * Get the unique domains for which profiles exist * @return array of profile domains */ public String[] getDomains(); /** * Get the keys for all known profiles * @return keys for all known profiles */ public Collection getProfileKeys(); /** * Obtain the profile for the key. * * @param key - the key for the profile * @return the matching profile. * @throws NoSuchProfileException */ public Profile getProfile(ProfileKey key) throws NoSuchProfileException; /** * Get the active profile. * @return the active profile * @throws NoSuchProfileException thrown if there is no * active profile */ public Profile getActiveProfile() throws NoSuchProfileException; /** * Get a list of the deployment names associated with a profile. * @param key - the key for the profile * @return the list of deployment names. * @throws NoSuchProfileException */ public String[] getProfileDeploymentNames(ProfileKey key) throws NoSuchProfileException; /** * Obtain the ManagementView plugin * @return the ManagementView plugin if supported */ public ManagementView getViewManager(); /** * Obtain the DeploymentManager plugin * @return the DeploymentManager plugin if supported */ public DeploymentManager getDeploymentManager(); // Admin of profiles @todo could be an option plugin public Profile newProfile(ProfileKey key) throws Exception; public void removeProfile(ProfileKey key) throws Exception; } ././@LongLink0000000000000000000000000000021500000000000011563 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/DeploymentRepositoryFactory.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileserv0000644000175000017500000000240010551635232033525 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2006, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.profileservice.spi; /** * A factory for DeploymentRepository * * @author Scott.Stark@jboss.org * @version $Revision:$ */ public interface DeploymentRepositoryFactory { public DeploymentRepository getDeploymentRepository(ProfileKey key); } ././@LongLink0000000000000000000000000000021000000000000011556 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/DeploymentContentFlags.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileserv0000644000175000017500000000312211107313201033512 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2008, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.profileservice.spi; /** * States for DeploymentRepository content * * @author Scott.Stark@jboss.org * @version $Revision:$ */ public interface DeploymentContentFlags { /** content that is not publicly visible in profile */ public static final int DISABLED=1; /** content that is visible in profile */ public static final int ENABLED=2; /** exists in profile, but is excluded from modified deployment checks. */ public static final int LOCKED=4; /** Can be used to explicitly put a deployment into the modified list */ public static final int MODIFIED=8; } ././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ProfileConfiguration.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileserv0000644000175000017500000000237111107313201033517 0ustar twernertwerner/* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.profileservice.spi; /** * The configuration of the deployments that make up a profile * @author Scott.Stark@jboss.org * @version $Revision$ */ public interface ProfileConfiguration { public Profile getProfile(); } ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ProfileKey.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/profileserv0000644000175000017500000001023711107332703033527 0ustar twernertwerner/* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.profileservice.spi; import java.io.Serializable; /** * The key for a Profile. It consists of the domain, server and name. * * @author Scott.Stark@jboss.org * @version $Revision:$ */ public class ProfileKey implements Comparable, Serializable { private static final long serialVersionUID = 1; /** The DEFAULT value for domain, server, name */ public static final String DEFAULT = "default"; /** The profile domain/cluster */ private String domain; /** The server/node */ private String server; /** The profile name */ private String name; /** * Calls this this(DEFAULT, DEFAULT, name) * @param name - the profile name */ public ProfileKey(String name) { this(DEFAULT, DEFAULT, name); } /** * Build a profile key from the domain, server and name. If any parameter * is null it defaulted to "default". * * @param domain - the admin domain * @param server - the server instance name * @param name - the profile name */ public ProfileKey(String domain, String server, String name) { if( domain == null ) domain = DEFAULT; this.domain = domain; if( server == null ) server = DEFAULT; this.server = server; if( name == null ) name = DEFAULT; this.name = name; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDomain() { return domain; } public void setDomain(String domain) { this.domain = domain; } public String getServer() { return server; } public void setServer(String server) { this.server = server; } /** * Is this a default key. A default key is one where all * fields are {@link #DEFAULT} * @return true if default, false otherwise. */ public boolean isDefaultKey() { return DEFAULT.equalsIgnoreCase(domain) && DEFAULT.equalsIgnoreCase(server) && DEFAULT.equalsIgnoreCase(name); } /** * Compare based on domain, then server and finally name. * * @param o - the ProfileKey instance to compare to * @return < 0, 0, > 0 based on whether this is less than, equal to * or greater than o. */ public int compareTo(Object o) { ProfileKey pk = (ProfileKey) o; int compareTo = domain.compareTo(pk.domain); if( compareTo == 0 ) { compareTo = server.compareTo(pk.server); if( compareTo == 0 ) { compareTo = name.compareTo(pk.name); } } return compareTo; } public boolean equals(Object o) { return compareTo(o) == 0; } public int hashCode() { int hash = domain.hashCode() + server.hashCode() + name.hashCode(); return hash; } public String toString() { StringBuilder tmp = new StringBuilder(super.toString()); tmp.append('['); tmp.append("domain="); tmp.append(domain); tmp.append(",server="); tmp.append(server); tmp.append(",name="); tmp.append(name); tmp.append(']'); return tmp.toString(); } } libjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/0000755000175000017500000000000011116055615033253 5ustar twernertwerner././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/libjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/s0000755000175000017500000000000011116055615033436 5ustar twernertwerner././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/libjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/s0000755000175000017500000000000011116055615033436 5ustar twernertwerner././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/ManagementView.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/s0000644000175000017500000001603011110224053033424 0ustar twernertwerner/* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.deployers.spi.management; import java.net.URL; import java.util.Set; import org.jboss.deployers.spi.management.deploy.DeploymentProgress; import org.jboss.managed.api.ComponentType; import org.jboss.managed.api.DeploymentTemplateInfo; import org.jboss.managed.api.ManagedComponent; import org.jboss.managed.api.ManagedDeployment; import org.jboss.managed.api.ManagedDeployment.DeploymentPhase; import org.jboss.profileservice.spi.NoSuchDeploymentException; import org.jboss.profileservice.spi.NoSuchProfileException; import org.jboss.profileservice.spi.ProfileKey; /** * The management view plugin spi for querying profiles for the * deployemnt management object interface roots. * * @author Scott.Stark@jboss.org * @version $Revision$ */ public interface ManagementView { /** * Load and associate the given profile with the ManagementView * for future operations. This must be called before the other ManagementView * operations may be used. Currently there can only be one actively loaded * profile against which a client is performing management operations. * * @param key - the profile key to load * @throws NoSuchProfileException */ public void loadProfile(ProfileKey key) throws Exception; /** * Get the names of the deployment in the profile. * * @return the names */ public Set getDeploymentNames(); /** * Get the names of the deployment in the profile that have the * given deployment type. * @param type - the deployment type * @return the names */ public Set getDeploymentNamesForType(String type); /** * Search for all deployment names with a name matching the regex expression. * @param regex - the regex to query deployment name * @return the deployment name. * @throws NoSuchDeploymentException if no matches are found */ public Set getMatchingDeploymentName(String regex) throws NoSuchDeploymentException; /** * Search for all deployments matched by the matcher. * @param name - the name to input to the matcher * @param matcher - the matcher * @return a possibly empty set of ManagedDeployment accepted by the matcher * @throws Exception */ public Set getMatchingDeployments(String name, NameMatcher matcher) throws NoSuchDeploymentException, Exception; /** * Get a deployment * * @param name the name * @param phase the phase * @return the deployment * @throws NoSuchDeploymentException if no matches are found * @throws Exception for any error */ public ManagedDeployment getDeployment(String name, DeploymentPhase phase) throws NoSuchDeploymentException, Exception; /** * Get the deployments of a type. * @param type - the deployment or module type. * @return the possibly empty set of deployment with the given type. * @throws Exception */ public Set getDeploymentsForType(String type) throws Exception; /** * Get the components of a type. The * @param type - the component type. * @return the possibly empty set of components with the given type. * @throws Exception */ public Set getComponentsForType(ComponentType type) throws Exception; /** * Obtain the ManagedComponent for the given name/type * * @see #getComponent(String, ComponentType, NameMatcher) * @param name - the ManagedComponent#getName value to match * @param type - the component type * @return the possibly null ManagedComponent * @throws Exception */ public ManagedComponent getComponent(String name, ComponentType type) throws Exception; /** * Obtain the ManagedComponents for the given name/type and matcher. * * @param name - the ManagedComponent#getName value to match * @param type - the component type * @param matcher - a matcher that compares name to candidate ManagedComponent * @return the possibly empty set of ManagedComponent matches. * @throws Exception */ public Set getMatchingComponents(String name, ComponentType type, NameMatcher matcher) throws Exception; /** * Update the given component. This takes the component ManagedDeployment, * obtains the ManagedObject set for the underlying deployment, and applies * the component ManagedProperty set to matching the deployment ManagedObject * properties. * * @param comp * @throws Exception */ public void updateComponent(ManagedComponent comp) throws Exception; /** * Get the registered DeploymentTemplate names. * * TODO: probably needs a Map notion * @return the template names */ public Set getTemplateNames(); /** * Get a deployment template. * * @param name - the deployment name to identify the template to retrieve * @return the named DeploymentTemplate * @throws NoSuchDeploymentException - if there is no such template */ public DeploymentTemplateInfo getTemplate(String name) throws NoSuchDeploymentException; /** * * @param phase * @param deploymentBaseName * @param info * @throws Exception */ public void applyTemplate(DeploymentPhase phase, String deploymentBaseName, DeploymentTemplateInfo info) throws Exception; /** * Remove a deployment * * @param deploymentName the deployment name * @param phase the phase * @throws NoSuchProfileException * @throws NoSuchDeploymentException * @throws Exception for any error */ public void removeDeployment(String deploymentName, DeploymentPhase phase) throws NoSuchDeploymentException, Exception; /** * Process the changes made to the profile. * * @throws Exception */ public void process() throws Exception; /** * Reload the current profiles managed deployments/objects. */ public void reloadProfile() throws Exception; } ././@LongLink0000000000000000000000000000020300000000000011560 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/NameMatcher.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/s0000644000175000017500000000302011110224053033417 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2008, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.deployers.spi.management; import org.jboss.managed.api.ComponentType; /** * An interface for matching a name against a managed element * * @see ManagementView##getComponent(String, ComponentType, NameMatcher) * * @author Scott.Stark@jboss.org * @version $Revision:$ */ public interface NameMatcher { /** * * @param managed - the managed element whose name is to be matched * @param name - the name input from the client * @return */ public boolean matches(T comp, String name); } ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/libjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/s0000755000175000017500000000000011116055615033436 5ustar twernertwerner././@LongLink0000000000000000000000000000022100000000000011560 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentProgress.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/s0000644000175000017500000000422211107313201033424 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2008, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.deployers.spi.management.deploy; import java.util.List; /** * An interface for tracking the progress of a deployment upload to a * profile via the profile service ManagementView spi. * * @author Scott.Stark@jboss.org * @version $Revision:$ */ public interface DeploymentProgress { /** * Retrieve the status of the deployment * * @return the status */ DeploymentStatus getDeploymentStatus(); /** * Get the identifier for the deployment the progress applies to * @return */ DeploymentID getDeploymentID(); /** * Retrieve the list of targets the deployment is distributed to * * @return the deployment targets */ List getDeploymentTargets(); /** * Begins the deployment command */ void run(); /** * Cancels the deployment * */ void cancel(); /** * Add a progress listener * * @param listener the listener */ void addProgressListener(ProgressListener listener); /** * Remove a progress listener * * @param listener the listener */ void removeProgressListener(ProgressListener listener); } ././@LongLink0000000000000000000000000000021700000000000011565 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentStatus.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/s0000644000175000017500000000470511107313201033432 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2008, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.deployers.spi.management.deploy; /** * A deployment status interface used to provide information about a * DeploymentProgress event associated with a {@linkplain DeploymentManager} * command. * * @author Scott.Stark@jboss.org * @version $Revision: 81070 $ */ public interface DeploymentStatus { public enum StateType { UPLOADING, DEPLOYING, RUNNING, COMPLETED, FAILED, CANCELLED } public enum CommandType { DISTRIBUTE, PREPARE, START, STOP, UNDEPLOY, REDEPLOY } /** * Get the state of the deployment * * @return the state */ StateType getState(); /** * The deployment command * * @return the command */ CommandType getCommand(); /** * The target the status applies to * @return */ DeploymentTarget getTarget(); /** * Get the current status message * * @return the message */ String getMessage(); /** * Get the failure exception. * @return any failure exception associated with reaching the FAILED state. */ Exception getFailure(); /** * Is the deployment complete * * @return true when complete, false otherwise */ boolean isCompleted(); /** * Has the deployment failed * * @return true when failed, false otherwise */ boolean isFailed(); /** * Is the deployment in progress * * @return true when in progress, false otherwise */ boolean isRunning(); } ././@LongLink0000000000000000000000000000021700000000000011565 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentTarget.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/s0000644000175000017500000000366511107313201033436 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2008, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.deployers.spi.management.deploy; import org.jboss.managed.api.ManagedDeployment.DeploymentPhase; /** * A target to which a deployment is uploaded. * * @author Scott.Stark@jboss.org * @version $Revision:$ */ public interface DeploymentTarget { /** * Get the target name * * @return the name */ String getName(); void distribute(DeploymentID deployment) throws Exception; String[] getRepositoryNames(String[] names, DeploymentPhase phase) throws Exception; void redeploy(DeploymentID deployment) throws Exception; void prepare(DeploymentID deployment) throws Exception; void start(DeploymentID deployment) throws Exception; void stop(DeploymentID deployment) throws Exception; void undeploy(DeploymentID deployment) throws Exception; /** * Get the target description * * @return the description */ String getDescription(); } ././@LongLink0000000000000000000000000000021400000000000011562 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/ProgressEvent.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/s0000644000175000017500000000376411107313201033436 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2008, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.deployers.spi.management.deploy; import java.io.Serializable; /** * A deployment progress event object. * * @author Scott.Stark@jboss.org * @version $Revision:$ */ public class ProgressEvent implements Serializable { private static final long serialVersionUID = 1; private DeploymentID deploymentTargetID; private DeploymentStatus status; public ProgressEvent(DeploymentID deploymentTargetID, DeploymentStatus status) { super(); this.deploymentTargetID = deploymentTargetID; this.status = status; } public DeploymentID getDeploymentName() { return deploymentTargetID; } public DeploymentStatus getStatus() { return status; } public String toString() { StringBuffer tmp = new StringBuffer("ProgressEvent("); tmp.append("deploymentTargetID="); tmp.append(this.deploymentTargetID); tmp.append("status="); tmp.append(this.status); tmp.append(")"); return tmp.toString(); } } ././@LongLink0000000000000000000000000000021700000000000011565 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/ProgressListener.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/s0000644000175000017500000000236211107313201033427 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2008, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.deployers.spi.management.deploy; /** * A progress notification listener interface * * @author Scott.Stark@jboss.org * @version $Revision:$ */ public interface ProgressListener { void progressEvent(ProgressEvent eventInfo); } ././@LongLink0000000000000000000000000000022000000000000011557 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentManager.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/s0000644000175000017500000001317311107313201033431 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2008, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.deployers.spi.management.deploy; import java.net.URL; import org.jboss.managed.api.ManagedDeployment.DeploymentPhase; import org.jboss.profileservice.spi.ProfileKey; /** * An interface for uploading and controlling deployments in a profile. * * @author Scott.Stark@jboss.org * @version $Revision:$ */ public interface DeploymentManager { /** * Load and associate the given profile with the DeploymentManager * for future operations. * * @param key - the profile to load * @param allowHotDeployments - Can be used to suspend hot deployment * processing while working against a live server to avoid conflicts. * @throws Exception for any error */ public void loadProfile(ProfileKey key, boolean allowHotDeployments) throws Exception; /** * Release a profile. This frees any resources and resets the hot deployment * processing. * * @param key - the profile to load * @param allowHotDeployments - Can be used to suspend hot deployment * processing while working against a live server to avoid conflicts. * @throws Exception */ public void releaseProfile(ProfileKey key, boolean allowHotDeployments) throws Exception; /** * Add raw deployment content to the profile. * * @param name phase unique name * @param phase the phase this deployment applies to * @param contentURL - URL for obtaining the deployment archive * @return DeploymentProgress progress object for the deployment */ @Deprecated public DeploymentProgress distribute(String name, DeploymentPhase phase, URL contentURL) throws Exception; /** * Add raw deployment content to the profile. * * @param name phase unique name * @param phase the phase this deployment applies to * @param contentURL - URL for obtaining the deployment archive * @param copyContent should we copy content or just reference it * @return DeploymentProgress progress object for the deployment */ public DeploymentProgress distribute(String name, DeploymentPhase phase, URL contentURL, boolean copyContent) throws Exception; /** * Map from the external name passed to distribute to the uploaded * deployment repository name. * * @param names - the list of external deployment names * @param phase the deployment phase * @return the mapped list of unique names in the deployment repository. * @throws Exception for any error */ public String[] getRepositoryNames(String[] names, DeploymentPhase phase) throws Exception; /** * Is redeploy supported. * * @return true if redeploy suported */ public boolean isRedeploySupported(); /** * Do redeploy. * * @param name the deployment to redeploy * @param phase the deployment phase * @param contentURL deployment's url * @return a DeploymentProgress used to run and track the redeploy progress. */ public DeploymentProgress redeploy(String name, DeploymentPhase phase, URL contentURL) throws Exception; /** * Prepare a set of deployments through their dependency analysis phase. * * @param phase the deployment phase * @param names the unique names of the deployments within the phase to prepare * @return a DeploymentProgress used to run and track the prepare progress. * @throws Exception for any error */ public DeploymentProgress prepare(DeploymentPhase phase, String... names) throws Exception; /** * Start a previously distributed deployment. * * @param phase the deployment phase * @param names the unique names of the deployments within the phase to start * @return a DeploymentProgress used to run and track the start progress. * @throws Exception for any error */ public DeploymentProgress start(DeploymentPhase phase, String... names) throws Exception; /** * Stop a previously started deployment. * * @param phase the deployment phase * @param names the unique names of the deployments within the phase to stop * @return a DeploymentProgress used to run and track the stop progress. * @throws Exception for any error */ public DeploymentProgress stop(DeploymentPhase phase, String... names) throws Exception; /** * Undeploy a previously distributed deployment. * * @param phase the deployment phase * @param names the unique names of the deployments within the phase to prepare * @return a DeploymentProgress used to run and track the prepare progress. * @throws Exception for any error */ public DeploymentProgress undeploy(DeploymentPhase phase, String... names) throws Exception; } ././@LongLink0000000000000000000000000000021300000000000011561 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/deploy/DeploymentID.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/s0000644000175000017500000000501411107313201033424 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2008, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.deployers.spi.management.deploy; import java.net.URL; import org.jboss.managed.api.ManagedDeployment.DeploymentPhase; /** * A representation of a top-level deployment id. * * @author Scott.Stark@jboss.org * @version $Revision:$ */ public interface DeploymentID { /** * Get the names of the deployments * * @return the deployment name */ String[] getNames(); /** * Get the unique names of the deployments in the repository. Some DeploymentManager * operations like distribute produce an alternate unique name that differs * from the input name. In this case this method will provide the unique * names for the input names. Otherwise this returns the same value as * getNames. * @return the unique names of the deployments in the repository */ String[] getRepositoryNames(); /** * Set the unique names of the deployments in the repository. * @see #getRepositoryNames() * @param names - the unique names of the deployments in the repository */ public void setRepositoryNames(String[] names); /** * Get the phase the deployment is associated with * @return */ DeploymentPhase getPhase(); /** * An optional content URL used for distribute/redeploy operations. * @return */ public URL getContentURL(); /** * Do we copy content or jut ref it. * @return */ boolean isCopyContent(); /** * Get a description of the deployment * * @return the identifier */ String getDescription(); } ././@LongLink0000000000000000000000000000021400000000000011562 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/KnownDeploymentTypes.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/s0000644000175000017500000000406211107313201033426 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2008, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.deployers.spi.management; import org.jboss.managed.api.ManagedDeployment; /** * Enum for the known deployment types. * @see {@linkplain ManagedDeployment#getTypes()} * * @author Scott.Stark@jboss.org * @version $Revision:$ */ public enum KnownDeploymentTypes { JavaEEApplication("ear"), JavaEEClientApplication("car"), JavaEEEnterpriseBeans2x("ejb2x"), JavaEEEnterpriseBeans3x("ejb3x"), JavaEEWebApplication("war"), JavaEEResourceAdaptor("rar"), JavaEEPersistenceUnit("par"), JBossServices("sar"), MCBeans("beans"), OSGIBundle("bundle"), SpringApplication("spring"), Unknown("*") ; /** The simple type string, usually used as the deployment archive suffix */ private final String type; private KnownDeploymentTypes(String type) { this.type = type; } /** * Get the simple deployment type string. This is usually used as the * associated deployment archive suffix. * * @return the simple deployment type string. */ public String getType() { return type; } } ././@LongLink0000000000000000000000000000021300000000000011561 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/KnownComponentTypes.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/s0000644000175000017500000001222411030474505033437 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2006, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.deployers.spi.management; import org.jboss.managed.api.ComponentType; /** * A collection of enums for the well known component types. * * @author Scott.Stark@jboss.org * @version $Revision: 75075 $ */ public interface KnownComponentTypes { /** * Enums for the DataSource types */ public enum DataSourceTypes { XA("DataSource", "XA"), LocalTx("DataSource", "LocalTx"), NoTx("DataSource", "NoTx"); private final String type; private final String subtype; private DataSourceTypes(String type, String subtype) { this.type = type; this.subtype = subtype; } public String type() { return type; } public String subtype() { return subtype; } public ComponentType getType() { return new ComponentType(type, subtype); } }; /** * Enums for generic ConnectionFactory types */ public enum ConnectionFactoryTypes { XA("ConnectionFactory", "XA"), NoTx("ConnectionFactory", "NoTx"); private final String type; private final String subtype; private ConnectionFactoryTypes(String type, String subtype) { this.type = type; this.subtype = subtype; } public String type() { return type; } public String subtype() { return subtype; } public ComponentType getType() { return new ComponentType(type, subtype); } }; /** * Enums for the JMSDestination/{Queue,Topic,DurableTopic} types */ public enum JMSDestination { Queue("JMSDestination", "Queue"), Topic("JMSDestination", "Topic"), DurableTopic("DataSource", "DurableTopic"); private final String type; private final String subtype; private JMSDestination(String type, String subtype) { this.type = type; this.subtype = subtype; } public String type() { return type; } public String subtype() { return subtype; } public ComponentType getType() { return new ComponentType(type, subtype); } }; /** * Enums for the EJB/{StatelessSession,StatefulSession,Entity,MDB} types */ public enum EJB { StatelessSession("EJB", "StatelessSession"), StatefulSession("EJB", "StatefulSession"), Entity("EJB", "Entity"), MDB("EJB", "MDB"); private final String type; private final String subtype; private EJB(String type, String subtype) { this.type = type; this.subtype = subtype; } public String type() { return type; } public String subtype() { return subtype; } public ComponentType getType() { return new ComponentType(type, subtype); } }; /** * Enums for the MBean/{Dynamic,Standard,Model,Open,Persistent,XMBean} types */ public enum MBean { Dynamic("MBean", "StatelessSession"), Standard("MBean", "Standard"), Model("MBean", "Model"), Open("MBean", "Open"), Persistent("MBean", "Persistent"), XMBean("MBean", "XMBean"); private final String type; private final String subtype; private MBean(String type, String subtype) { this.type = type; this.subtype = subtype; } public String type() { return type; } public String subtype() { return subtype; } public ComponentType getType() { return new ComponentType(type, subtype); } }; /** * Enums for the MCBean types */ public enum MCBean { Any("MCBean", "*"); private final String type; private final String subtype; private MCBean(String type, String subtype) { this.type = type; this.subtype = subtype; } public String type() { return type; } public String subtype() { return subtype; } public ComponentType getType() { return new ComponentType(type, subtype); } } } ././@LongLink0000000000000000000000000000021200000000000011560 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/DeploymentTemplate.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/s0000644000175000017500000000550011107313201033424 0ustar twernertwerner/* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.deployers.spi.management; import org.jboss.deployers.vfs.spi.client.VFSDeployment; import org.jboss.managed.api.DeploymentTemplateInfo; import org.jboss.virtual.VirtualFile; /** * A DeploymentTemplate is a template for creating a DeploymentContext given * a set of ManagedProperty representing the template properties * to set in the resulting deployment. * * TODO: this needs to be fleshed out in terms of the various pieces, raw deployment * files, ManagedObjects, etc. * @author Scott.Stark@jboss.org * @version $Revision$ */ public interface DeploymentTemplate { /** * Get the exportable representation of the properties that the * template supports. * @return the external representation of the template properties. */ public DeploymentTemplateInfo getInfo(); /** * Create a deployment virtual that can be added to a profile. * * @param root - the parent directory where the deployment can be created. * @param deploymentBaseName - a base name (without any suffix) to use for * any deployment files. * @param values - the template ManagedProperty values. * @return the virtual file for the template deployment. * @throws Exception - thrown on any failure to create the deployment */ public VirtualFile applyTemplate(VirtualFile root, String deploymentBaseName, DeploymentTemplateInfo values) throws Exception; /** * Update the DeploymentContext with any attachments needed by the * ManagedProperty instance found in values. * @param ctx - the DeploymentContext created from the applyTemplate result. * @param values - the template ManagedProperty values. * @throws Exception */ public void updateTemplateDeployment(VFSDeployment ctx, DeploymentTemplateInfo values) throws Exception; } ././@LongLink0000000000000000000000000000022200000000000011561 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/RuntimeComponentDispatcher.javalibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/src/main/java/org/jboss/deployers/s0000644000175000017500000000426411107313201033432 0ustar twernertwerner/* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.deployers.spi.management; import org.jboss.metatype.api.values.MetaValue; /** * Dispatches ManagedOperation invocation to runtime component * associated with attachment. * * @author Ales Justin * @version $Revision: 81070 $ */ public interface RuntimeComponentDispatcher { /** * Get value. * * @param componentName the runtime component name * @param propertyName the property name * @return the return meta value */ MetaValue get(Object componentName, String propertyName); /** * Set the value. * * @param componentName the runtime component name * @param propertyName the property name * @param value the meta value */ void set(Object componentName, String propertyName, MetaValue value); /** * Dispatch ManagedOperation invocation * with param parameters to coresponding attachment. * * @param componentName the runtime component name * @param methodName the methodName * @param param the parameters * @return runtime component's return value */ Object invoke(Object componentName, String methodName, MetaValue... param); } libjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/.classpath0000644000175000017500000001113611111467354026671 0ustar twernertwerner libjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/.project0000644000175000017500000000054511111467354026357 0ustar twernertwerner jboss-profileservice-spi The Java ProfileService 5.0.0 SPI classes org.eclipse.jdt.core.javabuilder org.eclipse.jdt.core.javanature libjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/.settings/0000755000175000017500000000000011116055615026620 5ustar twernertwerner././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/.settings/org.eclipse.jdt.core.prefslibjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/.settings/org.eclipse.jdt.core.pref0000644000175000017500000000031411111270637033413 0ustar twernertwerner#Mon Jul 09 18:53:36 CEST 2007 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.source=1.5 org.eclipse.jdt.core.compiler.compliance=1.5 libjboss-integration-java-5.0.3.GA.orig/jboss-profileservice-spi/pom.xml0000644000175000017500000000264111111467354026224 0ustar twernertwerner org.jboss.integration jboss-integration-parent 5.0.3.GA 4.0.0 jboss-profileservice-spi 5.0.3.GA jar JBoss ProfileService 5.0.0 SPI http://www.jboss.org The Java ProfileService 5.0.0 SPI classes org.jboss jboss-common-core org.jboss.man jboss-managed org.jboss.man jboss-metatype org.jboss.deployers jboss-deployers-vfs-spi org.jboss jboss-vfs org.jboss.deployers jboss-deployers-core-spi libjboss-integration-java-5.0.3.GA.orig/jboss-classloading-spi/0000755000175000017500000000000011116055616024325 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-classloading-spi/pom-jdk14.xml0000644000175000017500000001230510662604711026557 0ustar twernertwerner org.jboss jboss-integration-jdk14 5.0.0-SNAPSHOT ../build/pom-jdk14.xml 4.0.0 org.jboss jboss-classloading-spi-jdk14 5.0.0-SNAPSHOT jar JBoss ClassLoading 5.0.0 SPI http://www.jboss.org The Java ClassLoading 5.0.0 SPI classes ${outputDirectory} ${testOutputDirectory} org.jboss.maven.plugins maven-jboss-retro-plugin 1.0-beta-1 weave-classes weave ${project.build.directory}/classes-jdk14 weave-test-classes weave-tests ${project.build.directory}/test-classes-jdk14 org.jboss.weaver.retro.WeaverRetroJdk14 org.apache.maven.plugins maven-jar-plugin ${project.build.directory}/classes-jdk14 org.apache.maven.plugins maven-surefire-plugin true run-jdk14-tests target/classes-jdk14 target/test-classes-jdk14 org.apache.maven.plugins maven-enforcer-plugin 1.0-alpha-3 enforce-jdk14-property enforce-once java14_home The property java14_home should be set to a valid installation of jdk1.4. The jdk14 tests cannot be run without this property. org.apache.maven.plugins maven-surefire-plugin ${java14_home}/bin/java always false ${project.build.directory}/surefire-reports-jdk14 org.jboss jboss-common-core-jdk14 target/classes target/test-classes libjboss-integration-java-5.0.3.GA.orig/jboss-classloading-spi/.classpath0000644000175000017500000000121011103656662026306 0ustar twernertwerner libjboss-integration-java-5.0.3.GA.orig/jboss-classloading-spi/.project0000644000175000017500000000054110644463465026006 0ustar twernertwerner jboss-classloading-spi The Java ClassLoading 5.0.0 SPI classes org.eclipse.jdt.core.javabuilder org.eclipse.jdt.core.javanature libjboss-integration-java-5.0.3.GA.orig/jboss-classloading-spi/src/0000755000175000017500000000000011116055616025114 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-classloading-spi/src/main/0000755000175000017500000000000011116055616026040 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-classloading-spi/src/main/java/0000755000175000017500000000000011116055616026761 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-classloading-spi/src/main/java/org/0000755000175000017500000000000011116055616027550 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-classloading-spi/src/main/java/org/jboss/0000755000175000017500000000000011116055616030670 5ustar twernertwerner././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-classloading-spi/src/main/java/org/jboss/classloading/libjboss-integration-java-5.0.3.GA.orig/jboss-classloading-spi/src/main/java/org/jboss/classloading/0000755000175000017500000000000011116055616033333 5ustar twernertwerner././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-classloading-spi/src/main/java/org/jboss/classloading/spi/libjboss-integration-java-5.0.3.GA.orig/jboss-classloading-spi/src/main/java/org/jboss/classloading/0000755000175000017500000000000011116055616033333 5ustar twernertwerner././@LongLink0000000000000000000000000000020300000000000011560 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-classloading-spi/src/main/java/org/jboss/classloading/spi/DelegatingClassLoader.javalibjboss-integration-java-5.0.3.GA.orig/jboss-classloading-spi/src/main/java/org/jboss/classloading/0000644000175000017500000000730711110642722033336 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2006, JBoss Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.classloading.spi; import java.net.URL; /** * DelegatingClassLoader. * * @author Adrian Brock * @author anil.saldhana@redhat.com * @version $Revision: 1.1 $ */ public class DelegatingClassLoader extends ClassLoader { /** The parent classloader */ private RealClassLoader parent; /** Whether to use standard loading */ protected boolean standard = false; /** * Check the parent really is a classloader * * @param parent the parent * @return the classloader */ private static ClassLoader checkParent(RealClassLoader parent) { if (parent == null) throw new IllegalArgumentException("Null parent"); if (parent instanceof ClassLoader == false) throw new IllegalArgumentException("Parent is not a classloader"); return ClassLoader.class.cast(parent); } /** * Create a new DelegatingClassLoader. * * @param parent the parent */ public DelegatingClassLoader(RealClassLoader parent) { super(checkParent(parent)); this.parent = parent; } protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException { // First see if we already know it Class clazz = findLoadedClass(name); // Next see if it is cached at a more global level if (clazz == null) clazz = parent.getCachedClass(name); // Not cached if (clazz == null) { // Standard loading looks at the bootstrap classloader if (standard) clazz = super.loadClass(name, resolve); // We should really let the parent decide to do that else { if(System.getSecurityManager() == null) clazz = getParent().loadClass(name); else { clazz = SecurityActions.getParentClassLoader(this).loadClass(name); } } } // Do we need to resolve the class? if (resolve) resolveClass(clazz); return clazz; } public URL getResource(String name) { // See if it is cached at a global level URL resource = parent.getCachedResource(name); // Not cached if (resource == null) { // Standard loading looks at the bootstrap classloader if (standard) resource = super.getResource(name); // We should really let the parent decide to do that else { if(System.getSecurityManager() == null) resource = getParent().getResource(name); else resource = SecurityActions.getParentClassLoader(this).getResource(name); } } return resource; } } ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-classloading-spi/src/main/java/org/jboss/classloading/spi/RealClassLoader.javalibjboss-integration-java-5.0.3.GA.orig/jboss-classloading-spi/src/main/java/org/jboss/classloading/0000644000175000017500000000424110706161513033334 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2006, JBoss Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.classloading.spi; import java.net.URL; import javax.management.ObjectName; import org.jboss.util.loading.Translatable; /** * RealClassLoader.

* * A tagging interface for RealClassLoaders * * @author Adrian Brock * @version $Revision: 1.1 $ */ public interface RealClassLoader extends Translatable { /** * Get the object name for this classloader * * @return the object name */ ObjectName getObjectName(); /** * Whether the classloader is valid * * @return true when valid */ boolean isValid(); /** * Check the cache to see if the class is already loaded * * @param name the class name * @return the class or null if not cached */ Class getCachedClass(String name); /** * Check the cache to see if the resource is already loaded * * @param name the name of the resource * @return the resource url or null if not cached */ URL getCachedResource(String name); /** * Cleans the entry with the given name from the blackList * * @param name the name of the resource to clear from the blackList */ void clearBlackList(String name); } ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-classloading-spi/src/main/java/org/jboss/classloading/spi/SecurityActions.javalibjboss-integration-java-5.0.3.GA.orig/jboss-classloading-spi/src/main/java/org/jboss/classloading/0000644000175000017500000000276511110642722033341 0ustar twernertwerner/* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.classloading.spi; import java.security.AccessController; import java.security.PrivilegedAction; /** * Privileged Blocks * @author Anil.Saldhana@redhat.com * @since Nov 18, 2008 */ class SecurityActions { static ClassLoader getParentClassLoader(final ClassLoader cl) { return AccessController.doPrivileged(new PrivilegedAction() { public ClassLoader run() { return cl.getParent(); } }); } }libjboss-integration-java-5.0.3.GA.orig/jboss-classloading-spi/.settings/0000755000175000017500000000000011116055616026243 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-classloading-spi/.settings/org.eclipse.jdt.core.prefs0000644000175000017500000000031410644463465033235 0ustar twernertwerner#Mon Jul 09 18:53:36 CEST 2007 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.source=1.5 org.eclipse.jdt.core.compiler.compliance=1.5 libjboss-integration-java-5.0.3.GA.orig/jboss-classloading-spi/pom.xml0000644000175000017500000000145511111467354025650 0ustar twernertwerner org.jboss.integration jboss-integration-parent 5.0.3.GA 4.0.0 jboss-classloading-spi 5.0.3.GA jar JBoss ClassLoading 5.0.0 SPI http://www.jboss.org The Java ClassLoading 5.0.0 SPI classes org.jboss jboss-common-core libjboss-integration-java-5.0.3.GA.orig/pom.xml0000644000175000017500000001074311111467354021276 0ustar twernertwerner org.jboss jboss-parent 4 4.0.0 org.jboss.integration jboss-integration-parent 5.0.3.GA pom JBoss Integration 5.0 Parent http://www.jboss.com The JBoss Integration SPI classes scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/integration/tags/5.0.3.GA scm:svn:https://svn.jboss.org/repos/jbossas/projects/integration/tags/5.0.3.GA http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/integration/tags/5.0.3.GA 2.0.0.CR5 2.0.0.CR5 2.0.0.CR5 jboss-classloading-spi jboss-deployment-spi jboss-transaction-spi jboss-corba-ots-spi jboss-jca-spi jboss-profileservice-spi build org.apache.maven.plugins maven-release-plugin 2.0-beta-7 true org.apache.maven.plugins maven-project-info-reports-plugin 2.1 dependencies issue-tracking license scm org.jboss.logging jboss-logging-spi 2.0.5.GA org.jboss.aop jboss-aop 2.0.0.GA client org.jboss jboss-common-core 2.2.8.GA org.jboss.javaee jboss-jca-api 1.5.0.GA org.jboss.javaee jboss-transaction-api 1.0.1.GA jacorb jacorb 2.3.0jboss.patch5-brew org.jboss.deployers jboss-deployers-vfs-spi ${version.org.jboss.deployers} org.jboss jboss-vfs ${version.org.jboss.vfs} org.jboss.deployers jboss-deployers-core-spi ${version.org.jboss.deployers} org.jboss.man jboss-managed ${version.org.jboss.man} org.jboss.man jboss-metatype ${version.org.jboss.man} libjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/0000755000175000017500000000000011116055617024210 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/pom-jdk14.xml0000644000175000017500000001271010662604711026441 0ustar twernertwerner org.jboss jboss-integration-jdk14 5.0.0-SNAPSHOT ../build/pom-jdk14.xml 4.0.0 jboss jboss-transaction-spi-jdk14 5.0.0-SNAPSHOT jar JBoss Transaction 5.0.0 SPI http://www.jboss.org The Java Transaction 5.0.0 SPI classes ${outputDirectory} ${testOutputDirectory} org.jboss.maven.plugins maven-jboss-retro-plugin 1.0-beta-1 weave-classes weave ${project.build.directory}/classes-jdk14 weave-test-classes weave-tests ${project.build.directory}/test-classes-jdk14 org.jboss.weaver.retro.WeaverRetroJdk14 org.apache.maven.plugins maven-jar-plugin ${project.build.directory}/classes-jdk14 org.apache.maven.plugins maven-surefire-plugin true run-jdk14-tests target/classes-jdk14 target/test-classes-jdk14 org.apache.maven.plugins maven-enforcer-plugin 1.0-alpha-3 enforce-jdk14-property enforce-once java14_home The property java14_home should be set to a valid installation of jdk1.4. The jdk14 tests cannot be run without this property. org.apache.maven.plugins maven-surefire-plugin ${java14_home}/bin/java always false ${project.build.directory}/surefire-reports-jdk14 org.jboss jboss-common-core-jdk14 org.jboss.javaee jboss-jca-api-jdk14 org.jboss.javaee jboss-transaction-api-jdk14 target/classes target/test-classes libjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/.classpath0000644000175000017500000000212211103656662026173 0ustar twernertwerner libjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/.project0000644000175000017500000000053710642715352025666 0ustar twernertwerner jboss-transaction-spi The Java Transaction 5.0.0 SPI classes org.eclipse.jdt.core.javabuilder org.eclipse.jdt.core.javanature libjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/0000755000175000017500000000000011116055616024776 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/0000755000175000017500000000000011116055616025722 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/0000755000175000017500000000000011116055616026643 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/0000755000175000017500000000000011116055616027432 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/0000755000175000017500000000000011116055616030552 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/0000755000175000017500000000000011116055617031173 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/usertx/0000755000175000017500000000000011116055616032524 5ustar twernertwerner././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/usertx/client/libjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/usertx/clie0000755000175000017500000000000011116055616033361 5ustar twernertwerner././@LongLink0000000000000000000000000000021200000000000011560 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/usertx/client/ServerVMClientUserTransaction.javalibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/usertx/clie0000644000175000017500000001310611104152725033360 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2005, JBoss Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.tm.usertx.client; import java.util.Collection; import java.util.EventListener; import java.util.concurrent.CopyOnWriteArrayList; import javax.transaction.HeuristicMixedException; import javax.transaction.HeuristicRollbackException; import javax.transaction.NotSupportedException; import javax.transaction.RollbackException; import javax.transaction.SystemException; import javax.transaction.TransactionManager; import javax.transaction.UserTransaction; import org.jboss.tm.TransactionManagerLocator; import org.jboss.tm.usertx.UserTransactionProvider; import org.jboss.tm.usertx.UserTransactionRegistry; /** * The client-side UserTransaction implementation for clients * operating in the same VM as the server. * This will delegate all UserTransaction calls to the * TransactionManager of the server. * * @author Ole Husgaard * @author adrian@jboss.org * @author Galder Zamarreno * @version $Revision: 37459 $ */ public class ServerVMClientUserTransaction implements UserTransaction, UserTransactionProvider { // Static -------------------------------------------------------- /** * Our singleton instance. */ private final static ServerVMClientUserTransaction singleton = new ServerVMClientUserTransaction(); /** * The TransactionManager we delegate to. */ private final TransactionManager tm; /** Any registry */ private volatile UserTransactionRegistry registry; /** The listeners */ private final Collection listeners = new CopyOnWriteArrayList(); /** * Return a reference to the singleton instance. * * @return the singleton */ public static ServerVMClientUserTransaction getSingleton() { return singleton; } // Constructors -------------------------------------------------- /** * Create a new instance. */ private ServerVMClientUserTransaction() { this(TransactionManagerLocator.locateTransactionManager(false)); } //public constructor for TESTING ONLY public ServerVMClientUserTransaction(final TransactionManager tm) { this.tm = tm; } // Public -------------------------------------------------------- public boolean isServer() { return tm != null; } //Registration for TransactionStartedListeners. public void registerTxStartedListener(UserTransactionStartedListener txStartedListener) { if (txStartedListener == null) throw new IllegalArgumentException("Null listener"); listeners.add(txStartedListener); } public void unregisterTxStartedListener(UserTransactionStartedListener txStartedListener) { if (txStartedListener == null) throw new IllegalArgumentException("Null listener"); listeners.remove(txStartedListener); } public void setTransactionRegistry(UserTransactionRegistry registry) { this.registry = registry; } // // implements interface UserTransaction // public void begin() throws NotSupportedException, SystemException { tm.begin(); UserTransactionRegistry registry = this.registry; if (registry != null) registry.userTransactionStarted(); try { for (UserTransactionStartedListener listener : listeners) listener.userTransactionStarted(); } catch (SystemException e) { rollback(); } } public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException { tm.commit(); } public void rollback() throws SecurityException, IllegalStateException, SystemException { tm.rollback(); } public void setRollbackOnly() throws IllegalStateException, SystemException { tm.setRollbackOnly(); } public int getStatus() throws SystemException { return tm.getStatus(); } public void setTransactionTimeout(int seconds) throws SystemException { tm.setTransactionTimeout(seconds); } /** * UserTransactionStartedListener. * * @Deprecated use {@link UserTransactionRegistry} instead */ @Deprecated public interface UserTransactionStartedListener extends EventListener { void userTransactionStarted() throws SystemException; } } ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/usertx/UserTransactionProvider.javalibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/usertx/User0000644000175000017500000000253411103656662033375 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.tm.usertx; /** * UserTransactionProvider. * * @author Adrian Brock * @version $Revision: 1.1 $ */ public interface UserTransactionProvider { /** * Set the user transaction registry * * @param registry the registry */ void setTransactionRegistry(UserTransactionRegistry registry); } ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/usertx/UserTransactionListener.javalibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/usertx/User0000644000175000017500000000252511103656662033375 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.tm.usertx; import java.util.EventListener; import javax.transaction.SystemException; /** * UserTransactionListener. * * @author Adrian Brock * @version $Revision: 1.1 $ */ public interface UserTransactionListener extends EventListener { void userTransactionStarted() throws SystemException; } ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/usertx/UserTransactionRegistry.javalibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/usertx/User0000644000175000017500000000757411103656662033406 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.tm.usertx; import java.util.Collection; import java.util.concurrent.CopyOnWriteArraySet; import org.jboss.logging.Logger; /** * UserTransactionRegistry. * * @author Adrian Brock * @version $Revision: 1.1 $ */ public class UserTransactionRegistry { /** The log */ private static final Logger log = Logger.getLogger(UserTransactionRegistry.class); /** The providers */ private Collection providers = new CopyOnWriteArraySet(); /** The listeners */ private Collection listeners = new CopyOnWriteArraySet(); /** * Add a listener * * @param listener the listener * @throws IllegalArgumentException for a null listener */ public void addListener(UserTransactionListener listener) { if (listener == null) throw new IllegalArgumentException("Null listener"); listeners.add(listener); log.debug(this + " addListener " + listener); } /** * Remove a listener * * @param listener the listener * @throws IllegalArgumentException for a null listener */ public void removeListener(UserTransactionListener listener) { if (listener == null) throw new IllegalArgumentException("Null listener"); listeners.remove(listener); log.debug(this + " removeListener " + listener); } /** * Add a provider * * @param provider the provider * @throws IllegalArgumentException for a null provider */ public void addProvider(UserTransactionProvider provider) { if (provider == null) throw new IllegalArgumentException("Null provider"); provider.setTransactionRegistry(this); providers.add(provider); log.debug(this + " addProvider " + provider); } /** * Remove a provider * * @param provider the provider * @throws IllegalArgumentException for a null provider */ public void removeProvider(UserTransactionProvider provider) { if (provider == null) throw new IllegalArgumentException("Null provider"); if (providers.remove(provider)) { provider.setTransactionRegistry(null); log.debug(this + " removeProvider " + provider); } } /** * Fire a user transaction started event */ public void userTransactionStarted() { if (listeners.isEmpty() == false) { for (UserTransactionListener listener : listeners) { if (listener != null) { try { listener.userTransactionStarted(); } catch (Throwable t) { log.warn("Error notifying listener " + listener + " of userTransactionStarted", t); } } } } } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/TxUtils.javalibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/TxUtils.jav0000644000175000017500000002443410642715352033322 0ustar twernertwerner/* * JBoss, Home of Professional Open Source. * Copyright 2006, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.tm; import javax.transaction.Status; import javax.transaction.SystemException; import javax.transaction.Transaction; import javax.transaction.TransactionManager; import javax.transaction.UserTransaction; import javax.transaction.xa.XAException; import javax.transaction.xa.XAResource; /** * TxUtils.java has utility methods for determining transaction status * in various useful ways. * * @author David Jencks * @author Bill Burke * @author Dimitris Andreadis * @author adrian@jboss.org * @version $Revision: 63569 $ */ public class TxUtils { /** Transaction Status Strings */ private static final String[] TxStatusStrings = { "STATUS_ACTIVE", "STATUS_MARKED_ROLLBACK", "STATUS_PREPARED", "STATUS_COMMITTED", "STATUS_ROLLEDBACK", "STATUS_UNKNOWN", "STATUS_NO_TRANSACTION", "STATUS_PREPARING", "STATUS_COMMITTING", "STATUS_ROLLING_BACK" }; /** * Do now allow instances of this class */ private TxUtils() { } public static boolean isActive(Transaction tx) { if (tx == null) return false; try { int status = tx.getStatus(); return isActive(status); } catch (SystemException error) { throw new RuntimeException(error); } } public static boolean isActive(TransactionManager tm) { try { return isActive(tm.getTransaction()); } catch (SystemException error) { throw new RuntimeException(error); } } public static boolean isActive() { return isActive(TransactionManagerLocator.locateTransactionManager()); } public static boolean isActive(UserTransaction ut) { try { int status = ut.getStatus(); return isActive(status); } catch (SystemException error) { throw new RuntimeException(error); } } public static boolean isActive(int status) { return status == Status.STATUS_ACTIVE; } public static boolean isUncommitted(Transaction tx) { if (tx == null) return false; try { int status = tx.getStatus(); return isUncommitted(status); } catch (SystemException error) { throw new RuntimeException(error); } } public static boolean isUncommitted(TransactionManager tm) { try { return isUncommitted(tm.getTransaction()); } catch (SystemException error) { throw new RuntimeException(error); } } public static boolean isUncommitted() { return isUncommitted(TransactionManagerLocator.locateTransactionManager()); } public static boolean isUncommitted(UserTransaction ut) { try { int status = ut.getStatus(); return isUncommitted(status); } catch (SystemException error) { throw new RuntimeException(error); } } public static boolean isUncommitted(int status) { return status == Status.STATUS_ACTIVE || status == Status.STATUS_MARKED_ROLLBACK; } public static boolean isCompleted(Transaction tx) { if (tx == null) return true; try { int status = tx.getStatus(); return isCompleted(status); } catch (SystemException error) { throw new RuntimeException(error); } } public static boolean isCompleted(TransactionManager tm) { try { return isCompleted(tm.getTransaction()); } catch (SystemException error) { throw new RuntimeException(error); } } public static boolean isCompleted() { return isCompleted(TransactionManagerLocator.locateTransactionManager()); } public static boolean isCompleted(UserTransaction ut) { try { int status = ut.getStatus(); return isCompleted(status); } catch (SystemException error) { throw new RuntimeException(error); } } public static boolean isCompleted(int status) { return status == Status.STATUS_COMMITTED || status == Status.STATUS_ROLLEDBACK || status == Status.STATUS_NO_TRANSACTION; } public static boolean isRollback(Transaction tx) { if (tx == null) return false; try { int status = tx.getStatus(); return isRollback(status); } catch (SystemException error) { throw new RuntimeException(error); } } public static boolean isRollback(TransactionManager tm) { try { return isRollback(tm.getTransaction()); } catch (SystemException error) { throw new RuntimeException(error); } } public static boolean isRollback() { return isRollback(TransactionManagerLocator.locateTransactionManager()); } public static boolean isRollback(UserTransaction ut) { try { int status = ut.getStatus(); return isRollback(status); } catch (SystemException error) { throw new RuntimeException(error); } } public static boolean isRollback(int status) { return status == Status.STATUS_MARKED_ROLLBACK || status == Status.STATUS_ROLLING_BACK || status == Status.STATUS_ROLLEDBACK; } /** * Converts a tx Status index to a String * * @see javax.transaction.Status * * @param status the Status index * @return status as String or "STATUS_INVALID(value)" */ public static String getStatusAsString(int status) { if (status >= Status.STATUS_ACTIVE && status <= Status.STATUS_ROLLING_BACK) { return TxStatusStrings[status]; } else { return "STATUS_INVALID(" + status + ")"; } } /** * Converts a XAResource flag to a String * * @see javax.transaction.xa.XAResource * * @param flags the flags passed in to start(), end(), recover() * @return the flags in String form */ public static String getXAResourceFlagsAsString(int flags) { if (flags == XAResource.TMNOFLAGS) { return "|TMNOFLAGS"; } else { StringBuffer sbuf = new StringBuffer(64); if ((flags & XAResource.TMONEPHASE) != 0) { sbuf.append("|TMONEPHASE"); } if ((flags & XAResource.TMJOIN) != 0) { sbuf.append("|TMJOIN"); } if ((flags & XAResource.TMRESUME) != 0) { sbuf.append("|TMRESUME"); } if ((flags & XAResource.TMSUCCESS) != 0) { sbuf.append("|TMSUCCESS"); } if ((flags & XAResource.TMFAIL) != 0) { sbuf.append("|TMFAIL"); } if ((flags & XAResource.TMSUSPEND) != 0) { sbuf.append("|TMSUSPEND"); } if ((flags & XAResource.TMSTARTRSCAN) != 0) { sbuf.append("|TMSTARTRSCAN"); } if ((flags & XAResource.TMENDRSCAN) != 0) { sbuf.append("|TMENDRSCAN"); } return sbuf.toString(); } } /** * Converts a XAException error code to a string. * * @see javax.transaction.xa.XAException * * @param errorCode an XAException error code * @return the error code in String form. * */ public static String getXAErrorCodeAsString(int errorCode) { switch (errorCode) { case XAException.XA_HEURCOM: return "XA_HEURCOM"; case XAException.XA_HEURHAZ: return "XA_HEURHAZ"; case XAException.XA_HEURMIX: return "XA_HEURMIX"; case XAException.XA_HEURRB: return "XA_HEURRB"; case XAException.XA_NOMIGRATE: return "XA_NOMIGRATE"; case XAException.XA_RBCOMMFAIL: return "XA_RBCOMMFAIL"; case XAException.XA_RBDEADLOCK: return "XA_RBDEADLOCK"; case XAException.XA_RBINTEGRITY: return "XA_RBINTEGRITY"; case XAException.XA_RBOTHER: return "XA_RBOTHER"; case XAException.XA_RBPROTO: return "XA_RBPROTO"; case XAException.XA_RBROLLBACK: return "XA_RBROLLBACK"; case XAException.XA_RBTIMEOUT: return "XA_RBTIMEOUT"; case XAException.XA_RBTRANSIENT: return "XA_RBTRANSIENT"; case XAException.XA_RDONLY: return "XA_RDONLY"; case XAException.XA_RETRY: return "XA_RETRY"; case XAException.XAER_ASYNC: return "XAER_ASYNC"; case XAException.XAER_DUPID: return "XAER_DUPID"; case XAException.XAER_INVAL: return "XAER_INVAL"; case XAException.XAER_NOTA: return "XAER_NOTA"; case XAException.XAER_OUTSIDE: return "XAER_OUTSIDE"; case XAException.XAER_PROTO: return "XAER_PROTO"; case XAException.XAER_RMERR: return "XAER_RMERR"; case XAException.XAER_RMFAIL: return "XAER_RMFAIL"; default: return "XA_UNKNOWN(" + errorCode + ")"; } } } ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/XAResourceRecovery.javalibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/XAResourceR0000644000175000017500000000461511015273534033264 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2008, JBoss Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.tm; import javax.transaction.xa.XAResource; /** * During recovery of crashed XA transactions, the transaction system may use instances * of this interface to obtain XAResources on which to perform recovery calls. * Resource managers should register instances of this interface with the transaction * recovery system via an XAResourceRecoveryRegistry. * * @author Jonathan Halliday (jonathan.halliday@redhat.com) * @version $Revision$ * @see XAResourceRecoveryRegistry */ public interface XAResourceRecovery { /** * Provides XAResource(s) to the transaction system for recovery purposes. * * @return An array of XAResource objects for use in transaction recovery * In most cases the implementation will need to return only a single XAResource in the array. * For more sophisticated cases, such as where multiple different connection types are supported, * it may be necessary to return more than one. * * The Resource should be instantiated in such a way as to carry the necessary permissions to * allow transaction recovery. For some deployments it may therefore be necessary or desirable to * provide resource(s) based on e.g. database connection parameters such as username other than those * used for the regular application connections to the same resource manager. */ public XAResource[] getXAResources(); } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/TransactionLocal.javalibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/Transaction0000644000175000017500000002303710701414677033414 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2005, JBoss Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.tm; import javax.transaction.SystemException; import javax.transaction.Transaction; import javax.transaction.TransactionManager; /** * A TransactionLocal is similar to ThreadLocal except it is keyed on the * Transactions. A transaction local variable is cleared after the transaction * completes. * * @author Dain Sundstrom * @author Bill Burke * @author adrian@jboss.org * @version $Revision: 37459 $ */ public class TransactionLocal { /** * To simplify null values handling in the preloaded data pool we use * this value instead of 'null' */ private static final Object NULL_VALUE = new Object(); /** * The transaction manager is maintained by the system and * manges the assocation of transaction to threads. */ protected final TransactionManager transactionManager; /** * The delegate */ protected TransactionLocalDelegate delegate; /** * Creates a thread local variable. * @throws IllegalStateException if there is no system transaction manager */ public TransactionLocal() { transactionManager = TransactionManagerLocator.locateTransactionManager(); initDelegate(); } /** * Creates a transaction local variable. Using the given transaction manager * * @param tm the transaction manager */ public TransactionLocal(TransactionManager tm) { if (tm == null) throw new IllegalArgumentException("Null transaction manager"); this.transactionManager = tm; initDelegate(); } /** * Lock the TransactionLocal using the current transaction

* * WARN: The current implemention just "locks the transactions" * * @throws IllegalStateException if the transaction is not active * @throws InterruptedException if the thread is interrupted */ public void lock() throws InterruptedException { lock(getTransaction()); } /** * Lock the TransactionLocal using the provided transaction

* * WARN: The current implemention just "locks the transactions" * * @param transaction the transaction * @throws IllegalStateException if the transaction is not active * @throws InterruptedException if the thread is interrupted */ public void lock(Transaction transaction) throws InterruptedException { // ignore when there is no transaction if (transaction == null) return; delegate.lock(this, transaction); } /** * Unlock the TransactionLocal using the current transaction */ public void unlock() { unlock(getTransaction()); } /** * Unlock the ThreadLocal using the provided transaction * * @param transaction the transaction */ public void unlock(Transaction transaction) { // ignore when there is no transaction if (transaction == null) return; delegate.unlock(this, transaction); } /** * Returns the initial value for this thransaction local. This method * will be called once per accessing transaction for each TransactionLocal, * the first time each transaction accesses the variable with get or set. * If the programmer desires TransactionLocal variables to be initialized to * some value other than null, TransactionLocal must be subclassed, and this * method overridden. Typically, an anonymous inner class will be used. * Typical implementations of initialValue will call an appropriate * constructor and return the newly constructed object. * * @return the initial value for this TransactionLocal */ protected Object initialValue() { return null; } /** * get the transaction local value. * * @param tx the transaction * @return the obejct */ protected Object getValue(Transaction tx) { return delegate.getValue(this, tx); } /** * put the value in the TransactionImpl map * * @param tx the transaction * @param value the value */ protected void storeValue(Transaction tx, Object value) { delegate.storeValue(this, tx, value); } /** * does Transaction contain object? * * @param tx the transaction * @return true if it has an object */ protected boolean containsValue(Transaction tx) { return delegate.containsValue(this, tx); } /** * Returns the value of this TransactionLocal variable associated with the * thread context transaction. Creates and initializes the copy if this is * the first time the method is called in a transaction. * * @return the value of this TransactionLocal */ public Object get() { return get(getTransaction()); } /** * Returns the value of this TransactionLocal variable associated with the * specified transaction. Creates and initializes the copy if this is the * first time the method is called in a transaction. * * @param transaction the transaction for which the variable it to * be retrieved * @return the value of this TransactionLocal * @throws IllegalStateException if an error occures while registering * a synchronization callback with the transaction */ public Object get(Transaction transaction) { if (transaction == null) return initialValue(); Object value = getValue(transaction); // is we didn't get a value initalize this object with initialValue() if(value == null) { // get the initial value value = initialValue(); // if value is null replace it with the null value standin if(value == null) { value = NULL_VALUE; } // store the value try { storeValue(transaction, value); } catch(IllegalStateException e) { // depending on the delegate implementation it may be considered an error to // call storeValue after the tx has ended. Further, the tx ending may have // caused the disposal of a previously stored initial value. // for user convenience we ignore such errors and return the initialvalue here. return initialValue(); } } // if the value is the null standin return null if(value == NULL_VALUE) { return null; } // finall return the value return value; } /** * Sets the value of this TransactionLocal variable associtated with the * thread context transaction. This is only used to change the value from * the one assigned by the initialValue method, and many applications will * have no need for this functionality. * * @param value the value to be associated with the thread context * transactions's TransactionLocal */ public void set(Object value) { set(getTransaction(), value); } /** * Sets the value of this TransactionLocal variable associtated with the * specified transaction. This is only used to change the value from * the one assigned by the initialValue method, and many applications will * have no need for this functionality. * * @param transaction the transaction for which the value will be set * @param value the value to be associated with the thread context * transactions's TransactionLocal */ public void set(Transaction transaction, Object value) { if (transaction == null) throw new IllegalStateException("there is no transaction"); // If this transaction is unknown, register for synchroniztion callback, // and call initialValue to give subclasses a chance to do some // initialization. if(!containsValue(transaction)) { initialValue(); } // if value is null replace it with the null value standin if(value == null) { value = NULL_VALUE; } // finally store the value storeValue(transaction, value); } public Transaction getTransaction() { try { return transactionManager.getTransaction(); } catch(SystemException e) { throw new IllegalStateException("An error occured while getting the " + "transaction associated with the current thread: " + e); } } /** * Initialise the delegate */ protected void initDelegate() { if (transactionManager instanceof TransactionLocalDelegate) delegate = (TransactionLocalDelegate) transactionManager; else delegate = new TransactionLocalDelegateImpl(transactionManager); } } ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/TransactionLocalDelegateImpl.javalibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/Transaction0000644000175000017500000001454410642715352033415 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2005, JBoss Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.tm; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.ReentrantLock; import javax.transaction.RollbackException; import javax.transaction.Synchronization; import javax.transaction.SystemException; import javax.transaction.Transaction; import javax.transaction.TransactionManager; /** * An implementation of the transaction local implementation * using Transaction synchronizations. * * There is one of these per transaction local * * @author Adrian Brock * @version $Revision: 37459 $ */ public class TransactionLocalDelegateImpl implements TransactionLocalDelegate { // Attributes ---------------------------------------------------- /** The transaction manager */ protected TransactionManager manager; // Static -------------------------------------------------------- /** The synchronizations for each transaction */ protected static ConcurrentHashMap synchronizationsByTransaction = new ConcurrentHashMap(); /** * Retrieve a synchronization for the transaction * * @param tx the transaction * @param create whether to create a synchronization if one doesn't exist * @return the synchronization */ protected static TransactionLocalSynchronization getSynchronization(Transaction tx, boolean create) { synchronized (tx) { TransactionLocalSynchronization result = synchronizationsByTransaction.get(tx); if (result == null && create == true) { result = new TransactionLocalSynchronization(tx); try { tx.registerSynchronization(result); } catch (RollbackException e) { throw new IllegalStateException("Transaction already rolled back or marked for rollback"); } catch (SystemException e) { throw new RuntimeException("Error registering transaction synchronization with " + tx, e); } synchronizationsByTransaction.put(tx, result); } return result; } } /** * Remove a synchronization * * @param tx the transaction to remove */ protected static void removeSynchronization(Transaction tx) { synchronizationsByTransaction.remove(tx); } // Constructor --------------------------------------------------- /** * Construct a new delegate for the given transaction manager * * @param manager the transaction manager */ public TransactionLocalDelegateImpl(TransactionManager manager) { this.manager = manager; } public void lock(TransactionLocal local, Transaction tx) throws InterruptedException { TransactionLocalSynchronization sync = getSynchronization(tx, true); sync.lock(local); } public void unlock(TransactionLocal local, Transaction tx) { TransactionLocalSynchronization sync = getSynchronization(tx, false); if (sync != null) sync.unlock(local); else throw new IllegalStateException("No synchronization found tx=" + tx + " local=" + local); } public Object getValue(TransactionLocal local, Transaction tx) { TransactionLocalSynchronization sync = getSynchronization(tx, false); if (sync == null) return null; return sync.getValue(local); } public void storeValue(TransactionLocal local, Transaction tx, Object value) { TransactionLocalSynchronization sync = getSynchronization(tx, true); sync.setValue(local, value); } public boolean containsValue(TransactionLocal local, Transaction tx) { TransactionLocalSynchronization sync = getSynchronization(tx, false); if (sync == null) return false; return sync.containsValue(local); } // InnerClasses --------------------------------------------------- protected static class TransactionLocalSynchronization implements Synchronization { protected Transaction tx; private Map valuesByLocal = Collections.synchronizedMap(new HashMap()); protected ReentrantLock reentrantLock = new ReentrantLock(); public TransactionLocalSynchronization(Transaction tx) { this.tx = tx; } public void beforeCompletion() { } public void afterCompletion(int status) { removeSynchronization(tx); valuesByLocal.clear(); // Help the GC } public void lock(Object local) throws InterruptedException { boolean locked = reentrantLock.tryLock(60000, TimeUnit.MILLISECONDS); if (locked == false) throw new IllegalStateException("Failed to acquire lock within 60 seconds."); } public void unlock(Object local) { reentrantLock.unlock(); } public Object getValue(Object local) { return valuesByLocal.get(local); } public void setValue(Object local, Object value) { valuesByLocal.put(local, value); } public boolean containsValue(Object local) { return valuesByLocal.containsKey(local); } } } ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/TransactionManagerLocator.javalibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/Transaction0000644000175000017500000001214711104152725033403 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2005, JBoss Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.tm; import java.lang.reflect.Method; import javax.naming.InitialContext; import javax.naming.NamingException; import javax.transaction.TransactionManager; import org.jboss.logging.Logger; /** * Locates the transaction manager. * * @todo this really belongs in some integration layer with * a more pluggable implementation * @author Adrian Brock * @author Galder Zamarreno * @version $Revision: 37459 $ */ public class TransactionManagerLocator implements TransactionManagerFactory { /** Logger */ private static final Logger log = Logger.getLogger(TransactionManagerLocator.class); /** The JNDI Name */ private static final String JNDI_NAME = "java:/TransactionManager"; /** The instance */ private static TransactionManagerLocator instance = new TransactionManagerLocator(); /** The transaction manager */ private TransactionManager tm; /** * No external construction */ private TransactionManagerLocator() { } /** * Get the locator * * @return the locator */ public static TransactionManagerLocator getInstance() { return instance; } /** * Locate the transaction manager * * @return the transaction manager */ public static TransactionManager locateTransactionManager() { return getInstance().locate(); } /** * Locate the transaction manager * * @param throwExceptionIfUnableToLocate if true and transaction manager * cannot be located, a RuntimeException is thrown, otherwise null is * returned. * * @return the transaction manager */ public static TransactionManager locateTransactionManager(boolean throwExceptionIfUnableToLocate) { return getInstance().locate(throwExceptionIfUnableToLocate); } /** * Get the transaction manager * * @return the transaction manager */ public TransactionManager getTransactionManager() { return locate(); } /** * Locate the transaction manager * * @return the transaction manager */ public TransactionManager locate() { return locate(true); } /** * Locate the transaction manager * * @param throwExceptionIfUnableToLocate if true and transaction manager * cannot be located, a RuntimeException is thrown, otherwise null is * returned. * * @return the transaction manager */ public TransactionManager locate(boolean throwExceptionIfUnableToLocate) { if (tm != null) return tm; TransactionManager result = tryJNDI(); if (result == null) result = usePrivateAPI(); if (result == null && throwExceptionIfUnableToLocate) throw new RuntimeException("Unable to locate the transaction manager"); return result; } /** * Locate the transaction manager in the well known jndi binding for JBoss * * @return the tm from jndi */ protected TransactionManager tryJNDI() { try { InitialContext ctx = new InitialContext(); tm = (TransactionManager) ctx.lookup(JNDI_NAME); if (log.isTraceEnabled()) log.trace("Got a transaction manager from jndi " + tm); } catch (NamingException e) { log.debug("Unable to lookup: " + JNDI_NAME, e); } return tm; } /** * Use the private api

* * This is a fallback method for non JBossAS use. * * @return the tm from the private api */ protected TransactionManager usePrivateAPI() { try { Class clazz = Class.forName("org.jboss.tm.TxManager"); Method method = clazz.getMethod("getInstance"); TransactionManager result = (TransactionManager) method.invoke(null, null); log.warn("Using the old JBoss transaction manager " + tm); return result; } catch (Exception e) { log.debug("Unable to instantiate legacy transaction manager", e); return null; } } } ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/TransactionManagerFactory.javalibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/Transaction0000644000175000017500000000264410642715352033413 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2005, JBoss Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.tm; import javax.transaction.TransactionManager; /** * A TransactionManager factory. * * @author Dimitris Andreadis * @author adrian@jboss.org * @version $Revision: 44337 $ */ public interface TransactionManagerFactory { /** * Gets the TransactionManager * * @return the TransactionManager */ TransactionManager getTransactionManager(); } ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/XAExceptionFormatter.javalibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/XAException0000644000175000017500000000271710642755424033322 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2005, JBoss Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.tm; import org.jboss.logging.Logger; import javax.transaction.xa.XAException; /** * XAExceptionFormatter * * @author David Jencks * @version $Revision: 37459 $ */ public interface XAExceptionFormatter { /** * Format the exception and log it * * @param xae the exception * @param log the log */ void formatXAException(XAException xae, Logger log); } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/LastResource.javalibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/LastResourc0000644000175000017500000000263010642715352033367 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2005, JBoss Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.tm; /** * A tagging interface to identify an XAResource that does * not support prepare and should be used in the last resource * gambit. i.e. It is committed after the resources are * prepared. If it fails to commit, roll everybody back. * * @author Adrian Brock * @version $Revision: 37459 $ */ public interface LastResource { } ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/JBossXATerminator.javalibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/JBossXATerm0000644000175000017500000000514610642715352033227 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2005, JBoss Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.tm; import javax.resource.spi.XATerminator; import javax.resource.spi.work.Work; import javax.resource.spi.work.WorkCompletedException; import javax.transaction.xa.Xid; /** * Extends XATerminator to include registration calls * * @author Adrian Brock * @version $Revision: 37459 $ */ public interface JBossXATerminator extends XATerminator { /** * Invoked for transaction inflow of work * * @param work the work starting * @param xid the xid of the work * @param timeout the transaction timeout * @throws WorkCompletedException with error code WorkException.TX_CONCURRENT_WORK_DISALLOWED * when work is already present for the xid or whose completion is in progress, only * the global part of the xid must be used for this check. */ void registerWork(Work work, Xid xid, long timeout) throws WorkCompletedException; /** * Invoked for transaction inflow of work * * @param work the work starting * @param xid the xid of the work * @throws WorkCompletedException with error code WorkException.TX_RECREATE_FAILED if it is unable to recreate the transaction context */ void startWork(Work work, Xid xid) throws WorkCompletedException; /** * Invoked when transaction inflow work ends * * @param work the work ending * @param xid the xid of the work */ void endWork(Work work, Xid xid); /** * Invoked when the work fails * * @param work the work ending * @param xid the xid of the work */ void cancelWork(Work work, Xid xid); } ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/XAResourceWrapper.javalibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/XAResourceW0000644000175000017500000000346111040102664033260 0ustar twernertwerner/* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.tm; import java.io.Serializable; import javax.transaction.xa.XAResource; /** * A serializable XAResource wrapper. * * @author Jesper Pedersen * @version $Revision: 1.1 $ */ public interface XAResourceWrapper extends XAResource, Serializable { /** * Get the XAResource that is being wrapped * @return The XAResource */ public XAResource getResource(); /** * Get product name * @return Product name of the instance that created the wrapper if defined; otherwise null */ public String getProductName(); /** * Get product version * @return Product version of the instance that created the warpper if defined; otherwise null */ public String getProductVersion(); } ././@LongLink0000000000000000000000000000020400000000000011561 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/TransactionPropagationContextImporter.javalibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/Transaction0000644000175000017500000000416710642715352033415 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2005, JBoss Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.tm; import javax.transaction.Transaction; /** * Implementations of this interface are used for importing a transaction * propagation context into the transaction manager. * * @see TransactionPropagationContextFactory * @author Ole Husgaard * @author adrian@jboss.org * @version $Revision: 37459 $ */ public interface TransactionPropagationContextImporter { /** * Import the transaction propagation context into the transaction * manager, and return the resulting transaction. * If this transaction propagation context has already been imported * into the transaction manager, this method simply returns the * Transaction representing the transaction propagation * context in the local VM. * Returns null if the transaction propagation context is * null, or if it represents a null transaction. * * @param tpc the transaction propagation context * @return the transaction */ public Transaction importTransactionPropagationContext(Object tpc); } ././@LongLink0000000000000000000000000000020000000000000011555 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/TransactionPropagationContextUtil.javalibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/Transaction0000644000175000017500000000667110642715352033417 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2005, JBoss Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.tm; import javax.naming.InitialContext; import javax.naming.NamingException; import javax.transaction.Transaction; /** * Comment * * @author Bill Burke * @author adrian@jboss.org * @version $Revision: 60868 $ */ public class TransactionPropagationContextUtil { private static TransactionPropagationContextFactory tpcFactory; private static TransactionPropagationContextImporter tpcImporter; private static final String EXPORTER_JNDI_NAME = "java:/TransactionPropagationContextExporter"; private static final String IMPORTER_JNDI_NAME = "java:/TransactionPropagationContextImporter"; public static TransactionPropagationContextFactory getTPCFactoryClientSide() { return tpcFactory; } public static TransactionPropagationContextFactory getTPCFactory() { if (tpcFactory == null) { try { InitialContext ctx = new InitialContext(); try { tpcFactory = (TransactionPropagationContextFactory) ctx.lookup(EXPORTER_JNDI_NAME); } finally { ctx.close(); } } catch (NamingException e) { throw new RuntimeException("Unable to lookup " + EXPORTER_JNDI_NAME, e); } } return tpcFactory; } public static void setTPCFactory(TransactionPropagationContextFactory tpcFactory) { TransactionPropagationContextUtil.tpcFactory = tpcFactory; } public static TransactionPropagationContextImporter getTPCImporter() { if (tpcImporter == null) { try { InitialContext ctx = new InitialContext(); try { // and the transaction propagation context importer tpcImporter = (TransactionPropagationContextImporter) ctx.lookup(IMPORTER_JNDI_NAME); } finally { ctx.close(); } } catch (NamingException e) { throw new RuntimeException("Unable to look up " + IMPORTER_JNDI_NAME, e); } } return tpcImporter; } public static void setTPCImporter(TransactionPropagationContextImporter importer) { tpcImporter = importer; } public static Transaction importTPC(Object tpc) { return getTPCImporter().importTransactionPropagationContext(tpc); } } ././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/TransactionTimeoutConfiguration.javalibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/Transaction0000644000175000017500000000406210642715352033407 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2005, JBoss Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.tm; import javax.transaction.RollbackException; import javax.transaction.SystemException; /** * The interface to implementated by a transaction manager * that supports retrieving the current threads transaction timeout * * @author Adrian Brock * @version $Revision: 37459 $ */ public interface TransactionTimeoutConfiguration { /** * Get the transaction timeout. * * @return the timeout in seconds associated with this thread * @throws SystemException for any error */ int getTransactionTimeout() throws SystemException; /** * Get the time left before transaction timeout * * @param errorRollback throw an error if the transaction is marked for rollback * @return the remaining in the current transaction or -1 * if there is no transaction * @throws RollbackException if the transaction is marked for rollback and * errorRollback is true */ long getTimeLeftBeforeTransactionTimeout(boolean errorRollback) throws RollbackException; } ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/XAResourceRecoveryRegistry.javalibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/XAResourceR0000644000175000017500000000661211015273534033263 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2008, JBoss Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.tm; /** * The transaction management system may require assistance from resource * managers in order to recover crashed XA transactions. By registering * an XAResourceRecovery instance with the XAResourceRecoveryRegistry, * resource manager connectors provide a way for the recovery system to * callback to them and obtain the necessary information. * * This is useful for e.g. JDBC connection pools or JCA connectors that * don't want to expose connection parameters to the transaction system. * The connectors are responsible for instantiating a connection and * using it to instantiate a set of XAResources. These are then exposed to * the recovery system via the registered XAResourceRecovery instance. * * @author Jonathan Halliday (jonathan.halliday@redhat.com) * @version $Revision$ * @see XAResourceRecovery */ public interface XAResourceRecoveryRegistry { /* Implementor's note: Although the transaction manager in JBossAS is pluggable, reading the JBossTS recovery documentation may give some insight into the design of this recovery system interface. The forum thread at http://www.jboss.com/index.html?module=bb&op=viewtopic&t=100435 may also be of interest. */ /** * Register an XAResourceRecovery instance with the transaction recovery system. * This should be called by deployers that are deploying a new XA aware * module that needs recovery support. For example, a database * connection pool, JMS adapter or JCA connector. * * @param recovery The XAResourceRecovery instance to register. */ void addXAResourceRecovery(XAResourceRecovery recovery); /** * Unregister an XAResourceRecovery instance from the transaction recovery system. * This should be called when an XA aware module is undeployed, to inform the * recovery system that recovery is no longer required or supported. * * Note this method may block whilst an ongoing recovery operation is completed. * Recovery behavior is undefined if the undeployment does not wait for this * operation to complete. * * @param recovery The XAResourceRecovery instance to unregister. * Implementations should fail silent if an attempt is made to unregister * an XAResourceRecovery instance that is not currently registered. */ void removeXAResourceRecovery(XAResourceRecovery recovery); } ././@LongLink0000000000000000000000000000020300000000000011560 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/TransactionPropagationContextFactory.javalibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/Transaction0000644000175000017500000000475610642715352033421 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2005, JBoss Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.tm; import javax.transaction.Transaction; /** * Implementations of this interface are used for getting * a transaction propagation context at the client-side. * We need a specific implementation of this interface for * each kind of DTM we are going to interoperate with. (So * we may have 20 new classes if we are going to interoperate * with 20 different kinds of distributed transaction * managers.) * The reason for having the methods in this interface return * Object is that we do not really know what kind of transaction * propagation context is returned. * * @see TransactionPropagationContextImporter * @author Ole Husgaard * @author adrian@jboss.org * @version $Revision: 37459 $ */ public interface TransactionPropagationContextFactory { /** * Return a transaction propagation context for the transaction * currently associated with the invoking thread, or null * if the invoking thread is not associated with a transaction. * * @return the context */ public Object getTransactionPropagationContext(); /** * Return a transaction propagation context for the transaction * given as an argument, or null * if the argument is null or of a type unknown to * this factory. * * @param tx the transaction * @return the context */ public Object getTransactionPropagationContext(Transaction tx); } ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/TransactionDemarcationSupport.javalibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/Transaction0000644000175000017500000000475410642715352033417 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2005, JBoss Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.tm; import javax.transaction.InvalidTransactionException; import javax.transaction.SystemException; import javax.transaction.Transaction; import javax.transaction.TransactionManager; /** * A simple helper for transaction demarcation. * * @author Adrian Brock * @version $Revision: 37459 $ */ public class TransactionDemarcationSupport { /** * Suspend any transaction associated with the thread * * @return any suspended transaction or null if there was no transaction */ public static Transaction suspendAnyTransaction() { TransactionManager tm = TransactionManagerLocator.locateTransactionManager(); try { return tm.suspend(); } catch (SystemException e) { throw new RuntimeException("Unable to suspend transaction", e); } } /** * Resume any transaction * * @param tx the transaction to resume */ public static void resumeAnyTransaction(Transaction tx) { // Nothing to do if (tx == null) return; TransactionManager tm = TransactionManagerLocator.locateTransactionManager(); try { tm.resume(tx); } catch (InvalidTransactionException e) { throw new RuntimeException("Unable to resume an invalid transaction", e); } catch (SystemException e) { throw new RuntimeException("Unable to suspend transaction", e); } } } ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/TransactionLocalDelegate.javalibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/src/main/java/org/jboss/tm/Transaction0000644000175000017500000000507710642715352033416 0ustar twernertwerner/* * JBoss, Home of Professional Open Source * Copyright 2005, JBoss Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.tm; import javax.transaction.Transaction; /** * The interface to implementated for a transaction local implementation * * @author Adrian Brock * @version $Revision: 37459 $ */ public interface TransactionLocalDelegate { /** * get the transaction local value. * * @param local the transaction local * @param tx the transcation * @return the value */ Object getValue(TransactionLocal local, Transaction tx); /** * put the value in the transaction local * * @param local the transaction local * @param tx the transcation * @param value the value */ void storeValue(TransactionLocal local, Transaction tx, Object value); /** * does Transaction contain object? * * @param local the transaction local * @param tx the transcation * @return true if it has the value */ boolean containsValue(TransactionLocal local, Transaction tx); /** * Lock the transaction local in the context of this transaction * * @param local the transaction local * @param tx the transcation * @throws IllegalStateException if the transaction is not active * @throws InterruptedException if the thread is interrupted */ void lock(TransactionLocal local, Transaction tx) throws InterruptedException; /** * Unlock the transaction local in the context of this transaction * * @param local the transaction local * @param tx the transcation */ void unlock(TransactionLocal local, Transaction tx); } libjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/.settings/0000755000175000017500000000000011116055617026126 5ustar twernertwernerlibjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/.settings/org.eclipse.jdt.core.prefs0000644000175000017500000000031410642715352033110 0ustar twernertwerner#Wed Jul 04 03:05:53 CEST 2007 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.source=1.5 org.eclipse.jdt.core.compiler.compliance=1.5 libjboss-integration-java-5.0.3.GA.orig/jboss-transaction-spi/pom.xml0000644000175000017500000000205611111467354025530 0ustar twernertwerner org.jboss.integration jboss-integration-parent 5.0.3.GA 4.0.0 jboss-transaction-spi 5.0.3.GA jar JBoss Transaction 5.0.0 SPI http://www.jboss.org The Java Transaction 5.0.0 SPI classes org.jboss.logging jboss-logging-spi org.jboss.javaee jboss-jca-api org.jboss.javaee jboss-transaction-api