[jboss-svn-commits] JBL Code SVN: r11930 - in labs/jbosstm/workspace/maciej.machulak/code/WSTest: lib and 20 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu May 17 21:20:01 EDT 2007
Author: maciej.machulak
Date: 2007-05-17 21:20:00 -0400 (Thu, 17 May 2007)
New Revision: 11930
Added:
labs/jbosstm/workspace/maciej.machulak/code/WSTest/WSTest.iml
labs/jbosstm/workspace/maciej.machulak/code/WSTest/WSTest.ipr
labs/jbosstm/workspace/maciej.machulak/code/WSTest/WSTest.iws
labs/jbosstm/workspace/maciej.machulak/code/WSTest/build.xml
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/wstest/
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/wstest/annotations/
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/wstest/annotations/HandlerInfo.class
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/wstest/annotations/HandlerWriter.class
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/wstest/annotations/MethodInfo.class
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/wstest/annotations/WSTransactionAttribute.class
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/wstest/annotations/WSTransactionAttributeType.class
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/wstest/annotations/WebServiceAP.class
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/wstest/annotations/WebServiceAPF.class
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/wstest/annotations/XMLWriter.class
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/commons-logging.jar
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/config.jar
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/flight.jar
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/javaee.jar
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/jbossjts.jar
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/jbossts-common.jar
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/saaj-api.jar
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/stax-api-1.0.jar
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/tools.jar
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/txbridge.jar
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/ws-c.jar
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/ws-c.war
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/ws-t.jar
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/ws-t.war
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/wsas.jar
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/wscf.jar
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/wscf.war
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/wstx-asl-2.0.3.jar
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/wstx.jar
labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/wstx.war
labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/
labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/application.xml
labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/application.xml.bak
labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/index.jsp
labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/jaxws-full-handlers-server.xml
labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/jaxws-handlers-client.xml
labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/jaxws-handlers-server.xml
labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/jaxws-handlers-server.xml.bak
labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/jaxws-hotel-handlers-server.xml
labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/jaxws-hotel-handlers-server.xml.bak
labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/persistence.xml
labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/style.css
labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/web.xml
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/JaxWSTransactionBridgeHandler.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/HandlerInfo.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/HandlerWriter.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/MethodInfo.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/WSTransactionAttribute.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/WSTransactionAttributeType.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/WebServiceAP.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/WebServiceAPF.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/XMLWriter.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/clients/
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/clients/JaxWSClientHeaderContextProcessor.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/clients/WeekendClient.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/JaxWSServerHeaderContextProcessor.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/bistro/
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/bistro/Bistro.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/bistro/BistroEntityImpl.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/bistro/BistroImpl.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/flight/
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/flight/FlightAT.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/flight/FlightATImpl.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/flight/FlightManager.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/flight/FlightParticipantAT.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/flight/FlightView.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/hotel/
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/hotel/DummyParticipantAT.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/hotel/Hotel.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/hotel/HotelEntityImpl.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/hotel/HotelException.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/hotel/HotelImpl.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/hotel/jaxws-handlers.xml
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/restaurant/
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantAT.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantATImpl.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantEntityImpl.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantManager.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantParticipantAT.java
labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantView.java
Log:
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/WSTest.iml
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/WSTest.iml (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/WSTest.iml 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module version="4" relativePaths="true" type="JAVA_MODULE">
+ <component name="ModuleRootManager" />
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="library" name="javaee" level="project" />
+ <orderEntry type="library" name="log4j" level="project" />
+ <orderEntry type="library" name="WS" level="project" />
+ <orderEntry type="library" name="jbossjts" level="project" />
+ <orderEntry type="library" name="txbridge" level="project" />
+ <orderEntry type="library" name="tools" level="project" />
+ <orderEntryProperties />
+ </component>
+ <component name="VcsManagerConfiguration">
+ <option name="ACTIVE_VCS_NAME" value="svn" />
+ <option name="USE_PROJECT_VCS" value="false" />
+ </component>
+</module>
+
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/WSTest.ipr
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/WSTest.ipr (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/WSTest.ipr 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,341 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4" relativePaths="false">
+ <component name="AntConfiguration">
+ <defaultAnt bundledAnt="true" />
+ <buildFile url="file://$PROJECT_DIR$/build.xml">
+ <additionalClassPath />
+ <antReference projectDefault="true" />
+ <customJdkName value="" />
+ <maximumHeapSize value="128" />
+ <properties />
+ </buildFile>
+ </component>
+ <component name="BuildJarProjectSettings">
+ <option name="BUILD_JARS_ON_MAKE" value="false" />
+ </component>
+ <component name="CodeStyleProjectProfileManger">
+ <option name="PROJECT_PROFILE" />
+ <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
+ </component>
+ <component name="CodeStyleSettingsManager">
+ <option name="PER_PROJECT_SETTINGS" />
+ <option name="USE_PER_PROJECT_SETTINGS" value="false" />
+ </component>
+ <component name="CompilerConfiguration">
+ <option name="DEFAULT_COMPILER" value="Javac" />
+ <option name="DEPLOY_AFTER_MAKE" value="0" />
+ <resourceExtensions>
+ <entry name=".+\.(properties|xml|html|dtd|tld)" />
+ <entry name=".+\.(gif|png|jpeg|jpg)" />
+ </resourceExtensions>
+ <wildcardResourcePatterns>
+ <entry name="?*.properties" />
+ <entry name="?*.xml" />
+ <entry name="?*.gif" />
+ <entry name="?*.png" />
+ <entry name="?*.jpeg" />
+ <entry name="?*.jpg" />
+ <entry name="?*.html" />
+ <entry name="?*.dtd" />
+ <entry name="?*.tld" />
+ </wildcardResourcePatterns>
+ </component>
+ <component name="DataSourceManagerImpl" />
+ <component name="DependenciesAnalyzeManager">
+ <option name="myForwardDirection" value="false" />
+ </component>
+ <component name="DependencyValidationManager" />
+ <component name="EclipseCompilerSettings">
+ <option name="DEBUGGING_INFO" value="true" />
+ <option name="GENERATE_NO_WARNINGS" value="true" />
+ <option name="DEPRECATION" value="false" />
+ <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+ <option name="MAXIMUM_HEAP_SIZE" value="128" />
+ </component>
+ <component name="EclipseEmbeddedCompilerSettings">
+ <option name="DEBUGGING_INFO" value="true" />
+ <option name="GENERATE_NO_WARNINGS" value="true" />
+ <option name="DEPRECATION" value="false" />
+ <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+ <option name="MAXIMUM_HEAP_SIZE" value="128" />
+ </component>
+ <component name="EntryPointsManager">
+ <entry_points />
+ </component>
+ <component name="ExportToHTMLSettings">
+ <option name="PRINT_LINE_NUMBERS" value="false" />
+ <option name="OPEN_IN_BROWSER" value="false" />
+ <option name="OUTPUT_DIRECTORY" />
+ </component>
+ <component name="GUI Designer component loader factory" />
+ <component name="IdProvider" IDEtalkID="DCAC47215A60376190135F2646377A87" />
+ <component name="InspectionProjectProfileManager">
+ <option name="PROJECT_PROFILE" value="Project Default" />
+ <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
+ <scopes />
+ <profiles>
+ <profile version="1.0" is_locked="false">
+ <option name="myName" value="Project Default" />
+ <option name="myLocal" value="false" />
+ <used_levels>
+ <error>
+ <option name="myName" value="ERROR" />
+ <option name="myVal" value="400" />
+ </error>
+ <warning>
+ <option name="myName" value="WARNING" />
+ <option name="myVal" value="300" />
+ </warning>
+ <information>
+ <option name="myName" value="INFO" />
+ <option name="myVal" value="200" />
+ </information>
+ <server>
+ <option name="myName" value="SERVER PROBLEM" />
+ <option name="myVal" value="100" />
+ </server>
+ </used_levels>
+ </profile>
+ </profiles>
+ </component>
+ <component name="JavacSettings">
+ <option name="DEBUGGING_INFO" value="true" />
+ <option name="GENERATE_NO_WARNINGS" value="false" />
+ <option name="DEPRECATION" value="true" />
+ <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+ <option name="MAXIMUM_HEAP_SIZE" value="128" />
+ </component>
+ <component name="JavadocGenerationManager">
+ <option name="OUTPUT_DIRECTORY" />
+ <option name="OPTION_SCOPE" value="protected" />
+ <option name="OPTION_HIERARCHY" value="true" />
+ <option name="OPTION_NAVIGATOR" value="true" />
+ <option name="OPTION_INDEX" value="true" />
+ <option name="OPTION_SEPARATE_INDEX" value="true" />
+ <option name="OPTION_DOCUMENT_TAG_USE" value="false" />
+ <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
+ <option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
+ <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" />
+ <option name="OPTION_DEPRECATED_LIST" value="true" />
+ <option name="OTHER_OPTIONS" value="" />
+ <option name="HEAP_SIZE" />
+ <option name="LOCALE" />
+ <option name="OPEN_IN_BROWSER" value="true" />
+ </component>
+ <component name="JikesSettings">
+ <option name="JIKES_PATH" value="" />
+ <option name="DEBUGGING_INFO" value="true" />
+ <option name="DEPRECATION" value="true" />
+ <option name="GENERATE_NO_WARNINGS" value="false" />
+ <option name="IS_EMACS_ERRORS_MODE" value="true" />
+ <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+ </component>
+ <component name="LogConsolePreferences">
+ <option name="FILTER_ERRORS" value="false" />
+ <option name="FILTER_WARNINGS" value="false" />
+ <option name="FILTER_INFO" value="true" />
+ <option name="CUSTOM_FILTER" />
+ </component>
+ <component name="Palette2">
+ <group name="Swing">
+ <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
+ </item>
+ <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
+ </item>
+ <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
+ </item>
+ <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
+ <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
+ </item>
+ <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
+ <initial-values>
+ <property name="text" value="Button" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+ <initial-values>
+ <property name="text" value="RadioButton" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+ <initial-values>
+ <property name="text" value="CheckBox" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
+ <initial-values>
+ <property name="text" value="Label" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+ <preferred-size width="150" height="-1" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+ <preferred-size width="150" height="-1" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+ <preferred-size width="150" height="-1" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
+ </item>
+ <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+ <preferred-size width="200" height="200" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+ <preferred-size width="200" height="200" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+ </item>
+ <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+ </item>
+ <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
+ </item>
+ <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
+ </item>
+ <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
+ <preferred-size width="-1" height="20" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
+ </item>
+ <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
+ </item>
+ </group>
+ </component>
+ <component name="ProjectModuleManager">
+ <modules>
+ <module fileurl="file://$PROJECT_DIR$/WSTest.iml" filepath="$PROJECT_DIR$/WSTest.iml" />
+ </modules>
+ </component>
+ <component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="1.5" project-jdk-type="JavaSDK">
+ <output url="file://$PROJECT_DIR$/classes" />
+ </component>
+ <component name="ProjectRunConfigurationManager" />
+ <component name="RmicSettings">
+ <option name="IS_EANABLED" value="false" />
+ <option name="DEBUGGING_INFO" value="true" />
+ <option name="GENERATE_NO_WARNINGS" value="false" />
+ <option name="GENERATE_IIOP_STUBS" value="false" />
+ <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+ </component>
+ <component name="StarteamVcsAdapter" />
+ <component name="VssVcs" />
+ <component name="WebServicesPlugin" />
+ <component name="com.intellij.jsf.UserDefinedFacesConfigs">
+ <option name="USER_DEFINED_CONFIGS">
+ <value>
+ <list size="0" />
+ </value>
+ </option>
+ </component>
+ <component name="libraryTable">
+ <library name="javaee">
+ <CLASSES>
+ <root url="jar://$APPLICATION_HOME_DIR$/lib/javaee.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ <library name="log4j">
+ <CLASSES>
+ <root url="jar://$APPLICATION_HOME_DIR$/lib/log4j.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ <library name="WS">
+ <CLASSES>
+ <root url="jar://$PROJECT_DIR$/lib/ws-c.jar!/" />
+ <root url="jar://$PROJECT_DIR$/lib/ws-t.jar!/" />
+ <root url="jar://$PROJECT_DIR$/lib/wsas.jar!/" />
+ <root url="jar://$PROJECT_DIR$/lib/wscf.jar!/" />
+ <root url="jar://$PROJECT_DIR$/lib/wstx.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ <library name="jbossjts">
+ <CLASSES>
+ <root url="jar://$PROJECT_DIR$/lib/jbossjts.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ <library name="txbridge">
+ <CLASSES>
+ <root url="jar://C:/RedHat/MyCode/WSTest/lib/txbridge.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ <library name="tools">
+ <CLASSES>
+ <root url="jar://C:/RedHat/MyCode/WSTest/lib/tools.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </component>
+ <component name="uidesigner-configuration">
+ <option name="INSTRUMENT_CLASSES" value="true" />
+ <option name="COPY_FORMS_RUNTIME_TO_OUTPUT" value="true" />
+ <option name="DEFAULT_LAYOUT_MANAGER" value="GridLayoutManager" />
+ </component>
+ <UsedPathMacros />
+</project>
+
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/WSTest.iws
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/WSTest.iws (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/WSTest.iws 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,1157 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4" relativePaths="false">
+ <component name="BookmarkManager" />
+ <component name="ChangeBrowserSettings">
+ <option name="MAIN_SPLITTER_PROPORTION" value="0.3" />
+ <option name="MESSAGES_SPLITTER_PROPORTION" value="0.8" />
+ <option name="USE_DATE_BEFORE_FILTER" value="false" />
+ <option name="USE_DATE_AFTER_FILTER" value="false" />
+ <option name="USE_CHANGE_BEFORE_FILTER" value="false" />
+ <option name="USE_CHANGE_AFTER_FILTER" value="false" />
+ <option name="DATE_BEFORE" value="" />
+ <option name="DATE_AFTER" value="" />
+ <option name="CHANGE_BEFORE" value="" />
+ <option name="CHANGE_AFTER" value="" />
+ <option name="USE_USER_FILTER" value="false" />
+ <option name="USER" value="" />
+ </component>
+ <component name="ChangeListManager">
+ <list default="true" name="Default" comment="">
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantAT.java" afterPath="$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantAT.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/annotations/HandlerWriter.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/annotations/WSTransactionAttribute.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/jbossjts.jar" afterPath="$PROJECT_DIR$/lib/jbossjts.jar" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/annotations/WSTransactionAttributeType.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/services/hotel/Hotel.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/services/flight/FlightATImpl.java" afterPath="$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/services/flight/FlightATImpl.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/services/bistro" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/services/hotel/HotelImpl.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/services/flight/FlightManager.java" afterPath="$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/services/flight/FlightManager.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/clients/WeekendClient.java" afterPath="$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/clients/WeekendClient.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/services/hotel/HotelException.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/txbridge.jar" afterPath="$PROJECT_DIR$/lib/txbridge.jar" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/services/hotel" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/annotations" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/annotations/MethodInfo.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/services/hotel/HotelEntityImpl.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/services/hotel/DummyParticipantAT.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/resources/application.xml" afterPath="$PROJECT_DIR$/resources/application.xml" />
+ </list>
+ </component>
+ <component name="ChangeListSynchronizer" />
+ <component name="ChangesViewManager" flattened_view="true" />
+ <component name="CheckinPanelState" />
+ <component name="Commander">
+ <leftPanel />
+ <rightPanel />
+ <splitter proportion="0.5" />
+ </component>
+ <component name="CompilerWorkspaceConfiguration">
+ <option name="COMPILE_IN_BACKGROUND" value="false" />
+ <option name="AUTO_SHOW_ERRORS_IN_EDITOR" value="true" />
+ <option name="CLOSE_MESSAGE_VIEW_IF_SUCCESS" value="true" />
+ <option name="COMPILE_DEPENDENT_FILES" value="false" />
+ <option name="CLEAR_OUTPUT_DIRECTORY" value="false" />
+ <option name="ASSERT_NOT_NULL" value="true" />
+ </component>
+ <component name="CoverageDataManager" />
+ <component name="Cvs2Configuration">
+ <option name="PRUNE_EMPTY_DIRECTORIES" value="true" />
+ <option name="MERGING_MODE" value="0" />
+ <option name="MERGE_WITH_BRANCH1_NAME" value="HEAD" />
+ <option name="MERGE_WITH_BRANCH2_NAME" value="HEAD" />
+ <option name="RESET_STICKY" value="false" />
+ <option name="CREATE_NEW_DIRECTORIES" value="true" />
+ <option name="DEFAULT_TEXT_FILE_SUBSTITUTION" value="kv" />
+ <option name="PROCESS_UNKNOWN_FILES" value="false" />
+ <option name="PROCESS_DELETED_FILES" value="false" />
+ <option name="PROCESS_IGNORED_FILES" value="false" />
+ <option name="RESERVED_EDIT" value="false" />
+ <option name="CHECKOUT_DATE_OR_REVISION_SETTINGS">
+ <value>
+ <option name="BRANCH" value="" />
+ <option name="DATE" value="" />
+ <option name="USE_BRANCH" value="false" />
+ <option name="USE_DATE" value="false" />
+ </value>
+ </option>
+ <option name="UPDATE_DATE_OR_REVISION_SETTINGS">
+ <value>
+ <option name="BRANCH" value="" />
+ <option name="DATE" value="" />
+ <option name="USE_BRANCH" value="false" />
+ <option name="USE_DATE" value="false" />
+ </value>
+ </option>
+ <option name="SHOW_CHANGES_REVISION_SETTINGS">
+ <value>
+ <option name="BRANCH" value="" />
+ <option name="DATE" value="" />
+ <option name="USE_BRANCH" value="false" />
+ <option name="USE_DATE" value="false" />
+ </value>
+ </option>
+ <option name="SHOW_OUTPUT" value="false" />
+ <option name="ADD_WATCH_INDEX" value="0" />
+ <option name="REMOVE_WATCH_INDEX" value="0" />
+ <option name="UPDATE_KEYWORD_SUBSTITUTION" />
+ <option name="MAKE_NEW_FILES_READONLY" value="false" />
+ <option name="SHOW_CORRUPTED_PROJECT_FILES" value="0" />
+ <option name="TAG_AFTER_PROJECT_COMMIT" value="false" />
+ <option name="OVERRIDE_EXISTING_TAG_FOR_PROJECT" value="true" />
+ <option name="TAG_AFTER_PROJECT_COMMIT_NAME" value="" />
+ <option name="CLEAN_COPY" value="false" />
+ </component>
+ <component name="DaemonCodeAnalyzer">
+ <disable_hints />
+ </component>
+ <component name="DebuggerManager">
+ <breakpoint_any>
+ <breakpoint>
+ <option name="NOTIFY_CAUGHT" value="true" />
+ <option name="NOTIFY_UNCAUGHT" value="true" />
+ <option name="ENABLED" value="false" />
+ <option name="SUSPEND_POLICY" value="SuspendAll" />
+ <option name="LOG_ENABLED" value="false" />
+ <option name="LOG_EXPRESSION_ENABLED" value="false" />
+ <option name="COUNT_FILTER_ENABLED" value="false" />
+ <option name="COUNT_FILTER" value="0" />
+ <option name="CONDITION_ENABLED" value="false" />
+ <option name="CLASS_FILTERS_ENABLED" value="false" />
+ <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+ <option name="CONDITION" value="" />
+ <option name="LOG_MESSAGE" value="" />
+ </breakpoint>
+ <breakpoint>
+ <option name="NOTIFY_CAUGHT" value="true" />
+ <option name="NOTIFY_UNCAUGHT" value="true" />
+ <option name="ENABLED" value="false" />
+ <option name="SUSPEND_POLICY" value="SuspendAll" />
+ <option name="LOG_ENABLED" value="false" />
+ <option name="LOG_EXPRESSION_ENABLED" value="false" />
+ <option name="COUNT_FILTER_ENABLED" value="false" />
+ <option name="COUNT_FILTER" value="0" />
+ <option name="CONDITION_ENABLED" value="false" />
+ <option name="CLASS_FILTERS_ENABLED" value="false" />
+ <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+ <option name="CONDITION" value="" />
+ <option name="LOG_MESSAGE" value="" />
+ </breakpoint>
+ </breakpoint_any>
+ <breakpoint_rules />
+ <ui_properties />
+ </component>
+ <component name="ErrorTreeViewConfiguration">
+ <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
+ <option name="HIDE_WARNINGS" value="false" />
+ </component>
+ <component name="FavoritesManager">
+ <favorites_list name="WSTest" />
+ </component>
+ <component name="FavoritesProjectViewPane">
+ <subPane subId="WSTest">
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" />
+ <option name="myItemType" value="com.intellij.ide.favoritesTreeView.FavoritesTreeNodeDescriptor" />
+ </PATH_ELEMENT>
+ </PATH>
+ </subPane>
+ </component>
+ <component name="FileEditorManager">
+ <leaf>
+ <file leaf-file-name="HandlerInfo.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/annotations/HandlerInfo.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="22" column="4" selection-start="408" selection-end="408" vertical-scroll-proportion="0.5102319">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="HandlerWriter.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/annotations/HandlerWriter.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="14" column="35" selection-start="423" selection-end="423" vertical-scroll-proportion="0.33147633">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="MethodInfo.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/annotations/MethodInfo.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="24" column="4" selection-start="356" selection-end="356" vertical-scroll-proportion="0.55661666">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="WebServiceAP.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/annotations/WebServiceAP.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="127" column="49" selection-start="6022" selection-end="6022" vertical-scroll-proportion="2.7228413">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="WebServiceAPF.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/annotations/WebServiceAPF.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="29" column="4" selection-start="906" selection-end="906" vertical-scroll-proportion="0.5682451">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="WSTransactionAttribute.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/annotations/WSTransactionAttribute.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="18" column="1" selection-start="426" selection-end="426" vertical-scroll-proportion="0.30779943">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="WSTransactionAttributeType.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/annotations/WSTransactionAttributeType.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="7" column="1" selection-start="150" selection-end="150" vertical-scroll-proportion="0.16234653">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="XMLWriter.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/annotations/XMLWriter.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="29" column="8" selection-start="529" selection-end="529" vertical-scroll-proportion="0.26044568">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="WeekendClient.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/clients/WeekendClient.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="34" column="13" selection-start="1157" selection-end="1157" vertical-scroll-proportion="-4.2562675">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="build.xml" pinned="false" current="true" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/build.xml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="11" column="43" selection-start="528" selection-end="528" vertical-scroll-proportion="0.23816156">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ </leaf>
+ </component>
+ <component name="FindManager">
+ <FindUsagesManager>
+ <setting name="OPEN_NEW_TAB" value="false" />
+ </FindUsagesManager>
+ </component>
+ <component name="HierarchyBrowserManager">
+ <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
+ <option name="SORT_ALPHABETICALLY" value="false" />
+ <option name="HIDE_CLASSES_WHERE_METHOD_NOT_IMPLEMENTED" value="false" />
+ </component>
+ <component name="InspectionManager">
+ <option name="AUTOSCROLL_TO_SOURCE" value="false" />
+ <option name="SPLITTER_PROPORTION" value="0.5" />
+ <option name="GROUP_BY_SEVERITY" value="false" />
+ <option name="FILTER_RESOLVED_ITEMS" value="true" />
+ <option name="ANALYZE_TEST_SOURCES" value="true" />
+ <option name="SHOW_DIFF_WITH_PREVIOUS_RUN" value="false" />
+ <option name="SCOPE_TYPE" value="1" />
+ <option name="CUSTOM_SCOPE_NAME" value="" />
+ <option name="SHOW_ONLY_DIFF" value="false" />
+ <option name="myCurrentProfileName" value="Default" />
+ </component>
+ <component name="J2EEProjectPane">
+ <subPane subId="file">
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest.ipr" />
+ <option name="myItemType" value="com.intellij.javaee.module.view.nodes.JavaeeProjectNodeDescriptor" />
+ </PATH_ELEMENT>
+ </PATH>
+ </subPane>
+ </component>
+ <component name="JspContextManager" />
+ <component name="ModuleEditorState">
+ <option name="LAST_EDITED_MODULE_NAME" />
+ <option name="LAST_EDITED_TAB_NAME" />
+ </component>
+ <component name="NamedScopeManager" />
+ <component name="PackagesPane">
+ <subPane>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ </subPane>
+ </component>
+ <component name="PerforceChangeBrowserSettings">
+ <option name="USE_CLIENT_FILTER" value="true" />
+ <option name="CLIENT" value="" />
+ </component>
+ <component name="PerforceDirect.Settings">
+ <option name="useP4CONFIG" value="true" />
+ <option name="port" value="<perforce_server>:1666" />
+ <option name="client" value="" />
+ <option name="user" value="" />
+ <option name="passwd" value="" />
+ <option name="showCmds" value="false" />
+ <option name="useNativeApi" value="true" />
+ <option name="pathToExec" value="p4" />
+ <option name="useCustomPathToExec" value="false" />
+ <option name="SYNC_FORCE" value="false" />
+ <option name="SYNC_RUN_RESOLVE" value="true" />
+ <option name="REVERT_UNCHANGED_FILES" value="true" />
+ <option name="CHARSET" value="none" />
+ <option name="SHOW_BRANCHES_HISTORY" value="true" />
+ <option name="ENABLED" value="true" />
+ <option name="USE_LOGIN" value="false" />
+ <option name="LOGIN_SILENTLY" value="false" />
+ <option name="INTEGRATE_RUN_RESOLVE" value="true" />
+ <option name="INTEGRATE_REVERT_UNCHANGED" value="true" />
+ <option name="SERVER_TIMEOUT" value="20000" />
+ </component>
+ <component name="ProjectLevelVcsManager">
+ <OptionsSetting value="true" id="Add" />
+ <OptionsSetting value="true" id="Remove" />
+ <OptionsSetting value="true" id="Checkin" />
+ <OptionsSetting value="true" id="Checkout" />
+ <OptionsSetting value="true" id="Update" />
+ <OptionsSetting value="true" id="Status" />
+ <OptionsSetting value="true" id="Edit" />
+ <OptionsSetting value="true" id="Undo Check Out" />
+ <OptionsSetting value="true" id="Compare with SourceSafe Version" />
+ <OptionsSetting value="true" id="Get Latest Version" />
+ <ConfirmationsSetting value="0" id="Add" />
+ <ConfirmationsSetting value="0" id="Remove" />
+ </component>
+ <component name="ProjectPane">
+ <subPane>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="Libraries" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.LibraryGroupNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="Libraries" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.LibraryGroupNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="javaee" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.NamedLibraryElementNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\Program Files\JetBrains\IntelliJ IDEA 6.0\lib\javaee.jar" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="Libraries" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.LibraryGroupNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="javaee" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.NamedLibraryElementNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\Program Files\JetBrains\IntelliJ IDEA 6.0\lib\javaee.jar" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\Program Files\JetBrains\IntelliJ IDEA 6.0\lib\javaee.jar!\javax" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\src\com\machulak\jboss\test\wstest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\src\com\machulak\jboss\test\wstest\services" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\src\com\machulak\jboss\test\wstest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\src\com\machulak\jboss\test\wstest\services" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\src\com\machulak\jboss\test\wstest\services\restaurant" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\src\com\machulak\jboss\test\wstest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\src\com\machulak\jboss\test\wstest\services" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\src\com\machulak\jboss\test\wstest\services\hotel" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\src\com\machulak\jboss\test\wstest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\src\com\machulak\jboss\test\wstest\services" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\src\com\machulak\jboss\test\wstest\services\flight" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\src\com\machulak\jboss\test\wstest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\src\com\machulak\jboss\test\wstest\services" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\src\com\machulak\jboss\test\wstest\services\bistro" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\src\com\machulak\jboss\test\wstest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\src\com\machulak\jboss\test\wstest\clients" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\src\com\machulak\jboss\test\wstest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\src\com\machulak\jboss\test\wstest\annotations" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="WSTest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:C:\RedHat\oldbackup\resources" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ </subPane>
+ </component>
+ <component name="ProjectReloadState">
+ <option name="STATE" value="0" />
+ </component>
+ <component name="ProjectView">
+ <navigator currentView="ProjectPane" proportions="0.16666667" version="1" splitterProportion="0.5">
+ <flattenPackages ProjectPane="false" />
+ <showMembers />
+ <showModules />
+ <showLibraryContents />
+ <hideEmptyPackages />
+ <abbreviatePackageNames />
+ <showStructure Favorites="false" ProjectPane="false" Scope="false" J2EEPane="false" PackagesPane="false" />
+ <autoscrollToSource />
+ <autoscrollFromSource />
+ <sortByType />
+ </navigator>
+ </component>
+ <component name="PropertiesComponent">
+ <property name="EJB Module Deployment Descriptor Default Version" value="3.0" />
+ <property name="MemberChooser.copyJavadoc" value="false" />
+ <property name="GoToClass.includeLibraries" value="false" />
+ <property name="MemberChooser.showClasses" value="true" />
+ <property name="MemberChooser.sorted" value="false" />
+ <property name="Web Module Deployment Descriptor Default Version" value="2.4" />
+ <property name="GoToFile.includeJavaFiles" value="false" />
+ <property name="GoToClass.toSaveIncludeLibraries" value="false" />
+ </component>
+ <component name="ReadonlyStatusHandler">
+ <option name="SHOW_DIALOG" value="true" />
+ </component>
+ <component name="RecentsManager">
+ <key name="CopyClassDialog.RECENTS_KEY">
+ <recent name="com.machulak.jboss.test.wstest.clients" />
+ </key>
+ <key name="MoveClassesOrPackagesDialog.RECENTS_KEY">
+ <recent name="com.machulak.jboss.test.wstest.services.restaurant" />
+ <recent name="com.machulak.jboss.test.wstest.services" />
+ </key>
+ </component>
+ <component name="RestoreUpdateTree" />
+ <component name="RunManager">
+ <configuration default="true" type="Application" factoryName="Application" enabled="false" merge="false">
+ <option name="MAIN_CLASS_NAME" />
+ <option name="VM_PARAMETERS" />
+ <option name="PROGRAM_PARAMETERS" />
+ <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+ <option name="ALTERNATIVE_JRE_PATH" />
+ <option name="ENABLE_SWING_INSPECTOR" value="false" />
+ <module name="" />
+ </configuration>
+ <configuration default="true" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
+ <module name="" />
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+ <option name="ALTERNATIVE_JRE_PATH" />
+ <option name="PACKAGE_NAME" />
+ <option name="MAIN_CLASS_NAME" />
+ <option name="METHOD_NAME" />
+ <option name="TEST_OBJECT" value="class" />
+ <option name="VM_PARAMETERS" />
+ <option name="PARAMETERS" />
+ <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+ <option name="ADDITIONAL_CLASS_PATH" />
+ <option name="TEST_SEARCH_SCOPE">
+ <value defaultName="wholeProject" />
+ </option>
+ <method>
+ <option name="Make" value="true" />
+ </method>
+ </configuration>
+ <configuration default="true" type="Remote" factoryName="Remote">
+ <option name="USE_SOCKET_TRANSPORT" value="true" />
+ <option name="SERVER_MODE" value="false" />
+ <option name="SHMEM_ADDRESS" value="javadebug" />
+ <option name="HOST" value="localhost" />
+ <option name="PORT" value="5005" />
+ </configuration>
+ <configuration default="true" type="Applet" factoryName="Applet">
+ <module name="" />
+ <option name="MAIN_CLASS_NAME" />
+ <option name="HTML_FILE_NAME" />
+ <option name="HTML_USED" value="false" />
+ <option name="WIDTH" value="400" />
+ <option name="HEIGHT" value="300" />
+ <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
+ <option name="VM_PARAMETERS" />
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+ <option name="ALTERNATIVE_JRE_PATH" />
+ </configuration>
+ <configuration name="<template>" type="WebApp" default="true" selected="false">
+ <Host>localhost</Host>
+ <Port>5050</Port>
+ </configuration>
+ </component>
+ <component name="ScopeViewComponent">
+ <subPane subId="Tests" />
+ <subPane subId="Production">
+ <PATH>
+ <PATH_ELEMENT USER_OBJECT="Root">
+ <option name="myItemId" value="" />
+ <option name="myItemType" value="" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT USER_OBJECT="WSTest">
+ <option name="myItemId" value="" />
+ <option name="myItemType" value="" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT USER_OBJECT="C:\RedHat\MyCode\WSTest">
+ <option name="myItemId" value="" />
+ <option name="myItemType" value="" />
+ </PATH_ELEMENT>
+ </PATH>
+ </subPane>
+ <subPane subId="Problems" />
+ <subPane subId="Project">
+ <PATH>
+ <PATH_ELEMENT USER_OBJECT="Root">
+ <option name="myItemId" value="" />
+ <option name="myItemType" value="" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT USER_OBJECT="WSTest">
+ <option name="myItemId" value="" />
+ <option name="myItemType" value="" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT USER_OBJECT="C:\RedHat\MyCode\WSTest">
+ <option name="myItemId" value="" />
+ <option name="myItemType" value="" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT USER_OBJECT="Root">
+ <option name="myItemId" value="" />
+ <option name="myItemType" value="" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT USER_OBJECT="WSTest">
+ <option name="myItemId" value="" />
+ <option name="myItemType" value="" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT USER_OBJECT="C:\RedHat\MyCode\WSTest">
+ <option name="myItemId" value="" />
+ <option name="myItemType" value="" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT USER_OBJECT="src/com/machulak/jboss/test/wstest/services">
+ <option name="myItemId" value="" />
+ <option name="myItemType" value="" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT USER_OBJECT="Root">
+ <option name="myItemId" value="" />
+ <option name="myItemType" value="" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT USER_OBJECT="WSTest">
+ <option name="myItemId" value="" />
+ <option name="myItemType" value="" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT USER_OBJECT="C:\RedHat\MyCode\WSTest">
+ <option name="myItemId" value="" />
+ <option name="myItemType" value="" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT USER_OBJECT="resources">
+ <option name="myItemId" value="" />
+ <option name="myItemType" value="" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT USER_OBJECT="Root">
+ <option name="myItemId" value="" />
+ <option name="myItemType" value="" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT USER_OBJECT="WSTest">
+ <option name="myItemId" value="" />
+ <option name="myItemType" value="" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT USER_OBJECT="C:\RedHat\MyCode\WSTest">
+ <option name="myItemId" value="" />
+ <option name="myItemType" value="" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT USER_OBJECT="build/webapps">
+ <option name="myItemId" value="" />
+ <option name="myItemType" value="" />
+ </PATH_ELEMENT>
+ </PATH>
+ </subPane>
+ </component>
+ <component name="SelectInManager" />
+ <component name="StarteamConfiguration">
+ <option name="SERVER" value="" />
+ <option name="PORT" value="49201" />
+ <option name="USER" value="" />
+ <option name="PASSWORD" value="" />
+ <option name="PROJECT" value="" />
+ <option name="VIEW" value="" />
+ <option name="ALTERNATIVE_WORKING_PATH" value="" />
+ <option name="LOCK_ON_CHECKOUT" value="false" />
+ <option name="UNLOCK_ON_CHECKIN" value="false" />
+ </component>
+ <component name="StructuralSearchPlugin" />
+ <component name="StructureViewFactory">
+ <option name="AUTOSCROLL_MODE" value="true" />
+ <option name="AUTOSCROLL_FROM_SOURCE" value="false" />
+ <option name="ACTIVE_ACTIONS" value="" />
+ </component>
+ <component name="Struts Assistant">
+ <option name="showInputs" value="true" />
+ <option name="resources">
+ <value>
+ <option name="strutsPath" />
+ <option name="strutsHelp" />
+ </value>
+ </option>
+ <option name="selectedTaglibs" />
+ <option name="selectedTaglibs" />
+ <option name="myStrutsValidationEnabled" value="true" />
+ <option name="myTilesValidationEnabled" value="true" />
+ <option name="myValidatorValidationEnabled" value="true" />
+ <option name="myReportErrorsAsWarnings" value="true" />
+ </component>
+ <component name="SvnChangesBrowserSettings">
+ <option name="USE_AUTHOR_FIELD" value="true" />
+ <option name="AUTHOR" value="" />
+ <option name="LOCATION" value="" />
+ <option name="USE_PROJECT_SETTINGS" value="true" />
+ <option name="USE_ALTERNATE_LOCATION" value="false" />
+ </component>
+ <component name="SvnConfiguration">
+ <option name="USER" value="" />
+ <option name="PASSWORD" value="" />
+ <option name="PROCESS_UNRESOLVED" value="false" />
+ <option name="LAST_MERGED_REVISION" />
+ <option name="UPDATE_RUN_STATUS" value="false" />
+ <option name="UPDATE_RECURSIVELY" value="true" />
+ <option name="MERGE_DRY_RUN" value="false" />
+ <configuration useDefault="false">C:\Documents and Settings\a5913504\Application Data\Subversion</configuration>
+ <checkoutURL>https://svn.jboss.org/repos/labs/labs/jbosstm/workspace/maciej.machulak/</checkoutURL>
+ <checkoutURL>https://svn.jboss.org/repos/jbossas/branches/Branch_4_2/</checkoutURL>
+ <checkoutURL>svn+ssh://svn.cs.ncl.ac.uk/addon/subversion/users/a5913504</checkoutURL>
+ </component>
+ <component name="TodoView" selected-index="0">
+ <todo-panel id="selected-file">
+ <are-packages-shown value="false" />
+ <are-modules-shown value="false" />
+ <flatten-packages value="false" />
+ <is-autoscroll-to-source value="true" />
+ </todo-panel>
+ <todo-panel id="all">
+ <are-packages-shown value="true" />
+ <are-modules-shown value="false" />
+ <flatten-packages value="false" />
+ <is-autoscroll-to-source value="true" />
+ </todo-panel>
+ </component>
+ <component name="ToolWindowManager">
+ <frame x="-4" y="-4" width="1288" height="979" extended-state="7" />
+ <editor active="true" />
+ <layout>
+ <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
+ <window_info id="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
+ <window_info id="IDEtalk" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
+ <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="7" />
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.30170316" order="0" />
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32941177" order="1" />
+ <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24979724" order="1" />
+ <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.05944056" order="8" />
+ <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="6" />
+ <window_info id="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
+ <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
+ <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
+ <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.22222222" order="1" />
+ <window_info id="WebServices" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
+ <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="2" />
+ <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="2" />
+ <window_info id="File View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="4" />
+ <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="0" />
+ <window_info id="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
+ <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
+ <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="0" />
+ <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="2" />
+ <window_info id="EJB" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="3" />
+ <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="5" />
+ </layout>
+ </component>
+ <component name="VCS.FileViewConfiguration">
+ <option name="SELECTED_STATUSES" value="DEFAULT" />
+ <option name="SELECTED_COLUMNS" value="DEFAULT" />
+ <option name="SHOW_FILTERS" value="true" />
+ <option name="CUSTOMIZE_VIEW" value="true" />
+ <option name="SHOW_FILE_HISTORY_AS_TREE" value="true" />
+ </component>
+ <component name="VcsManagerConfiguration">
+ <option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
+ <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" />
+ <option name="PERFORM_UPDATE_IN_BACKGROUND" value="false" />
+ <option name="PERFORM_COMMIT_IN_BACKGROUND" value="false" />
+ <option name="PUT_FOCUS_INTO_COMMENT" value="false" />
+ <option name="FORCE_NON_EMPTY_COMMENT" value="false" />
+ <option name="LAST_COMMIT_MESSAGE" />
+ <option name="SAVE_LAST_COMMIT_MESSAGE" value="true" />
+ <option name="CHECKIN_DIALOG_SPLITTER_PROPORTION" value="0.8" />
+ <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
+ <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
+ <option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
+ <option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
+ <option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
+ <option name="ERROR_OCCURED" value="false" />
+ <option name="ACTIVE_VCS_NAME" value="svn" />
+ <option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
+ <option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
+ <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
+ </component>
+ <component name="VssConfiguration">
+ <option name="CLIENT_PATH" value="" />
+ <option name="SRCSAFEINI_PATH" value="" />
+ <option name="USER_NAME" value="" />
+ <option name="PWD" value="" />
+ <option name="VSS_IS_INITIALIZED" value="true" />
+ <CheckoutOptions>
+ <option name="COMMENT" value="" />
+ <option name="DO_NOT_GET_LATEST_VERSION" value="false" />
+ <option name="REPLACE_WRITABLE" value="false" />
+ <option name="RECURSIVE" value="false" />
+ </CheckoutOptions>
+ <CheckinOptions>
+ <option name="COMMENT" value="" />
+ <option name="KEEP_CHECKED_OUT" value="false" />
+ <option name="RECURSIVE" value="false" />
+ </CheckinOptions>
+ <AddOptions>
+ <option name="STORE_ONLY_LATEST_VERSION" value="false" />
+ <option name="CHECK_OUT_IMMEDIATELY" value="false" />
+ <option name="FILE_TYPE" value="0" />
+ </AddOptions>
+ <UndocheckoutOptions>
+ <option name="MAKE_WRITABLE" value="false" />
+ <option name="REPLACE_LOCAL_COPY" value="0" />
+ <option name="RECURSIVE" value="false" />
+ </UndocheckoutOptions>
+ <GetOptions>
+ <option name="REPLACE_WRITABLE" value="0" />
+ <option name="MAKE_WRITABLE" value="false" />
+ <option name="ANSWER_NEGATIVELY" value="false" />
+ <option name="ANSWER_POSITIVELY" value="false" />
+ <option name="RECURSIVE" value="false" />
+ <option name="VERSION" />
+ </GetOptions>
+ <VssConfigurableExcludedFilesTag />
+ </component>
+ <component name="antWorkspaceConfiguration">
+ <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
+ <option name="FILTER_TARGETS" value="false" />
+ <buildFile url="file://$PROJECT_DIR$/build.xml">
+ <antCommandLine value="" />
+ <runInBackground value="false" />
+ <targetFilters>
+ <filter targetName="clean" isVisible="false" />
+ <filter targetName="client" isVisible="false" />
+ <filter targetName="clients" isVisible="false" />
+ <filter targetName="compile" isVisible="false" />
+ <filter targetName="delete-JBoss-working-dirs" isVisible="false" />
+ <filter targetName="deploy" isVisible="false" />
+ <filter targetName="deploy-and-init" isVisible="false" />
+ <filter targetName="docs" isVisible="false" />
+ <filter targetName="ear" isVisible="false" />
+ <filter targetName="init" isVisible="false" />
+ <filter targetName="init.db" isVisible="false" />
+ <filter targetName="services" isVisible="false" />
+ <filter targetName="undeploy" isVisible="false" />
+ </targetFilters>
+ <treeView value="true" />
+ <verbose value="true" />
+ <viewClosedWhenNoErrors value="false" />
+ </buildFile>
+ </component>
+ <component name="com.intellij.ide.util.scopeChooser.ScopeChooserConfigurable" proportions="" version="1">
+ <option name="myLastEditedConfigurable" />
+ </component>
+ <component name="com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectRootMasterDetailsConfigurable" proportions="0.16666667" version="1">
+ <option name="myPlainMode" value="false" />
+ <option name="myLastEditedConfigurable" value="tools" />
+ </component>
+ <component name="com.intellij.profile.ui.ErrorOptionsConfigurable" proportions="" version="1">
+ <option name="myLastEditedConfigurable" />
+ </component>
+ <component name="editorHistoryManager">
+ <entry file="file://$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/services/hotel/HotelException.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="17" column="4" selection-start="309" selection-end="309" vertical-scroll-proportion="0.39427012">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/services/hotel/HotelEntityImpl.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="26" column="4" selection-start="539" selection-end="539" vertical-scroll-proportion="0.48703957">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/services/hotel/jaxws-handlers.xml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantAT.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="9" column="0" selection-start="169" selection-end="169" vertical-scroll-proportion="0.20873123">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/services/bistro/Bistro.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="12" column="17" selection-start="277" selection-end="277" vertical-scroll-proportion="0.27830833">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/annotations/HandlerInfo.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="22" column="4" selection-start="408" selection-end="408" vertical-scroll-proportion="0.5102319">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/annotations/HandlerWriter.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="14" column="35" selection-start="423" selection-end="423" vertical-scroll-proportion="0.33147633">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/annotations/MethodInfo.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="24" column="4" selection-start="356" selection-end="356" vertical-scroll-proportion="0.55661666">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/annotations/WebServiceAP.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="127" column="49" selection-start="6022" selection-end="6022" vertical-scroll-proportion="2.7228413">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/annotations/WebServiceAPF.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="29" column="4" selection-start="906" selection-end="906" vertical-scroll-proportion="0.5682451">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/annotations/WSTransactionAttribute.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="18" column="1" selection-start="426" selection-end="426" vertical-scroll-proportion="0.30779943">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/annotations/WSTransactionAttributeType.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="7" column="1" selection-start="150" selection-end="150" vertical-scroll-proportion="0.16234653">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/annotations/XMLWriter.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="29" column="8" selection-start="529" selection-end="529" vertical-scroll-proportion="0.26044568">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/src/com/machulak/jboss/test/wstest/clients/WeekendClient.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="34" column="13" selection-start="1157" selection-end="1157" vertical-scroll-proportion="-4.2562675">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/build.xml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="11" column="43" selection-start="528" selection-end="528" vertical-scroll-proportion="0.23816156">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </component>
+</project>
+
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/build.xml
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/build.xml (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/build.xml 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,215 @@
+<?xml version="1.0"?>
+<project name="wstest" default="deploy" basedir=".">
+ <!-- MODIFY THE NEXT THREE LINES -->
+ <property name="jboss.home" value="C:\RedHat\JBossAS\build\output\jboss-4.2.0.GA"/>
+ <property name="jndi.host" value="localhost"/>
+ <property name="jndi.port" value="11099"/>
+ <property name="sleep.time" value="5"/>
+
+ <property name="jboss.profile" value="all"/>
+ <property name="build.dir" value="build"/>
+ <property name="src.dir" value="src"/>
+ <property name="doc.dir" value="doc"/>
+ <property name="dd.dir" value="dd"/>
+ <property name="lib.dir" value="lib"/>
+ <property name="resources.dir" value="resources"/>
+ <property name="javaee.dir" value="C:/Program Files/JetBrains/IntelliJ IDEA 6.0/lib/"/>
+
+ <target name="clean">
+ <delete dir="${build.dir}"/>
+ </target>
+
+ <target name="init" depends="clean">
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${build.dir}/classes"/>
+ <mkdir dir="${build.dir}/webapps"/>
+ <mkdir dir="${build.dir}/lib"/>
+ </target>
+
+ <target name="delete-JBoss-working-dirs">
+ <delete dir="${jboss.home}/server/${jboss.profile}/data"/>
+ <delete dir="${jboss.home}/server/${jboss.profile}/log"/>
+ <delete dir="${jboss.home}/server/${jboss.profile}/tmp"/>
+ <delete dir="${jboss.home}/server/${jboss.profile}/work"/>
+ </target>
+
+ <path id="classpath">
+ <fileset dir="${javaee.dir}">
+ <include name="javaee.jar"/>
+ </fileset>
+ <fileset dir="${jboss.home}/server/${jboss.profile}/lib" includes="*.jar"/>
+ <fileset dir="${jboss.home}/client" includes="*.jar"/>
+ <fileset dir="lib" includes="*.jar"/>
+ <fileset dir="${jboss.home}/server/${jboss.profile}/deploy/jbossws.sar" includes="*.jar"/>
+
+ <pathelement location="${build.dir}/classes"/>
+ </path>
+
+ <path id="build.classpath">
+ <pathelement location="${build.dir}/classes"/>
+ </path>
+
+ <path id="factory.path">
+ <pathelement location="${lib.dir}"/>
+ </path>
+
+ <target name="compile" depends="init">
+ <mkdir dir="${build.dir}"/>
+ <javac destdir="${build.dir}/classes" classpathref="classpath">
+ <src path="${src.dir}"/>
+ </javac>
+ </target>
+
+ <target name="docs" depends="compile">
+ <javadoc destdir="${doc.dir}/api" packagenames="services.*" private="true">
+ <sourcepath>
+ <pathelement location="${src.dir}"/>
+ </sourcepath>
+ <classpath>
+ <path refid="classpath"/>
+ </classpath>
+ </javadoc>
+ </target>
+
+ <target name="services" depends="compile">
+ <copy file="${resources.dir}/jaxws-handlers-server.xml" todir="${build.dir}/classes/com/machulak/jboss/test/wstest/services/"/>
+ <copy file="${resources.dir}/jaxws-full-handlers-server.xml" todir="${build.dir}/classes/com/machulak/jboss/test/wstest/services/"/>
+ <copy file="${resources.dir}/jaxws-hotel-handlers-server.xml" todir="${build.dir}/classes/com/machulak/jboss/test/wstest/services/"/>
+ <jar destfile="${build.dir}/webapps/wstest-service-restaurant.jar">
+ <metainf dir="${resources.dir}">
+ <include name="persistence.xml"/>
+ </metainf>
+ <fileset dir="${build.dir}/classes">
+ <include name="**/*.class"/>
+ <include name="**/jaxws-handlers-server.xml"/>
+ <exclude name="com/machulak/jboss/test/wstest/services/hotel/**/*"/>
+ <exclude name="com/machulak/jboss/test/wstest/services/bistro/**/*"/>
+ <exclude name="com/machulak/jboss/test/wstest/services/flight/**/*"/>
+ <exclude name="com/machulak/jboss/test/wstest/clients/**/*"/>
+ </fileset>
+ </jar>
+ <jar destfile="${build.dir}/webapps/wstest-service-flight.jar">
+ <metainf dir="${resources.dir}">
+ <include name="persistence.xml"/>
+ </metainf>
+ <fileset dir="${build.dir}/classes">
+ <include name="**/*.class"/>
+ <include name="**/jaxws-handlers-server.xml"/>
+ <exclude name="com/machulak/jboss/test/wstest/services/hotel/**/*"/>
+ <exclude name="com/machulak/jboss/test/wstest/services/bistro/**/*"/>
+ <exclude name="com/machulak/jboss/test/wstest/services/restaurant/**/*"/>
+ <exclude name="com/machulak/jboss/test/wstest/clients/**/*"/>
+ </fileset>
+ </jar>
+ <jar destfile="${build.dir}/webapps/wstest-service-bistro.jar">
+ <metainf dir="${resources.dir}">
+ <include name="persistence.xml"/>
+ </metainf>
+ <manifest>
+ <attribute name="Class-Path" value="txbridge.jar"/>
+ </manifest>
+ <fileset dir="${build.dir}/classes">
+ <include name="**/*.class"/>
+ <include name="**/jaxws-full-handlers-server.xml"/>
+ <exclude name="com/machulak/jboss/test/wstest/services/hotel/**/*"/>
+ <exclude name="com/machulak/jboss/test/wstest/services/flight/**/*"/>
+ <exclude name="com/machulak/jboss/test/wstest/services/restaurant/**/*"/>
+ <exclude name="com/machulak/jboss/test/wstest/clients/**/*"/>
+ </fileset>
+ </jar>
+ <jar destfile="${build.dir}/webapps/wstest-service-hotel.jar">
+ <metainf dir="${resources.dir}">
+ <include name="persistence.xml"/>
+ </metainf>
+ <manifest>
+ <attribute name="Class-Path" value="txbridge.jar"/>
+ </manifest>
+ <fileset dir="${build.dir}/classes">
+ <include name="**/*.class"/>
+ <include name="**/jaxws-hotel-handlers-server.xml"/>
+ <exclude name="com/machulak/jboss/test/wstest/services/bistro/**/*"/>
+ <exclude name="com/machulak/jboss/test/wstest/services/flight/**/*"/>
+ <exclude name="com/machulak/jboss/test/wstest/services/restaurant/**/*"/>
+ <exclude name="com/machulak/jboss/test/wstest/clients/**/*"/>
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="clients" depends="compile">
+ <copy file="${resources.dir}/jaxws-handlers-client.xml" todir="${build.dir}/classes/com/machulak/jboss/test/wstest/clients/"/>
+
+ <war destfile="${build.dir}/webapps/wstest.war">
+ <webinf dir="${resources.dir}">
+ <include name="web.xml"/>
+ </webinf>
+ <fileset dir="${build.dir}/classes">
+ <include name="**/*.class"/>
+ <include name="**/jaxws-handlers-client.xml"/>
+ <exclude name="com/machulak/jboss/test/wstest/services/**/*"/>
+ </fileset>
+ <fileset dir="${resources.dir}">
+ <include name="index.jsp"/>
+ <include name="style.css"/>
+ </fileset>
+ </war>
+ </target>
+
+ <target name="ear" depends="services,clients">
+ <ear earfile="${build.dir}/wstest.ear" appxml="${resources.dir}/application.xml">
+ <fileset dir="${build.dir}/webapps" includes="*.jar *.war"/>
+ <fileset dir="lib" includes="*.jar *.war"/>
+ </ear>
+ </target>
+
+ <target name="deploy" depends="ear">
+ <copy file="${build.dir}/wstest.ear" todir="${jboss.home}/server/${jboss.profile}/deploy"/>
+ </target>
+
+ <target name="init.db" depends="deploy">
+ <java classname="setup.InitClient" classpathref="classpath" fork="yes" dir="${build.dir}/classes">
+ <arg value="${jndi.host}"/>
+ <arg value="${jndi.port}"/>
+ </java>
+ </target>
+
+ <target name="deploy-and-init" depends="deploy">
+ <sleep seconds="${sleep.time}" description="give JBoss time to deploy the app"/>
+ <java classname="setup.InitClient" classpathref="classpath" fork="yes" dir="${build.dir}/classes">
+ <arg value="${jndi.host}"/>
+ <arg value="${jndi.port}"/>
+ </java>
+ </target>
+
+
+ <target name="client" depends="deploy-and-init">
+ <java classname="client.HouseShoppingClient" classpathref="classpath" dir="${build.dir}/classes">
+ <arg value="${jndi.host}"/>
+ <arg value="${jndi.port}"/>
+ </java>
+ </target>
+
+ <target name="undeploy">
+ <delete file="${jboss.home}/server/${jboss.profile}/deploy/wstest.jar"/>
+ </target>
+
+ <target name="annotations">
+ <javac destdir="${lib.dir}" classpathref="classpath">
+ <src path="${src.dir}/com/machulak/jboss/test/wstest/annotations/"/>
+ </javac>
+ </target>
+
+ <target name="runapt" depends="init">
+ <apt verbose="true"
+ debug="on"
+ includeantruntime="yes"
+ includejavaruntime="yes"
+ srcdir="${src.dir}"
+ destdir="${build.dir}"
+ classpathref="classpath"
+ factory="com.machulak.jboss.test.wstest.annotations.WebServiceAPF"
+ factorypathref="factory.path"
+ preprocessdir="${src.dir}">
+ </apt>
+ </target>
+
+</project>
\ No newline at end of file
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/wstest/annotations/HandlerInfo.class
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/wstest/annotations/HandlerInfo.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/wstest/annotations/HandlerWriter.class
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/wstest/annotations/HandlerWriter.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/wstest/annotations/MethodInfo.class
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/wstest/annotations/MethodInfo.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/wstest/annotations/WSTransactionAttribute.class
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/wstest/annotations/WSTransactionAttribute.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/wstest/annotations/WSTransactionAttributeType.class
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/wstest/annotations/WSTransactionAttributeType.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/wstest/annotations/WebServiceAP.class
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/wstest/annotations/WebServiceAP.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/wstest/annotations/WebServiceAPF.class
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/wstest/annotations/WebServiceAPF.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/wstest/annotations/XMLWriter.class
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/com/machulak/jboss/test/wstest/annotations/XMLWriter.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/commons-logging.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/commons-logging.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/config.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/config.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/flight.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/flight.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/javaee.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/javaee.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/jbossjts.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/jbossjts.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/jbossts-common.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/jbossts-common.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/saaj-api.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/saaj-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/stax-api-1.0.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/stax-api-1.0.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/tools.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/tools.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/txbridge.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/txbridge.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/ws-c.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/ws-c.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/ws-c.war
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/ws-c.war
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/ws-t.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/ws-t.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/ws-t.war
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/ws-t.war
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/wsas.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/wsas.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/wscf.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/wscf.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/wscf.war
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/wscf.war
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/wstx-asl-2.0.3.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/wstx-asl-2.0.3.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/wstx.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/wstx.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/wstx.war
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/maciej.machulak/code/WSTest/lib/wstx.war
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/application.xml
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/application.xml (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/application.xml 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,79 @@
+<!--
+ 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 in the distribution for a full listing
+ of individual contributors.
+ This copyrighted material is made available to anyone wishing to use,
+ modify, copy, or redistribute it subject to the terms and conditions
+ of the GNU General Public License, v. 2.0.
+ This program is distributed in the hope that it will be useful, but WITHOUT A
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ You should have received a copy of the GNU General Public License,
+ v. 2.0 along with this distribution; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ MA 02110-1301, USA.
+
+ (C) 2005-2006,
+ @author JBoss Inc.
+-->
+
+ <!-- $Id: axis-application.xml,v 1.8.4.1 2005/11/22 10:42:05 kconner Exp $ -->
+
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+
+<application>
+ <display-name>XML Transaction Service Demo</display-name>
+
+ <description>XML Transaction Service Demo</description>
+
+ <module>
+ <web>
+ <web-uri>ws-c.war</web-uri>
+ <context-root>/xts</context-root>
+ </web>
+ </module>
+ <module>
+ <web>
+ <web-uri>ws-t.war</web-uri>
+ <context-root>/ws-t</context-root>
+ </web>
+ </module>
+ <module>
+ <web>
+ <web-uri>wscf.war</web-uri>
+ <context-root>/wscf</context-root>
+ </web>
+ </module>
+ <module>
+ <web>
+ <web-uri>wstx.war</web-uri>
+ <context-root>/wstx</context-root>
+ </web>
+ </module>
+
+ <module>
+ <ejb>wstest-service-bistro.jar</ejb>
+ </module>
+
+ <module>
+ <ejb>wstest-service-restaurant.jar</ejb>
+ </module>
+
+ <module>
+ <ejb>wstest-service-flight.jar</ejb>
+ </module>
+
+ <module>
+ <ejb>wstest-service-hotel.jar</ejb>
+ </module>
+
+ <module>
+ <web>
+ <web-uri>wstest.war</web-uri>
+ <context-root>/wstest</context-root>
+ </web>
+ </module>
+
+</application>
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/application.xml.bak
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/application.xml.bak (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/application.xml.bak 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,45 @@
+<!--
+ 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 in the distribution for a full listing
+ of individual contributors.
+ This copyrighted material is made available to anyone wishing to use,
+ modify, copy, or redistribute it subject to the terms and conditions
+ of the GNU General Public License, v. 2.0.
+ This program is distributed in the hope that it will be useful, but WITHOUT A
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ You should have received a copy of the GNU General Public License,
+ v. 2.0 along with this distribution; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ MA 02110-1301, USA.
+
+ (C) 2005-2006,
+ @author JBoss Inc.
+-->
+
+<!-- $Id: axis-application.xml,v 1.8.4.1 2005/11/22 10:42:05 kconner Exp $ -->
+
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+
+<application>
+ <display-name>XML Transaction Service Demo</display-name>
+
+ <description>XML Transaction Service Demo</description>
+
+ <module>
+ <web>
+ <web-uri>wstest-services.war</web-uri>
+ <context-root>/wstestservices</context-root>
+ </web>
+ </module>
+
+ <module>
+ <web>
+ <web-uri>wstest.war</web-uri>
+ <context-root>/wstest</context-root>
+ </web>
+ </module>
+
+</application>
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/index.jsp
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/index.jsp (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/index.jsp 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,74 @@
+<%@page contentType="text/html"%>
+<%@page pageEncoding="UTF-8"%>
+<%--
+The taglib directive below imports the JSTL library. If you uncomment it,
+you must also add the JSTL library to the project. The Add Library... action
+on Libraries node in Projects view can be used to add the JSTL 1.1 library.
+--%>
+<%--
+<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+--%>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <link rel="stylesheet" href="style.css" type="text/css">
+ <title>Weeekend Out</title>
+ </head>
+ <body>
+
+ <h1>Travel Agent Portal</h1>
+ <h3>Date: <%= new java.util.Date() %></h3>
+
+ <hr>
+ <h3>Restaurant</h3>
+ <form action="WeekendClient" method="post">
+ <table>
+ <tr>
+ <td colspan="2">Flight</td>
+ </tr>
+ <tr>
+ <td class="menu">Number of seats</td>
+ <td>
+ <select name="noOfSeats">
+ <option value="1">1</option>
+ <option value="2">2</option>
+ <option value="3">3</option>
+ <option value="4">4</option>
+ <option value="5">5</option>
+ <option value="6">6</option>
+ <option value="7">7</option>
+ <option value="8">8</option>
+ <option value="9">9</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td colspan=2>Restaurant</td>
+ </tr>
+ <tr>
+ <td class="menu">Number of tables</td>
+ <td>
+ <select name="noOfTables">
+ <option value="1">1</option>
+ <option value="2">2</option>
+ <option value="3">3</option>
+ <option value="4">4</option>
+ <option value="5">5</option>
+ <option value="6">6</option>
+ <option value="7">7</option>
+ <option value="8">8</option>
+ <option value="9">9</option>
+ </select>
+ </td>
+ </tr>
+ </table>
+ <input type="hidden" name="transactionType" value="at">
+ <input type="submit" value="Book">
+ </form>
+ ${requestScope.response}
+ </body>
+</html>
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/jaxws-full-handlers-server.xml
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/jaxws-full-handlers-server.xml (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/jaxws-full-handlers-server.xml 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd">
+
+ <handler-chain>
+ <protocol-bindings>##SOAP11_HTTP</protocol-bindings>
+
+ <!-- JSR 181 does not seem to define ordering of handlers in a chain, which may be a problem
+ Nor does it say anything about instances/threading/lifecycle
+ perhaps go from jar 101 (jax-rpc) instead?
+ 12.1.4 says default is to invoke in order of registration
+ 12.4 seems to imply you can't assume same instance will process request+reply
+ use set/setProperty on MessageContext for state
+ -->
+
+ <handler>
+ <handler-name>TransactionBridgeHandler</handler-name>
+ <handler-class>org.jboss.txbridge.JaxWSTransactionBridgeHandler</handler-class>
+ </handler>
+
+ <handler>
+ <handler-name>WebServicesTxContextHandler</handler-name>
+ <handler-class>com.machulak.jboss.test.wstest.services.JaxWSServerHeaderContextProcessor</handler-class>
+ </handler>
+
+
+
+ </handler-chain>
+</handler-chains>
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/jaxws-handlers-client.xml
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/jaxws-handlers-client.xml (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/jaxws-handlers-client.xml 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd">
+
+ <handler-chain>
+ <protocol-bindings>##SOAP11_HTTP</protocol-bindings>
+
+ <handler>
+ <handler-name>JaxWSHandler</handler-name>
+ <handler-class>com.machulak.jboss.test.wstest.clients.JaxWSClientHeaderContextProcessor</handler-class>
+ </handler>
+
+ </handler-chain>
+</handler-chains>
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/jaxws-handlers-server.xml
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/jaxws-handlers-server.xml (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/jaxws-handlers-server.xml 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd">
+
+ <handler-chain>
+ <protocol-bindings>##SOAP11_HTTP</protocol-bindings>
+
+ <!-- JSR 181 does not seem to define ordering of handlers in a chain, which may be a problem
+ Nor does it say anything about instances/threading/lifecycle
+ perhaps go from jar 101 (jax-rpc) instead?
+ 12.1.4 says default is to invoke in order of registration
+ 12.4 seems to imply you can't assume same instance will process request+reply
+ use set/setProperty on MessageContext for state
+ -->
+
+ <handler>
+ <handler-name>WebServicesTxContextHandler</handler-name>
+ <handler-class>com.machulak.jboss.test.wstest.services.JaxWSServerHeaderContextProcessor</handler-class>
+ </handler>
+
+ </handler-chain>
+</handler-chains>
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/jaxws-handlers-server.xml.bak
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/jaxws-handlers-server.xml.bak (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/jaxws-handlers-server.xml.bak 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd">
+
+ <handler-chain>
+ <protocol-bindings>##SOAP11_HTTP</protocol-bindings>
+
+ <!-- JSR 181 does not seem to define ordering of handlers in a chain, which may be a problem
+ Nor does it say anything about instances/threading/lifecycle
+ perhaps go from jar 101 (jax-rpc) instead?
+ 12.1.4 says default is to invoke in order of registration
+ 12.4 seems to imply you can't assume same instance will process request+reply
+ use set/setProperty on MessageContext for state
+ -->
+
+ <handler>
+ <handler-name>TransactionBridgeHandler</handler-name>
+ <handler-class>org.jboss.txbridge.JaxWSTransactionBridgeHandler</handler-class>
+ </handler>
+
+ <handler>
+ <handler-name>WebServicesTxContextHandler</handler-name>
+ <handler-class>com.arjuna.xts.nightout.services.Bistro.JaxWSServerHeaderContextProcessor</handler-class>
+ </handler>
+
+ </handler-chain>
+</handler-chains>
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/jaxws-hotel-handlers-server.xml
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/jaxws-hotel-handlers-server.xml (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/jaxws-hotel-handlers-server.xml 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd">
+
+ <handler-chain>
+ <protocol-bindings>##SOAP11_HTTP</protocol-bindings>
+
+ <!-- JSR 181 does not seem to define ordering of handlers in a chain, which may be a problem
+ Nor does it say anything about instances/threading/lifecycle
+ perhaps go from jar 101 (jax-rpc) instead?
+ 12.1.4 says default is to invoke in order of registration
+ 12.4 seems to imply you can't assume same instance will process request+reply
+ use set/setProperty on MessageContext for state
+ -->
+
+ <handler>
+ <handler-name>TransactionBridgeHandler</handler-name>
+ <handler-class>com.machulak.jboss.test.wstest.services.hotel.JaxWSTransactionBridgeHandler</handler-class>
+ </handler>
+
+ <handler>
+ <handler-name>WebServicesTxContextHandler</handler-name>
+ <handler-class>com.machulak.jboss.test.wstest.services.JaxWSServerHeaderContextProcessor</handler-class>
+ </handler>
+
+
+
+ </handler-chain>
+</handler-chains>
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/jaxws-hotel-handlers-server.xml.bak
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/jaxws-hotel-handlers-server.xml.bak (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/jaxws-hotel-handlers-server.xml.bak 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd">
+
+ <handler-chain>
+ <protocol-bindings>##SOAP11_HTTP</protocol-bindings>
+
+ <!-- JSR 181 does not seem to define ordering of handlers in a chain, which may be a problem
+ Nor does it say anything about instances/threading/lifecycle
+ perhaps go from jar 101 (jax-rpc) instead?
+ 12.1.4 says default is to invoke in order of registration
+ 12.4 seems to imply you can't assume same instance will process request+reply
+ use set/setProperty on MessageContext for state
+ -->
+
+ <handler>
+ <handler-name>TransactionBridgeHandler</handler-name>
+ <handler-class>org.jboss.txbridge.JaxWSTransactionBridgeHandler</handler-class>
+ </handler>
+
+ <handler>
+ <handler-name>WebServicesTxContextHandler</handler-name>
+ <handler-class>com.machulak.jboss.test.wstest.services.JaxWSServerHeaderContextProcessor</handler-class>
+ </handler>
+
+
+
+ </handler-chain>
+</handler-chains>
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/persistence.xml
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/persistence.xml (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/persistence.xml 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,8 @@
+<persistence>
+ <persistence-unit name="wstest">
+ <jta-data-source>java:/DefaultDS</jta-data-source>
+ <properties>
+ <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+ </properties>
+ </persistence-unit>
+</persistence>
\ No newline at end of file
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/style.css
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/style.css (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/style.css 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,105 @@
+A:link, A:visited {
+ text-decoration: none;
+ color: black;
+ font-family: Verdana;
+ font-size: 10pt;
+ text-decoration: underline;
+ }
+
+A:hover {
+ text-decoration: underline;
+ color: red;
+}
+P {
+ font-face: Verdana;
+ font-size: 10pt;
+ font-family: Verdana;
+}
+
+TD, TH, center {
+ font-face: Verdana;
+ font-size: 10pt;
+ font-family: Verdana;
+ border-bottom: 1px solid black;
+ border-right: 1px solid black;
+ vertical-align: middle;
+ width: 100px;
+}
+
+TD.check {
+ background-color: #C0C0C0;
+ text-align: center;
+ width: 30px;
+}
+
+TD.menu {
+ background-color: #C0C0C0;
+ font-weight: Bold;
+}
+
+
+BODY {
+ font-face: Tahoma;
+ font-size: 10pt;
+ font-family: Tahoma;
+ text-align: left;
+ background-color: #DCDCDC;
+ margin-top: 0px
+ }
+HR
+{
+ color: black;
+ noshade;
+}
+
+H1 {
+ font-face: Tahoma;
+ font-size: 20pt;
+ font-family: Tahoma;
+ font-weight: Bold;
+ }
+
+H2 {
+ font-face: Tahoma, Verdana;
+ font-size: 12pt;
+ font-family: Tahoma, Verdana, Arial;
+ font-weight: bold;
+ }
+
+H4 {
+ font-face: Tahoma, Verdana;
+ font-size: 12pt;
+ font-family: Tahoma, Verdana, Arial;
+ font-weight: bold;
+ color: green;
+ }
+
+H5 {
+ font-face: Tahoma, Verdana;
+ font-size: 12pt;
+ font-family: Tahoma, Verdana, Arial;
+ font-weight: bold;
+ color: red;
+ }
+
+
+H6 {
+ font-face: Verdana;
+ font-size: 10pt;
+ font-weight: bold;
+ font-family: Tahoma;
+ }
+
+input, textarea {
+ font-family: Tahoma, Verdana, Arial;
+ font-size: 10pt;
+ color: black;
+}
+
+input, textarea, select {
+ font-family: Tahoma, Verdana, Arial;
+ font-size: 10pt;
+ color: black;
+ border-width: '1pt';
+ border-color: black
+ }
\ No newline at end of file
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/web.xml
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/web.xml (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/resources/web.xml 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4"
+ xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >
+
+ <servlet>
+ <servlet-name>WeekendClient</servlet-name>
+ <servlet-class>com.machulak.jboss.test.wstest.clients.WeekendClient</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>WeekendClient</servlet-name>
+ <url-pattern>/WeekendClient</url-pattern>
+ </servlet-mapping>
+ <welcome-file-list>
+ <welcome-file>index.jsp</welcome-file>
+ </welcome-file-list>
+</web-app>
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/JaxWSTransactionBridgeHandler.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/JaxWSTransactionBridgeHandler.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/JaxWSTransactionBridgeHandler.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,168 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2007,
+ * @author JBoss Inc.
+ */
+package com.machulak.jboss.test.wstest.services.hotel;
+
+import javax.xml.ws.handler.Handler;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.soap.SOAPBodyElement;
+import javax.xml.soap.SOAPBody;
+import org.apache.log4j.Logger;
+import org.jboss.txbridge.InboundBridge;
+import org.jboss.txbridge.TxBridgeManager;
+import com.arjuna.mw.wst.TransactionManagerFactory;
+import com.arjuna.mw.wst.TxContext;
+import com.arjuna.ats.internal.jta.transaction.arjunacore.jca.XATerminatorImple;
+import com.arjuna.ats.arjuna.common.Uid;
+import com.arjuna.ats.jta.xa.XidImple;/**
+ * A handler that sits in the server side processing pipeline between the XTS header context processor
+ * and the web service. Takes the WS transaction context provided by the former and maps
+ * it to a JTA transaction context for use by the latter. Handles Thread association of
+ * the JTA context.
+ *
+ * Note: we assume that their is a web services transaction context present and
+ * that the service needs a JTA context. The handler should not be registered on
+ * methods unless both these conditions hold.
+ * TODO: make this more flexible (ws-at policy and/or lazy init of JTA context.)
+ *
+ * TODO: provide a JAX-RPC version of this handler too?
+ *
+ * @author jonathan.halliday at redhat.com, 2007-04-30
+ */
+public class JaxWSTransactionBridgeHandler implements Handler
+{
+ private static Logger log = Logger.getLogger(JaxWSTransactionBridgeHandler.class);
+
+ /**
+ * Process a message. Determins if it's inbound or outbound and dispatches accordingly.
+ *
+ * @param msgContext
+ * @return
+ */
+ public boolean handleMessage(MessageContext msgContext)
+ {
+ log.debug("handleMessage()");
+
+ Boolean outbound = (Boolean)msgContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+ if (outbound == null)
+ throw new IllegalStateException("Cannot obtain required property: " + MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+
+ return outbound ? handleOutbound(msgContext) : handleInbound(msgContext);
+ }
+
+ /**
+ * Tidy up the Transaction/Thread association before faults are thrown back to the client.
+ *
+ * @param messageContext
+ * @return
+ */
+ public boolean handleFault(MessageContext messageContext)
+ {
+ log.debug("handleFault()");
+
+ try
+ {
+ InboundBridge inboundBridge = TxBridgeManager.getInboundBridge();
+ inboundBridge.stop();
+ }
+ catch (Exception e)
+ {
+ log.error(e);
+ };
+ return true;
+ }
+
+ public void close(MessageContext messageContext)
+ {
+ log.debug("close()");
+ }
+
+ /**
+ * Process inbound messages by mapping the WS transaction context
+ * to a JTA one and associating the latter to the current Thread.
+ *
+ * @param msgContext
+ * @return
+ */
+protected boolean handleInbound(MessageContext msgContext)
+{
+ log.debug("handleInbound()");try {SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
+SOAPBody soapBody = soapMessage.getSOAPBody();
+SOAPBodyElement soapBodyElement = (SOAPBodyElement)soapBody.getChildElements().next();
+String methodName = soapBodyElement.getElementName().getLocalName();if ( methodName.equals("getBookingCount") ) {
+ try
+ {
+ InboundBridge inboundBridge = TxBridgeManager.getInboundBridge();
+ inboundBridge.start();
+ return true;}
+ catch (Exception e)
+ {
+ log.error(e);
+ return false;
+ }}if ( methodName.equals("getHotelInfo") ) {
+ try
+ {
+ InboundBridge inboundBridge = TxBridgeManager.getInboundBridge();
+ inboundBridge.start();
+ return true;}
+ catch (Exception e)
+ {
+ log.error(e);
+ return false;
+ }}if ( methodName.equals("getHotelAddress") ) { try
+ {
+ TransactionManagerFactory.transactionManager().enlistForDurableTwoPhase(new DummyParticipantAT(), new Uid().toString());
+ //InboundBridge inboundBridge = TxBridgeManager.getInboundBridge();
+ //inboundBridge.start();
+ }
+ catch (Exception e)
+ {
+ log.error(e);
+ return false;
+ }}} catch (Exception e) { e.printStackTrace(); } return true;}
+protected boolean handleOutbound(MessageContext msgContext)
+{
+ log.debug("handleOutbound()");try {SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
+SOAPBody soapBody = soapMessage.getSOAPBody();
+SOAPBodyElement soapBodyElement = (SOAPBodyElement)soapBody.getChildElements().next();
+String methodName = soapBodyElement.getElementName().getLocalName();if ( methodName.equals("getBookingCountResponse") ) {
+try
+ {
+ InboundBridge inboundBridge = TxBridgeManager.getInboundBridge();
+ inboundBridge.stop();
+ }
+ catch (Exception e)
+ {
+ log.error(e);
+ return false;
+ }}if ( methodName.equals("getHotelInfoResponse") ) {
+try
+ {
+ InboundBridge inboundBridge = TxBridgeManager.getInboundBridge();
+ inboundBridge.stop();
+ }
+ catch (Exception e)
+ {
+ log.error(e);
+ return false;
+ }}if ( methodName.equals("getHotelAddressResponse") ) {}} catch (Exception e) { e.printStackTrace(); } return true;
+}}
\ No newline at end of file
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/HandlerInfo.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/HandlerInfo.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/HandlerInfo.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,26 @@
+package com.machulak.jboss.test.wstest.annotations;
+
+/**
+ * Author: Maciej Machulak
+ */
+public class HandlerInfo
+{
+
+ private String handlerName, handlerClass;
+
+ public HandlerInfo(String name, String classname)
+ {
+ handlerName = name;
+ handlerClass = classname;
+ }
+
+ public String getHandlerName()
+ {
+ return handlerName;
+ }
+
+ public String getHandlerClass()
+ {
+ return handlerClass;
+ }
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/HandlerWriter.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/HandlerWriter.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/HandlerWriter.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,279 @@
+package com.machulak.jboss.test.wstest.annotations;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+
+/**
+ * Author: Maciej Machulak
+ */
+public class HandlerWriter
+{
+
+ public HandlerWriter() {
+ methodBodiesInbound.put(WSTransactionAttributeType.MANDATORY.toString(),mandatoryIn);
+ methodBodiesInbound.put(WSTransactionAttributeType.REQUIRED.toString(),requiredIn);
+ methodBodiesInbound.put(WSTransactionAttributeType.REQUIRES_NEW.toString(),requiresNewIn);
+ methodBodiesInbound.put(WSTransactionAttributeType.SUPPORTS.toString(),supportsIn);
+ methodBodiesInbound.put(WSTransactionAttributeType.NOT_SUPPORTED.toString(),notSupportedIn);
+ methodBodiesInbound.put(WSTransactionAttributeType.NEVER.toString(),neverIn);
+
+ methodBodiesOutbound.put(WSTransactionAttributeType.MANDATORY.toString(),mandatoryOut);
+ methodBodiesOutbound.put(WSTransactionAttributeType.REQUIRED.toString(),requiredOut);
+ methodBodiesOutbound.put(WSTransactionAttributeType.REQUIRES_NEW.toString(),requiresNewOut);
+ methodBodiesOutbound.put(WSTransactionAttributeType.SUPPORTS.toString(),supportsOut);
+ methodBodiesOutbound.put(WSTransactionAttributeType.NOT_SUPPORTED.toString(),notSupportedOut);
+ methodBodiesOutbound.put(WSTransactionAttributeType.NEVER.toString(),neverOut);
+ }
+
+ public String createHandler(String className,ArrayList<MethodInfo> methodList)
+ {
+ StringBuffer result = new StringBuffer();
+
+ if (!methodList.isEmpty())
+ {
+ result.append(beginning);
+
+ // Inbound
+ result.append(handleInboundB);
+ result.append(tryString);
+ result.append(getMethodName);
+ for (MethodInfo singleMethod : methodList)
+ {
+ result.append(compareMethodNameB);
+ result.append(singleMethod.getName());
+ result.append(compareMethodNameM);
+ result.append(methodBodiesInbound.get(singleMethod.getType()));
+ result.append(compareMethodNameE);
+ }
+ result.append(elseIn);
+ result.append(exceptionString);
+ result.append(handleInboundE);
+
+ // Outbound
+ result.append(handleOutboundB);
+ result.append(tryString);
+ result.append(getMethodName);
+ for (MethodInfo singleMethod: methodList)
+ {
+ result.append(compareMethodNameB);
+ result.append(singleMethod.getName());
+ result.append("Response");
+ result.append(compareMethodNameM);
+ result.append(methodBodiesOutbound.get(singleMethod.getType()));
+ result.append(compareMethodNameE);
+ }
+ result.append(elseOut);
+ result.append(exceptionString);
+ result.append(handleOutboundE);
+
+ result.append(end);
+
+
+
+ }
+
+ return result.toString();
+
+ }
+
+
+ private HashMap methodBodiesInbound = new HashMap();
+ private HashMap methodBodiesOutbound = new HashMap();
+
+ private static String beginning = "/*\n" +
+ " * JBoss, Home of Professional Open Source\n" +
+ " * Copyright 2007, Red Hat Middleware LLC, and individual contributors\n" +
+ " * as indicated by the @author tags.\n" +
+ " * See the copyright.txt in the distribution for a\n" +
+ " * full listing of individual contributors.\n" +
+ " * This copyrighted material is made available to anyone wishing to use,\n" +
+ " * modify, copy, or redistribute it subject to the terms and conditions\n" +
+ " * of the GNU Lesser General Public License, v. 2.1.\n" +
+ " * This program is distributed in the hope that it will be useful, but WITHOUT A\n" +
+ " * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A\n" +
+ " * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.\n" +
+ " * You should have received a copy of the GNU Lesser General Public License,\n" +
+ " * v.2.1 along with this distribution; if not, write to the Free Software\n" +
+ " * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n" +
+ " * MA 02110-1301, USA.\n" +
+ " *\n" +
+ " * (C) 2007,\n" +
+ " * @author JBoss Inc.\n" +
+ " */\n" +
+ "package com.machulak.jboss.test.wstest.services.hotel;\n" +
+ "\n" +
+ "import javax.xml.ws.handler.Handler;\n" +
+ "import javax.xml.ws.handler.MessageContext;\n" +
+ "import javax.xml.ws.handler.soap.SOAPMessageContext;\n" +
+ "import javax.xml.soap.SOAPMessage;\n" +
+ "import javax.xml.soap.SOAPBodyElement;\n" +
+ "import javax.xml.soap.SOAPBody;\n" +
+ "import org.apache.log4j.Logger;\n" +
+ "import org.jboss.txbridge.InboundBridge;\n" +
+ "import org.jboss.txbridge.TxBridgeManager;\n" +
+ "import com.arjuna.mw.wst.TransactionManagerFactory;\n" +
+ "import com.arjuna.mw.wst.TxContext;\n" +
+ "import com.arjuna.ats.internal.jta.transaction.arjunacore.jca.XATerminatorImple;\n" +
+ "import com.arjuna.ats.arjuna.common.Uid;\n" +
+ "import com.arjuna.ats.jta.xa.XidImple;" +
+ "/**\n" +
+ " * A handler that sits in the server side processing pipeline between the XTS header context processor\n" +
+ " * and the web service. Takes the WS transaction context provided by the former and maps\n" +
+ " * it to a JTA transaction context for use by the latter. Handles Thread association of\n" +
+ " * the JTA context.\n" +
+ " *\n" +
+ " * Note: we assume that their is a web services transaction context present and\n" +
+ " * that the service needs a JTA context. The handler should not be registered on\n" +
+ " * methods unless both these conditions hold.\n" +
+ " * TODO: make this more flexible (ws-at policy and/or lazy init of JTA context.)\n" +
+ " *\n" +
+ " * TODO: provide a JAX-RPC version of this handler too?\n" +
+ " *\n" +
+ " * @author jonathan.halliday at redhat.com, 2007-04-30\n" +
+ " */\n" +
+ "public class JaxWSTransactionBridgeHandler implements Handler\n" +
+ "{\n" +
+ "\tprivate static Logger log = Logger.getLogger(JaxWSTransactionBridgeHandler.class);\n" +
+ "\n" +
+ "\t/**\n" +
+ "\t * Process a message. Determins if it's inbound or outbound and dispatches accordingly.\n" +
+ "\t *\n" +
+ "\t * @param msgContext\n" +
+ "\t * @return\n" +
+ "\t */\n" +
+ "\tpublic boolean handleMessage(MessageContext msgContext)\n" +
+ "\t{\n" +
+ "\t\tlog.debug(\"handleMessage()\");\n" +
+ "\n" +
+ "\t\tBoolean outbound = (Boolean)msgContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);\n" +
+ "\t\tif (outbound == null)\n" +
+ "\t\t throw new IllegalStateException(\"Cannot obtain required property: \" + MessageContext.MESSAGE_OUTBOUND_PROPERTY);\n" +
+ "\n" +
+ "\t\treturn outbound ? handleOutbound(msgContext) : handleInbound(msgContext);\n" +
+ "\t}\n" +
+ "\n" +
+ "\t/**\n" +
+ "\t * Tidy up the Transaction/Thread association before faults are thrown back to the client.\n" +
+ "\t *\n" +
+ "\t * @param messageContext\n" +
+ "\t * @return\n" +
+ "\t */\n" +
+ "\tpublic boolean handleFault(MessageContext messageContext)\n" +
+ "\t{\n" +
+ "\t\tlog.debug(\"handleFault()\");\n" +
+ "\n" +
+ "\t\t try\n" +
+ " {\n" +
+ " InboundBridge inboundBridge = TxBridgeManager.getInboundBridge();\n" +
+ " inboundBridge.stop();\n" +
+ " }\n" +
+ " catch (Exception e)\n" +
+ " {\n" +
+ " log.error(e);\n" +
+ " };\n" +
+ "\t\treturn true;\n" +
+ "\t}\n" +
+ "\n" +
+ "\tpublic void close(MessageContext messageContext)\n" +
+ "\t{\n" +
+ "\t\tlog.debug(\"close()\");\n" +
+ "\t}\n" +
+ "\n" +
+ "\t/**\n" +
+ "\t * Process inbound messages by mapping the WS transaction context\n" +
+ "\t * to a JTA one and associating the latter to the current Thread.\n" +
+ "\t *\n" +
+ "\t * @param msgContext\n" +
+ "\t * @return\n" +
+ "\t */";
+
+ private static String handleInboundB = "\nprotected boolean handleInbound(MessageContext msgContext)\n" +
+ "{\n" +
+ "\tlog.debug(\"handleInbound()\");";
+ private static String handleInboundE = "\treturn true;}";
+ private static String handleOutboundB = "\n" +
+ "protected boolean handleOutbound(MessageContext msgContext) \n" +
+ "{\n" +
+ "\tlog.debug(\"handleOutbound()\");";
+ private static String handleOutboundE = "\treturn true;\n" +
+ "}";
+ private static String end = "}";
+
+ private static String tryString = "try {";
+ private static String getMethodName = "SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();\n" +
+ "SOAPBody soapBody = soapMessage.getSOAPBody();\n" +
+ "SOAPBodyElement soapBodyElement = (SOAPBodyElement)soapBody.getChildElements().next();\n" +
+ "String methodName = soapBodyElement.getElementName().getLocalName();";
+ private static String compareMethodNameB = "if ( methodName.equals(\"";
+ private static String compareMethodNameM = "\") ) {";
+ private static String compareMethodNameE = "}";
+
+ private static String exceptionString = "} catch (Exception e) { e.printStackTrace(); }";
+ private static String mandatoryIn = "\n" +
+ "\ttry\n" +
+ "\t{\n" +
+ "\t\tInboundBridge inboundBridge = TxBridgeManager.getInboundBridge();\n" +
+ "\t\tinboundBridge.start();\n" +
+ "\treturn true;}\n" +
+ "\tcatch (Exception e)\n" +
+ "\t{\n" +
+ "\t\tlog.error(e);\n" +
+ "\t\treturn false;\n" +
+ "\t}";
+ private static String requiredIn = mandatoryIn;
+ private static String requiresNewIn = mandatoryIn;
+ private static String supportsIn = mandatoryIn;
+ private static String notSupportedIn = " try\n" +
+ " {\n" +
+ " TransactionManagerFactory.transactionManager().enlistForDurableTwoPhase(new DummyParticipantAT(), new Uid().toString());\n" +
+ " //InboundBridge inboundBridge = TxBridgeManager.getInboundBridge();\n" +
+ " //inboundBridge.start();\n" +
+ " }\n" +
+ " catch (Exception e)\n" +
+ " {\n" +
+ " log.error(e);\n" +
+ " return false;\n" +
+ " }";
+ private static String neverIn = mandatoryIn;
+
+ private static String mandatoryOut = "\ntry\n" +
+ " {\n" +
+ " InboundBridge inboundBridge = TxBridgeManager.getInboundBridge();\n" +
+ " inboundBridge.stop();\n" +
+ " }\n" +
+ " catch (Exception e)\n" +
+ " {\n" +
+ " log.error(e);\n" +
+ " return false;\n" +
+ " }";
+ private static String requiredOut = mandatoryIn;
+ private static String requiresNewOut = mandatoryIn;
+ private static String supportsOut = mandatoryIn;
+ private static String notSupportedOut = "";
+ private static String neverOut = mandatoryIn;
+
+ /*
+ private static String elseIn = "\telse { try\n" +
+ "\t{\n" +
+ "\t\tInboundBridge inboundBridge = TxBridgeManager.getInboundBridge();\n" +
+ "\t\tinboundBridge.start();\n" +
+ "\treturn true;}\n" +
+ "\tcatch (Exception e)\n" +
+ "\t{\n" +
+ "\t\tlog.error(e);\n" +
+ "\t}}";
+ private static String elseOut = "\telse { try\n" +
+ "\t{\n" +
+ "\t\tInboundBridge inboundBridge = TxBridgeManager.getInboundBridge();\n" +
+ "\t\tinboundBridge.stop();\n" +
+ "\treturn true;}\n" +
+ "\tcatch (Exception e)\n" +
+ "\t{\n" +
+ "\t\tlog.error(e);\n" +
+ "\t}}";
+
+ */
+ private static String elseIn = "";
+ private static String elseOut = "";
+
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/MethodInfo.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/MethodInfo.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/MethodInfo.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,28 @@
+package com.machulak.jboss.test.wstest.annotations;
+
+/**
+ * Author: Maciej Machulak
+ */
+public class MethodInfo
+{
+
+ private String name, type;
+
+
+ public MethodInfo(String name, String type)
+ {
+ this.name = name;
+ this.type = type;
+ }
+
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public String getType()
+ {
+ return type;
+ }
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/WSTransactionAttribute.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/WSTransactionAttribute.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/WSTransactionAttribute.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,21 @@
+package com.machulak.jboss.test.wstest.annotations;
+
+import sun.reflect.annotation.AnnotationType;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * Author: Maciej Machulak
+ * Date: May 17, 2007
+ */
+
+
+ at Target(ElementType.METHOD)
+ at Retention(RetentionPolicy.SOURCE)
+public @interface WSTransactionAttribute
+{
+ WSTransactionAttributeType value() default WSTransactionAttributeType.MANDATORY;
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/WSTransactionAttributeType.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/WSTransactionAttributeType.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/WSTransactionAttributeType.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,15 @@
+package com.machulak.jboss.test.wstest.annotations;
+
+/**
+ * Author: Maciej Machulak
+ * Date: May 17, 2007
+ */
+public enum WSTransactionAttributeType
+{
+ MANDATORY,
+ REQUIRED,
+ REQUIRES_NEW,
+ SUPPORTS,
+ NOT_SUPPORTED,
+ NEVER
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/WebServiceAP.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/WebServiceAP.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/WebServiceAP.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,145 @@
+package com.machulak.jboss.test.wstest.annotations;
+
+import com.sun.mirror.apt.AnnotationProcessor;
+import com.sun.mirror.apt.AnnotationProcessorEnvironment;
+import com.sun.mirror.apt.Filer;
+import com.sun.mirror.declaration.AnnotationTypeDeclaration;
+import com.sun.mirror.declaration.ClassDeclaration;
+import com.sun.mirror.declaration.Declaration;
+import com.sun.mirror.declaration.MethodDeclaration;
+
+import java.util.Collection;
+import java.util.ArrayList;
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+/**
+ * Author: Maciej Machulak
+ */
+public class WebServiceAP implements AnnotationProcessor
+{
+
+ public WebServiceAP(AnnotationProcessorEnvironment env)
+ {
+ this.env = env;
+ this.type = (AnnotationTypeDeclaration) env.getTypeDeclaration("javax.jws.WebService");
+ }
+
+
+ public void process()
+ {
+ // Get all annotated classes
+ Collection<Declaration> annotatedClasses = env.getDeclarationsAnnotatedWith(type);
+ // If there were any annotated classes then we will create a participant
+ // and do other stuff
+ if (!annotatedClasses.isEmpty())
+ {
+ // Loop through all the annotated things
+ for (Declaration cd : annotatedClasses)
+ {
+ // Check if the annotation has been put on a class
+ if (cd instanceof ClassDeclaration)
+ {
+ ClassDeclaration myClassDeclaration = (ClassDeclaration) cd;
+
+ // Get the class methods
+ Collection<MethodDeclaration> classMethods = myClassDeclaration.getMethods();
+
+ if (!classMethods.isEmpty())
+ {
+
+ ArrayList<HandlerInfo> handlerList = new ArrayList<HandlerInfo>();
+ ArrayList<MethodInfo> methodList = new ArrayList<MethodInfo>();
+
+ // Get package name
+ String packageName = myClassDeclaration.getPackage().getQualifiedName();
+
+ for (MethodDeclaration singleMethod : classMethods)
+ {
+
+ WSTransactionAttribute txAttr = singleMethod.getAnnotation(WSTransactionAttribute.class);
+ if (txAttr == null)
+ {
+ env.getMessager().printNotice("No annotation on method: " + singleMethod.getSimpleName());
+ }
+ else
+ {
+
+
+ // Create info for handlers
+ handlerList.add(new HandlerInfo("JaxWSTransactionBridgeHandler",packageName+".JaxWSTransactionBridgeHandler"));
+ handlerList.add(new HandlerInfo("JaxWSServerHeaderContextProcessor",packageName+".JaxWSServerHeaderContextProcessor"));
+
+ WSTransactionAttributeType txType = txAttr.value();
+ if (txType == WSTransactionAttributeType.MANDATORY)
+ {
+
+ env.getMessager().printNotice("Mandatory annotation on method: " + singleMethod.getSimpleName());
+ }
+ if (txType == WSTransactionAttributeType.REQUIRED)
+ {
+ env.getMessager().printNotice("Required annotation on method: " + singleMethod.getSimpleName());
+ }
+ if (txType == WSTransactionAttributeType.REQUIRES_NEW)
+ {
+ env.getMessager().printNotice("Requires_New annotation on method: " + singleMethod.getSimpleName());
+ }
+ if (txType == WSTransactionAttributeType.SUPPORTS)
+ {
+ env.getMessager().printNotice("Supports annotation on method: " + singleMethod.getSimpleName());
+ }
+ if (txType == WSTransactionAttributeType.NOT_SUPPORTED)
+ {
+ env.getMessager().printNotice("Not_Supported annotation on method: " + singleMethod.getSimpleName());
+ }
+ if (txType == WSTransactionAttributeType.NEVER)
+ {
+ env.getMessager().printNotice("Never annotation on method: " + singleMethod.getSimpleName());
+ }
+ methodList.add(new MethodInfo(singleMethod.getSimpleName(),txType.toString()));
+ }
+
+
+
+ }
+
+ if (!methodList.isEmpty() && !handlerList.isEmpty())
+ {
+
+
+ try
+ {
+ // Create the customised handler
+ HandlerWriter handlerWriter = new HandlerWriter();
+ PrintWriter pw = env.getFiler().createSourceFile("JaxWSTransactionBridgeHandler");
+
+ pw.write(handlerWriter.createHandler(myClassDeclaration.getQualifiedName(),methodList));
+ pw.close();
+
+ // Create the XML file
+ XMLWriter xmlWriter = new XMLWriter();
+ pw = env.getFiler().createTextFile(Filer.Location.SOURCE_TREE,packageName,new File("jaxws-handlers.xml"),null);
+ pw.write(xmlWriter.createXML(handlerList));
+ pw.close();
+ }
+ catch (IOException e)
+ {
+ e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ }
+ }
+ }
+ else
+ {
+ env.getMessager().printError("No methods found in this class.");
+ }
+ }
+
+ }
+
+ }
+ }
+
+ private final AnnotationProcessorEnvironment env;
+ private final AnnotationTypeDeclaration type;
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/WebServiceAPF.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/WebServiceAPF.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/WebServiceAPF.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,34 @@
+package com.machulak.jboss.test.wstest.annotations;
+
+import com.sun.mirror.apt.AnnotationProcessorFactory;
+import com.sun.mirror.apt.AnnotationProcessor;
+import com.sun.mirror.apt.AnnotationProcessorEnvironment;
+import com.sun.mirror.declaration.AnnotationTypeDeclaration;
+
+import java.util.*;
+
+/**
+ * Author: Maciej Machulak
+ */
+public class WebServiceAPF implements AnnotationProcessorFactory
+{
+
+ private static final Collection<String> supportedAnnotations
+ = Collections.unmodifiableCollection(Arrays.asList("javax.jws.WebService"));
+
+ public Collection<String> supportedOptions()
+ {
+ return Arrays.asList("");
+ }
+
+ public Collection<String> supportedAnnotationTypes()
+ {
+ return supportedAnnotations;
+ }
+
+ public AnnotationProcessor getProcessorFor(Set<AnnotationTypeDeclaration> set, AnnotationProcessorEnvironment annotationProcessorEnvironment)
+ {
+ return new WebServiceAP(annotationProcessorEnvironment);
+ }
+
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/XMLWriter.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/XMLWriter.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/annotations/XMLWriter.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,58 @@
+package com.machulak.jboss.test.wstest.annotations;
+
+
+import java.util.ArrayList;
+
+
+import com.machulak.jboss.test.wstest.annotations.HandlerInfo;
+
+/**
+ * Author: Maciej Machulak
+ *
+ * It will be done with JAXB.
+ */
+public class XMLWriter
+{
+
+ public XMLWriter()
+ {
+ }
+
+ public String createXML(ArrayList<HandlerInfo> list)
+ {
+
+ StringBuffer result = new StringBuffer();
+
+ result.append(beginning);
+
+ // Create the XML description of the meeting
+ for(HandlerInfo handler : list)
+ {
+ result.append(hB);
+ result.append(hNameB);
+ result.append(handler.getHandlerName());
+ result.append(hNameE);
+ result.append(hClassB);
+ result.append(handler.getHandlerClass());
+ result.append(hClassE);
+ result.append(hE);
+ }
+
+ result.append(end);
+
+ return result.toString();
+ }
+
+ private static String beginning = " <?xml version=\"1.0\" encoding=\"UTF-8\" ?> \n" +
+ "- <handler-chains xmlns=\"http://java.sun.com/xml/ns/javaee\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd\">\n" +
+ "- <handler-chain>\n" +
+ " <protocol-bindings>##SOAP11_HTTP</protocol-bindings> \n";
+ private static String hNameB = "<handler-name>";
+ private static String hNameE = "</handler-name>";
+ private static String hClassB = "<handler-class>";
+ private static String hClassE = "</handler-class>";
+ private static String hB = "<handler>";
+ private static String hE = "</handler>";
+ private static String end = "</handler-chain></handler-chains>";
+
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/clients/JaxWSClientHeaderContextProcessor.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/clients/JaxWSClientHeaderContextProcessor.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/clients/JaxWSClientHeaderContextProcessor.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,271 @@
+package com.machulak.jboss.test.wstest.clients;
+
+import org.apache.log4j.Logger;
+
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import javax.xml.namespace.QName;
+import javax.xml.soap.*;
+
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Iterator;
+
+import com.arjuna.mw.wsc.context.Context;
+import com.arjuna.webservices.wscoor.CoordinationConstants;
+import com.arjuna.webservices.wscoor.CoordinationContextType;
+import com.arjuna.webservices.wsat.AtomicTransactionConstants;
+import com.arjuna.webservices.wsba.BusinessActivityConstants;
+import com.arjuna.mw.wst.common.CoordinationContextHelper;
+import com.arjuna.mw.wst.common.SOAPUtil;
+import com.arjuna.mw.wst.*;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: jhalli
+ * Date: Apr 20, 2007
+ * Time: 1:06:28 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class JaxWSClientHeaderContextProcessor implements SOAPHandler
+{
+ private static Logger log = Logger.getLogger(JaxWSClientHeaderContextProcessor.class);
+
+ private String handlerName;
+
+ public String getHandlerName()
+ {
+ return handlerName;
+ }
+
+ public void setHandlerName(String handlerName)
+ {
+ this.handlerName = handlerName;
+ }
+
+ public boolean handleMessage(MessageContext msgContext)
+ {
+ Boolean outbound = (Boolean)msgContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+ if (outbound == null)
+ throw new IllegalStateException("Cannot obtain required property: " + MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+
+ return outbound ? handleOutbound(msgContext) : handleInbound(msgContext);
+ }
+
+
+ public boolean handleFault(MessageContext messagecontext)
+ {
+ resumeTransaction(messagecontext) ;
+ return true;
+ }
+
+ public void close(MessageContext messageContext)
+ {
+ }
+
+ public String toString()
+ {
+ return (handlerName != null ? handlerName : super.toString());
+ }
+
+
+
+ // The header blocks that can be processed by this Handler instance
+ private Set<QName> headers = new HashSet<QName>();
+
+ /** Gets the header blocks that can be processed by this Handler instance.
+ */
+ public Set<QName> getHeaders()
+ {
+ log.info("getHeaders");
+
+ Set<QName> headerSet = new HashSet<QName>();
+ headerSet.add(new QName(CoordinationConstants.WSCOOR_NAMESPACE, CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT));
+
+ return headerSet;
+ }
+
+ /** Sets the header blocks that can be processed by this Handler instance.
+ */
+ public void setHeaders(Set<QName> headers)
+ {
+ this.headers = headers;
+ }
+
+
+
+ protected boolean handleInbound(MessageContext msgContext)
+ {
+ log.info("handleInbound");
+ resumeTransaction(msgContext) ;
+
+
+ return true ;
+ }
+
+
+ protected boolean handleOutbound(MessageContext msgContext)
+ {
+ log.info("handleOutbound");
+
+ final SOAPMessageContext soapMessageContext = (SOAPMessageContext)msgContext ;
+ final SOAPMessage soapMessage = soapMessageContext.getMessage() ;
+
+ if (soapMessage == null)
+ {
+ return true ;
+ }
+
+ try
+ {
+ /*
+ * There should either be an Atomic Transaction *or* a Business Activity
+ * associated with the thread.
+ */
+ final TransactionManager transactionManager = TransactionManagerFactory.transactionManager() ;
+ final BusinessActivityManager businessActivityManager = BusinessActivityManagerFactory.businessActivityManager() ;
+
+ final Context atContext ;
+ if (transactionManager != null)
+ {
+ final com.arjuna.mwlabs.wst.at.context.TxContextImple txContext =
+ (com.arjuna.mwlabs.wst.at.context.TxContextImple)transactionManager.currentTransaction() ;
+ atContext = (txContext == null ? null : txContext.context()) ;
+ }
+ else
+ {
+ atContext = null ;
+ }
+
+ final Context baContext ;
+ if (businessActivityManager != null)
+ {
+ final com.arjuna.mwlabs.wst.ba.context.TxContextImple txContext =
+ (com.arjuna.mwlabs.wst.ba.context.TxContextImple)businessActivityManager.currentTransaction() ;
+ baContext = (txContext == null ? null : txContext.context()) ;
+ }
+ else
+ {
+ baContext = null ;
+ }
+
+ final CoordinationContextType coordinationContext ;
+ if (atContext != null)
+ {
+ coordinationContext = atContext.getCoordinationContext() ;
+ }
+ else if (baContext != null)
+ {
+ coordinationContext = baContext.getCoordinationContext() ;
+ }
+ else
+ {
+ coordinationContext = null ;
+ }
+
+ if (coordinationContext != null)
+ {
+ final SOAPEnvelope env = soapMessage.getSOAPPart().getEnvelope() ;
+ SOAPHeader header = env.getHeader() ;
+ if (header == null)
+ {
+ header = env.addHeader() ;
+ }
+ final Name name = env.createName(CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT, CoordinationConstants.WSCOOR_PREFIX, CoordinationConstants.WSCOOR_NAMESPACE) ;
+ final SOAPHeaderElement headerElement = header.addHeaderElement(name) ;
+ headerElement.addNamespaceDeclaration(CoordinationConstants.WSCOOR_PREFIX, CoordinationConstants.WSCOOR_NAMESPACE) ;
+ headerElement.setMustUnderstand(true) ;
+ CoordinationContextHelper.serialise(env, headerElement, coordinationContext) ;
+ }
+ }
+ catch (final Throwable th)
+ {
+ log.warn("handleOutbound: ", th);
+ }
+
+ return true;
+ }
+
+ private void resumeTransaction(final MessageContext messageContext)
+ {
+ final SOAPMessageContext soapMessageContext = (SOAPMessageContext)messageContext ;
+ final SOAPMessage soapMessage = soapMessageContext.getMessage() ;
+
+ if (soapMessage != null)
+ {
+ try
+ {
+ final SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope() ;
+ final SOAPHeaderElement soapHeaderElement = getHeaderElement(soapEnvelope, CoordinationConstants.WSCOOR_NAMESPACE, CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT) ;
+
+ if (soapHeaderElement != null)
+ {
+ final CoordinationContextType cc = CoordinationContextHelper.deserialise(soapEnvelope, soapHeaderElement) ;
+ if (cc != null)
+ {
+ final String coordinationType = cc.getCoordinationType().getValue() ;
+ if (AtomicTransactionConstants.WSAT_PROTOCOL.equals(coordinationType))
+ {
+ final TxContext txContext = new com.arjuna.mwlabs.wst.at.context.TxContextImple(cc) ;
+ TransactionManagerFactory.transactionManager().resume(txContext) ;
+ }
+ else if (BusinessActivityConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME.equals(coordinationType))
+ {
+ final TxContext txContext = new com.arjuna.mwlabs.wst.ba.context.TxContextImple(cc);
+ BusinessActivityManagerFactory.businessActivityManager().resume(txContext) ;
+ }
+ else
+ {
+ log.warn("resumeTransaction: unknown Coordtype");
+ }
+ }
+ }
+ }
+ catch (final Throwable th)
+ {
+ log.warn("resumeTransaction: ", th);
+ }
+ }
+ }
+
+ private SOAPHeaderElement getHeaderElement(final SOAPEnvelope soapEnvelope, final String uri, final String name)
+ throws SOAPException
+ {
+ final SOAPHeader soapHeader = soapEnvelope.getHeader() ;
+ if (soapHeader != null)
+ {
+ final Iterator headerIter = SOAPUtil.getChildElements(soapHeader) ;
+ while(headerIter.hasNext())
+ {
+ final SOAPHeaderElement current = (SOAPHeaderElement)headerIter.next() ;
+ final Name currentName = current.getElementName() ;
+ if ((currentName != null) &&
+ match(name, currentName.getLocalName()) &&
+ match(uri, currentName.getURI()))
+ {
+ return current ;
+ }
+ }
+ }
+ return null ;
+ }
+
+ /**
+ * Do the two references match?
+ * @param lhs The first reference.
+ * @param rhs The second reference.
+ * @return true if the references are both null or if they are equal.
+ */
+ private boolean match(final Object lhs, final Object rhs)
+ {
+ if (lhs == null)
+ {
+ return (rhs == null) ;
+ }
+ else
+ {
+ return lhs.equals(rhs) ;
+ }
+ }
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/clients/WeekendClient.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/clients/WeekendClient.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/clients/WeekendClient.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,250 @@
+package com.machulak.jboss.test.wstest.clients;
+
+import com.machulak.jboss.test.wstest.services.restaurant.RestaurantAT;
+import com.machulak.jboss.test.wstest.services.flight.FlightAT;
+import com.machulak.jboss.test.wstest.services.bistro.Bistro;
+import com.machulak.jboss.test.wstest.services.hotel.Hotel;
+import com.arjuna.mw.wst.UserTransaction;
+import com.arjuna.mw.wst.UserTransactionFactory;
+import com.arjuna.mw.wst.UserBusinessActivity;
+import com.arjuna.mw.wst.UserBusinessActivityFactory;
+import com.arjuna.wst.TransactionRolledBackException;
+
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.ServletException;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.handler.Handler;
+import java.io.IOException;
+import java.net.URL;
+import java.net.MalformedURLException;
+import java.util.List;
+import java.util.ArrayList;
+
+import org.apache.log4j.Logger;
+
+/**
+ * Author: Maciej Machulak
+ */
+
+public class WeekendClient extends HttpServlet
+{
+
+ private static RestaurantAT restaurantAT;
+ private static FlightAT flightAT;
+ private static Bistro bistroAT;
+ private static Hotel hotelAT;
+
+ private static Logger log = Logger.getLogger(WeekendClient.class);
+
+ private ServletContext context;
+
+ public void init(final ServletConfig config) throws ServletException
+ {
+ flightAT = this.getPortFlight();
+ restaurantAT = this.getPortRestaurant();
+ bistroAT = this.getPortBistro();
+ hotelAT = this.getPortHotel();
+ context = config.getServletContext();
+ }
+
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
+ {
+ processRequest(request,response);
+ }
+
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
+ {
+ processRequest(request,response);
+ }
+
+ private void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
+ {
+ log.info("processRequest()");
+ String noOfSeats = request.getParameter("noOfSeats");
+ String noOfTables = request.getParameter("noOfTables");
+ String transactionType = request.getParameter("transactionType");
+ try
+ {
+ if (transactionType.equals("at"))
+ {
+ log.info("Testing atomic transaction.");
+ atomicTransaction(new Integer(noOfSeats),new Integer(noOfTables));
+ }
+ else if (transactionType.equals("ba"))
+ {
+ log.info("Testing business activity.");
+ businessActivity(new Integer(noOfSeats),new Integer(noOfTables));
+ }
+ else
+ {
+ log.info("Wrong transaction type!");
+ }
+ }
+ catch (TransactionRolledBackException trbe)
+ {
+ log.info("Transaction rolled back: " + trbe.getMessage());
+ }
+ catch (Exception e)
+ {
+ log.info("Transaction failed: ");
+ e.printStackTrace();
+ }
+ }
+
+ private void atomicTransaction(int noOfSeats,int noOfTables) throws Exception
+ {
+ // Getting user transaction
+ UserTransaction ut = UserTransactionFactory.userTransaction();
+
+ // Starting transaction
+ ut.begin();
+
+ // -- business logic start --
+ //flightAT.bookSeats(noOfSeats);
+ //restaurantAT.bookTables(noOfTables);
+ //bistroAT.getBookingNumber();
+ //bistroAT.bookSeats(noOfSeats);
+ hotelAT.getBookingCount();
+ hotelAT.getHotelInfo();
+ hotelAT.getHotelAddress();
+ //hotelAT.bookRooms(noOfSeats);
+
+ // -- business logic end --
+
+ // Ending the transaction
+ ut.commit();
+
+ }
+
+ private void businessActivity(int noOfSeats, int noOfTables) throws Exception
+ {
+ // Getting user business activity transaction
+ UserBusinessActivity uba = UserBusinessActivityFactory.userBusinessActivity();
+
+ // Starting the transaction
+ uba.begin();
+
+ // -- business logic start --
+ //flightBA.bookRooms(noOfSeats);
+ //restaurantBA.bookTables(noOfTables);
+ // -- business logic end --
+
+ // Ending user business activity transaction
+ // This can be uba.complete() if the participants are enlisted for the Completion
+ // version of the 2PC protocol.
+ uba.close();
+ }
+
+ private FlightAT getPortFlight()
+ {
+ // Connect to the Web Service
+ URL wsdlLocation = null;
+ try
+ {
+ wsdlLocation = new URL("http://localhost:8080/FlightATImplService/FlightATImpl?wsdl");
+ }
+ catch (MalformedURLException e)
+ {
+ e.printStackTrace();
+ }
+ QName serviceName = new QName("http://flight.services.wstest.test.jboss.machulak.com/","FlightATImplService");
+ Service service = Service.create(wsdlLocation, serviceName);
+ FlightAT port = service.getPort(FlightAT.class);
+
+ // Insert client handler
+ BindingProvider bindingProvider = (BindingProvider)port;
+ List<Handler> handlerChain = new ArrayList<Handler>();
+ handlerChain.add(new JaxWSClientHeaderContextProcessor());
+ bindingProvider.getBinding().setHandlerChain(handlerChain);
+
+ return port;
+
+ }
+
+ private RestaurantAT getPortRestaurant()
+ {
+ // Connect to the Web Service
+ URL wsdlLocation = null;
+ try
+ {
+ wsdlLocation = new URL("http://localhost:8080/RestaurantATImplService/RestaurantATImpl?wsdl");
+ }
+ catch (MalformedURLException e)
+ {
+ e.printStackTrace();
+ }
+ QName serviceName = new QName("http://restaurant.services.wstest.test.jboss.machulak.com/","RestaurantATImplService");
+ Service service = Service.create(wsdlLocation, serviceName);
+ RestaurantAT port = service.getPort(RestaurantAT.class);
+
+ // Insert client handler
+ BindingProvider bindingProvider = (BindingProvider)port;
+ List<Handler> handlerChain = new ArrayList<Handler>();
+ handlerChain.add(new JaxWSClientHeaderContextProcessor());
+ bindingProvider.getBinding().setHandlerChain(handlerChain);
+
+ return port;
+
+ }
+
+ private Bistro getPortBistro()
+ {
+ // Connect to the Web Service
+ URL wsdlLocation = null;
+ try
+ {
+ wsdlLocation = new URL("http://localhost:8080/BistroImplService/BistroImpl?wsdl");
+ }
+ catch (MalformedURLException e)
+ {
+ e.printStackTrace();
+ }
+ QName serviceName = new QName("http://bistro.services.wstest.test.jboss.machulak.com/","BistroService");
+ Service service = Service.create(wsdlLocation, serviceName);
+ Bistro port = service.getPort(Bistro.class);
+
+ // Insert client handler
+ BindingProvider bindingProvider = (BindingProvider)port;
+ List<Handler> handlerChain = new ArrayList<Handler>();
+ handlerChain.add(new JaxWSClientHeaderContextProcessor());
+ bindingProvider.getBinding().setHandlerChain(handlerChain);
+
+ return port;
+
+ }
+
+ private Hotel getPortHotel()
+ {
+ // Connect to the Web Service
+ URL wsdlLocation = null;
+ try
+ {
+ wsdlLocation = new URL("http://localhost:8080/HotelImplService/HotelImpl?wsdl");
+ }
+ catch (MalformedURLException e)
+ {
+ e.printStackTrace();
+ }
+ QName serviceName = new QName("http://hotel.services.wstest.test.jboss.machulak.com/","HotelService");
+ Service service = Service.create(wsdlLocation, serviceName);
+ Hotel port = service.getPort(Hotel.class);
+
+ // Insert client handler
+ BindingProvider bindingProvider = (BindingProvider)port;
+ List<Handler> handlerChain = new ArrayList<Handler>();
+ handlerChain.add(new JaxWSClientHeaderContextProcessor());
+ bindingProvider.getBinding().setHandlerChain(handlerChain);
+
+ return port;
+
+ }
+
+}
+
+
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/JaxWSServerHeaderContextProcessor.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/JaxWSServerHeaderContextProcessor.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/JaxWSServerHeaderContextProcessor.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,273 @@
+package com.machulak.jboss.test.wstest.services;
+
+import org.apache.log4j.Logger;
+
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import javax.xml.namespace.QName;
+import javax.xml.soap.*;
+
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Iterator;
+
+import com.arjuna.webservices.wscoor.CoordinationConstants;
+import com.arjuna.webservices.wscoor.CoordinationContextType;
+import com.arjuna.webservices.wsat.AtomicTransactionConstants;
+import com.arjuna.webservices.wsba.BusinessActivityConstants;
+import com.arjuna.mw.wst.common.CoordinationContextHelper;
+import com.arjuna.mw.wst.common.SOAPUtil;
+import com.arjuna.mw.wst.*;
+
+
+/**
+ * TODO: make this play nice alongside com.arjuna.mw.wst.service.JaxRPCHeaderContextProcessor
+ * - factor out common base class or suchlike
+ */
+public class JaxWSServerHeaderContextProcessor implements SOAPHandler
+{
+ private static Logger log = Logger.getLogger(JaxWSServerHeaderContextProcessor.class);
+
+ private String handlerName;
+
+ public String getHandlerName()
+ {
+ return handlerName;
+ }
+
+ public void setHandlerName(String handlerName)
+ {
+ this.handlerName = handlerName;
+ }
+
+ public boolean handleMessage(MessageContext msgContext)
+ {
+ Boolean outbound = (Boolean)msgContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+ if (outbound == null)
+ throw new IllegalStateException("Cannot obtain required property: " + MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+
+ return outbound ? handleOutbound(msgContext) : handleInbound(msgContext);
+ }
+
+
+ public boolean handleFault(MessageContext messagecontext)
+ {
+ suspendTransaction() ;
+ return true;
+ }
+
+ public void close(MessageContext messageContext)
+ {
+ }
+
+ public String toString()
+ {
+ return (handlerName != null ? handlerName : super.toString());
+ }
+
+
+
+ // The header blocks that can be processed by this Handler instance
+ private Set<QName> headers = new HashSet<QName>();
+
+ /** Gets the header blocks that can be processed by this Handler instance.
+ */
+ public Set<QName> getHeaders()
+ {
+ log.info("getHeaders");
+
+ Set<QName> headerSet = new HashSet<QName>();
+ headerSet.add(new QName(CoordinationConstants.WSCOOR_NAMESPACE, CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT));
+
+ return headerSet;
+ }
+
+ /** Sets the header blocks that can be processed by this Handler instance.
+ */
+ public void setHeaders(Set<QName> headers)
+ {
+ this.headers = headers;
+ }
+
+
+
+ protected boolean handleInbound(MessageContext msgContext)
+ {
+ log.info("handleInbound");
+/*
+ try
+ {
+ SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
+ SOAPHeader soapHeader = soapMessage.getSOAPHeader();
+ SOAPBody soapBody = soapMessage.getSOAPBody();
+
+ SOAPFactory soapFactory = SOAPFactory.newInstance();
+ Name headerName = soapFactory.createName("LogHandlerInbound", "ns1", "http://somens");
+ SOAPHeaderElement she = soapHeader.addHeaderElement(headerName);
+ she.setValue("true");
+
+ SOAPBodyElement soapBodyElement = (SOAPBodyElement)soapBody.getChildElements().next();
+ SOAPElement soapElement = (SOAPElement)soapBodyElement.getChildElements().next();
+ String value = soapElement.getValue();
+ soapElement.setValue(value + "|LogIn");
+ }
+ catch (SOAPException e)
+ {
+ throw new WebServiceException(e);
+ }
+*/
+
+ final SOAPMessageContext soapMessageContext = (SOAPMessageContext)msgContext ;
+ final SOAPMessage soapMessage = soapMessageContext.getMessage() ;
+
+ if (soapMessage != null)
+ {
+ try
+ {
+ final SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope() ;
+ final SOAPHeader soapHeader = soapEnvelope.getHeader() ;
+ final SOAPHeaderElement soapHeaderElement = getHeaderElement(soapHeader, CoordinationConstants.WSCOOR_NAMESPACE, CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT) ;
+
+ if (soapHeaderElement != null)
+ {
+ final CoordinationContextType cc = CoordinationContextHelper.deserialise(soapEnvelope, soapHeaderElement) ;
+ final String coordinationType = cc.getCoordinationType().getValue() ;
+ if (AtomicTransactionConstants.WSAT_PROTOCOL.equals(coordinationType))
+ {
+ final TxContext txContext = new com.arjuna.mwlabs.wst.at.context.TxContextImple(cc) ;
+ TransactionManagerFactory.transactionManager().resume(txContext) ;
+ clearMustUnderstand(soapHeader, soapHeaderElement) ;
+ }
+ else if (BusinessActivityConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME.equals(coordinationType))
+ {
+ final TxContext txContext = new com.arjuna.mwlabs.wst.ba.context.TxContextImple(cc);
+ BusinessActivityManagerFactory.businessActivityManager().resume(txContext) ;
+ clearMustUnderstand(soapHeader, soapHeaderElement) ;
+ }
+ else
+ {
+ log.warn("handleInbound: unknown type="+coordinationType);
+ }
+ }
+ }
+ catch (final Throwable th)
+ {
+ log.warn("handleInbound: ", th);
+ }
+ }
+ return true ;
+ }
+
+
+ protected boolean handleOutbound(MessageContext msgContext)
+ {
+ log.info("handleOutbound");
+ suspendTransaction() ;
+/*
+ try
+ {
+ SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
+ SOAPHeader soapHeader = soapMessage.getSOAPHeader();
+ SOAPBody soapBody = soapMessage.getSOAPBody();
+
+ SOAPFactory soapFactory = SOAPFactory.newInstance();
+ Name headerName = soapFactory.createName("LogHandlerOutbound", "ns1", "http://somens");
+ SOAPHeaderElement she = soapHeader.addHeaderElement(headerName);
+ she.setValue("true");
+
+ SOAPBodyElement soapBodyElement = (SOAPBodyElement)soapBody.getChildElements().next();
+ SOAPElement soapElement = (SOAPElement)soapBodyElement.getChildElements().next();
+ String value = soapElement.getValue();
+ soapElement.setValue(value + "|LogOut");
+ }
+ catch (SOAPException e)
+ {
+ throw new WebServiceException(e);
+ }
+*/
+ return true;
+ }
+
+ private void suspendTransaction()
+ {
+ try
+ {
+ /*
+ * There should either be an Atomic Transaction *or* a Business Activity
+ * associated with the thread.
+ */
+ final TransactionManager transactionManager = TransactionManagerFactory.transactionManager() ;
+ final BusinessActivityManager businessActivityManager = BusinessActivityManagerFactory.businessActivityManager() ;
+
+ if (transactionManager != null)
+ {
+ transactionManager.suspend() ;
+ }
+
+ if (businessActivityManager != null)
+ {
+ businessActivityManager.suspend() ;
+ }
+ }
+ catch (final Throwable th)
+ {
+ log.warn("suspendTransaction", th);
+ }
+ }
+
+ private SOAPHeaderElement getHeaderElement(final SOAPHeader soapHeader, final String uri, final String name)
+ throws SOAPException
+ {
+ if (soapHeader != null)
+ {
+ final Iterator headerIter = SOAPUtil.getChildElements(soapHeader) ;
+ while(headerIter.hasNext())
+ {
+ final SOAPHeaderElement current = (SOAPHeaderElement)headerIter.next() ;
+ final Name currentName = current.getElementName() ;
+ if ((currentName != null) &&
+ match(name, currentName.getLocalName()) &&
+ match(uri, currentName.getURI()))
+ {
+ return current ;
+ }
+ }
+ }
+ return null ;
+ }
+
+ /**
+ * Do the two references match?
+ * @param lhs The first reference.
+ * @param rhs The second reference.
+ * @return true if the references are both null or if they are equal.
+ */
+ private boolean match(final Object lhs, final Object rhs)
+ {
+ if (lhs == null)
+ {
+ return (rhs == null) ;
+ }
+ else
+ {
+ return lhs.equals(rhs) ;
+ }
+ }
+
+ /**
+ * Clear the soap MustUnderstand.
+ * @param soapHeader The SOAP header.
+ * @param soapHeaderElement The SOAP header element.
+ */
+ private void clearMustUnderstand(final SOAPHeader soapHeader, final SOAPHeaderElement soapHeaderElement)
+ throws SOAPException
+ {
+ final Name headerName = soapHeader.getElementName() ;
+
+ final SOAPFactory factory = SOAPFactory.newInstance() ;
+ final Name attributeName = factory.createName("mustUnderstand", headerName.getPrefix(), headerName.getURI()) ;
+
+ soapHeaderElement.removeAttribute(attributeName) ;
+ }
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/bistro/Bistro.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/bistro/Bistro.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/bistro/Bistro.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,19 @@
+package com.machulak.jboss.test.wstest.services.bistro;
+
+import javax.jws.WebService;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: jhalli
+ * Date: Apr 19, 2007
+ * Time: 10:52:35 AM
+ * To change this template use File | Settings | File Templates.
+ */
+ at WebService
+public interface Bistro {
+ public void bookSeats(int how_many);
+
+ public int getBookingCount();
+
+ public int getBookingNumber();
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/bistro/BistroEntityImpl.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/bistro/BistroEntityImpl.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/bistro/BistroEntityImpl.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,47 @@
+package com.machulak.jboss.test.wstest.services.bistro;
+
+import org.apache.log4j.Logger;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.GeneratedValue;
+
+ at Entity
+ at Table(name = "bistro1")
+public class BistroEntityImpl implements Serializable
+{
+ private static Logger log = Logger.getLogger(BistroEntityImpl.class);
+
+ private int id;
+ private int bookingCount;
+
+ public BistroEntityImpl() { }
+
+ @Id
+ @GeneratedValue
+ public int getId () {
+ return id;
+ }
+
+ public void setId (int id) {
+ this.id = id;
+ }
+
+ public int getBookingCount()
+ {
+ return bookingCount;
+ }
+
+
+ public void setBookingCount(int bookingCount)
+ {
+ this.bookingCount = bookingCount;
+ }
+
+ public void increaseBookingCount(int how_many) {
+ setBookingCount( getBookingCount() + how_many );
+ }
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/bistro/BistroImpl.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/bistro/BistroImpl.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/bistro/BistroImpl.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,63 @@
+package com.machulak.jboss.test.wstest.services.bistro;
+
+import org.apache.log4j.Logger;
+
+import javax.ejb.*;
+import javax.persistence.*;
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+import javax.jws.HandlerChain;
+import javax.jws.soap.SOAPBinding;
+
+ at Stateless
+ at Remote(Bistro.class)
+
+// default is REQUIRED for all methods unless overriden.
+// the container gets first crack at this, so we have to
+// tell it not to create it's own tx as we will do that.
+// TODO: ordering of container vs. registered handlers?
+//@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
+
+ at WebService(name="Bistro") // (name = "Bistro2", targetNamespace = "http://www.jboss.org/txbridgedemoejb", serviceName = "BistroService")
+ at SOAPBinding(style = SOAPBinding.Style.RPC)
+ at HandlerChain(file = "../jaxws-full-handlers-server.xml") // relative path from the class file
+public class BistroImpl implements Bistro {
+ private static Logger log = Logger.getLogger(BistroImpl.class);
+
+ private static final int BISTRO_ID = 1;
+
+ @PersistenceContext
+ protected EntityManager em;
+
+ @WebMethod
+ public void bookSeats(int how_many) {
+ log.info("bookSeats(how_many="+how_many+")");
+
+ BistroEntityImpl entity = getBistroEntity();
+
+ entity.increaseBookingCount(how_many);
+ }
+
+ @WebMethod
+ public int getBookingCount() {
+ log.info("getBookedSeatCount()");
+
+ return getBistroEntity().getBookingCount();
+ }
+
+ @WebMethod
+ public int getBookingNumber() {
+ return 1;
+ }
+
+ private BistroEntityImpl getBistroEntity() {
+
+ BistroEntityImpl entity = em.find(BistroEntityImpl.class, BISTRO_ID);
+ if(entity == null) {
+ entity = new BistroEntityImpl();
+ em.persist(entity);
+ }
+
+ return entity;
+ }
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/flight/FlightAT.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/flight/FlightAT.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/flight/FlightAT.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,15 @@
+package com.machulak.jboss.test.wstest.services.flight;
+
+import javax.jws.WebService;
+
+/**
+ * Author: Maciej Machulak
+ */
+ at WebService
+public interface FlightAT {
+
+ public void bookSeats(int noOfSeats);
+
+
+
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/flight/FlightATImpl.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/flight/FlightATImpl.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/flight/FlightATImpl.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,72 @@
+package com.machulak.jboss.test.wstest.services.flight;
+
+import org.apache.log4j.Logger;
+import com.arjuna.mw.wst.UserTransactionFactory;
+import com.arjuna.mw.wst.TransactionManagerFactory;
+import com.arjuna.ats.arjuna.common.Uid;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+import javax.jws.HandlerChain;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * Author: Maciej Machulak
+ */
+ at Stateless
+ at WebService(endpointInterface = "com.machulak.jboss.test.wstest.services.flight.FlightAT")
+ at SOAPBinding(style=SOAPBinding.Style.RPC)
+ at HandlerChain(file="../jaxws-handlers-server.xml")
+public class FlightATImpl implements FlightAT {
+
+ private static Logger log = Logger.getLogger(FlightATImpl.class);
+
+ private static FlightManager flight = FlightManager.getSingletonInstance();
+
+ FlightATImpl()
+ {
+
+ }
+
+ public void bookSeats(int noOfSeats)
+ {
+
+ // Debug information
+ log.info("bookRooms()");
+
+ // Getting the transaction identifier
+ String txId = UserTransactionFactory.userTransaction().transactionIdentifier();
+ log.info("Transaction identifier: " + txId);
+
+ // Checking if this is a transaction we are aware of
+ if (flight.knowsAbout(txId))
+ {
+ log.info("Transaction known.");
+ }
+ else
+ {
+ // Creating a participant for a new transaction
+ try
+ {
+ log.info("New transaction.");
+
+ // Creating a participant
+ log.info("Creating participant.");
+ FlightParticipantAT participant = new FlightParticipantAT(txId);
+
+ // Enlisting the participant
+ log.info("Enlisting participant.");
+ TransactionManagerFactory.transactionManager().enlistForDurableTwoPhase(participant,new Uid().toString());
+ log.info("Participant successfully enlisted.");
+ }
+ catch (Exception e)
+ {
+ log.error("Participant could not be enlisted.");
+ }
+ }
+ // Calling a bookTables method on the flight manager
+ flight.bookSeats(txId,noOfSeats);
+
+ }
+
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/flight/FlightManager.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/flight/FlightManager.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/flight/FlightManager.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,301 @@
+package com.machulak.jboss.test.wstest.services.flight;
+
+import org.apache.log4j.Logger;
+
+import java.util.Hashtable;
+
+/**
+ * Author: Maciej Machulak
+ */
+public class FlightManager
+{
+
+ private static Logger log = Logger.getLogger(FlightManager.class);
+
+ // Default values
+ private final static int SEAT_CAPACITY = 15;
+
+ // It's a singleton pattern so we have only one restaurant manager
+ private static FlightManager flight = null;
+
+ // Those hashSeats will store all the transactions - both prepared and unprepared
+ // A transaction will be stored as a pair:
+ // 1) key (transaction id = txId) - Integer
+ // 2) value (number of Seats) - String
+ private Hashtable preparedTransactions;
+ private Hashtable unpreparedTransactions;
+
+ // I'm still not sure how I will represent resources in the annotation style
+ // programming
+ // Maybe I will have just 3 copies of resources
+ // - total number of Seats
+ private Integer noOfSeats;
+ // - number of free Seats
+ private Integer noOfFreeSeats;
+ // - number of provisionally booked Seats (can be greater > noOfFreeSeats/noOfSeats)
+ private Integer noOfBookedSeats;
+ // - number of prepared Seats
+ private Integer noOfPreparedSeats;
+ // - number of committed Seats
+ private Integer noOfCommittedSeats;
+
+ /**
+ * The auto commit mode.
+ * <p/>
+ * true = automatically commit, false = manually commit
+ */
+ private boolean autoCommitMode;
+
+ /**
+ * The object used for wait/notify in manual commit mode.
+ */
+ private Object preparation;
+
+ /**
+ * The waiting status, when in manual commit mode.
+ */
+ private boolean isPreparationWaiting;
+
+ /**
+ * The user specified outcome when in manual commit mode.
+ */
+ private boolean isCommit;
+
+ private FlightManager()
+ {
+ log.info("New flight manager.");
+ setToDefault();
+ }
+
+ public void setToDefault() {
+ preparedTransactions = new Hashtable();
+ unpreparedTransactions = new Hashtable();
+ noOfSeats = SEAT_CAPACITY;
+ noOfFreeSeats = noOfSeats;
+ noOfBookedSeats = 0;
+ noOfPreparedSeats = 0;
+ noOfCommittedSeats = 0;
+ }
+
+ public static FlightManager getSingletonInstance()
+ {
+ if (flight == null)
+ {
+ flight = new FlightManager();
+ }
+ return flight;
+ }
+
+ public void bookSeats(String txId, int noOfSeats)
+ {
+ // Debug information
+ log.info("bookRooms()");
+
+ // Check if there is already something associated with this transaction
+ Integer request = (Integer) unpreparedTransactions.get(txId);
+
+ if (request == null)
+ {
+ log.info("This is a new transaction.");
+ request = 0;
+ }
+ else
+ {
+ log.info("This transaction is already known.");
+ }
+ noOfBookedSeats = noOfBookedSeats + noOfSeats;
+ unpreparedTransactions.put(txId,request + noOfSeats);
+ log.info("Transaction added to unprepared transactions");
+ }
+
+ public boolean prepare(String txId)
+ {
+ log.info("prepare()");
+
+ // Check if there is such transaction to be prepared
+ Integer request = (Integer) unpreparedTransactions.get(txId);
+ if (request == null)
+ {
+ log.info("No such transaction.");
+ return false;
+ }
+ else
+ {
+ log.info("Request for transaction found - proceeding.");
+ }
+
+ // Check if there are enough resources
+ if (request > noOfFreeSeats)
+ {
+ log.info("Cannot prepare - no free resources.");
+ return false;
+ }
+ else
+ {
+ log.info("Resources are available - proceeding.");
+ }
+
+ // Calculate number of new resources
+ noOfFreeSeats = noOfFreeSeats - noOfSeats;
+ noOfPreparedSeats = noOfPreparedSeats + noOfSeats;
+
+ // Move transaction to the pool of prepared transactions
+ log.info("Marking transaction as PREPARED.");
+ preparedTransactions.put(txId,request);
+ unpreparedTransactions.remove(txId);
+
+ return true;
+ }
+
+ // Committing the tables - it produces the output (whether committing has been successful
+ // or not -> but the participant is still going to ignore the output of this method)
+ public boolean commit(String txId)
+ {
+
+ log.info("commit()");
+
+ // Initially the method is not successful
+ boolean success = false;
+
+ // There can be 3 situations:
+ // - 2 phase commit protocol
+ if (preparedTransactions.get(txId) != null)
+ {
+ log.info("- 2 phase commit");
+ Integer request = (Integer) preparedTransactions.get(txId);
+ preparedTransactions.remove(txId);
+ noOfPreparedSeats -= request;
+ noOfCommittedSeats += request;
+ success = true;
+ }
+ // - 1 phase commit protocol
+ else if (unpreparedTransactions.get(txId) != null)
+ {
+ log.info("- 1 phase commit");
+ Integer request = (Integer) unpreparedTransactions.get(txId);
+ unpreparedTransactions.remove(txId);
+ noOfPreparedSeats -= request;
+ noOfCommittedSeats += request;
+ success = true;
+ }
+ // - transaction invalid
+ else
+ {
+ log.info("- no such transaction");
+ }
+ return success;
+
+ }
+
+ public boolean rollback(String txId)
+ {
+ log.info("rollback()");
+ boolean success = false;
+
+ // If the transaction has already been told to prepare
+ if (preparedTransactions.containsKey(txId))
+ {
+ log.info("Rolling back prepared transaction.");
+ Integer request = (Integer) preparedTransactions.get(txId);
+ noOfPreparedSeats -= request;
+ noOfFreeSeats += request;
+ noOfBookedSeats -= request;
+ success = true;
+ }
+ else if (unpreparedTransactions.containsKey(txId))
+ {
+ log.info("Rolling back unprepared transaction.");
+ noOfBookedSeats += (Integer) unpreparedTransactions.get(txId);
+ success = true;
+ }
+ else
+ {
+ log.info("No such transaction.");
+ }
+ return success;
+
+ }
+
+ public boolean knowsAbout(Object txID)
+ {
+ log.info("knowsAbout()");
+ return (unpreparedTransactions.containsKey(txID) || preparedTransactions.containsKey(txID));
+ }
+
+
+ public Integer getNTotalSeats() {
+ return noOfSeats;
+ }
+
+ public void setNTotalSeats(Integer noOfSeats) {
+ this.noOfSeats = noOfSeats;
+ }
+
+ public Integer getNFreeSeats() {
+ return noOfFreeSeats;
+ }
+
+ public void setNFreeSeats(Integer noOfFreeSeats) {
+ this.noOfFreeSeats = noOfFreeSeats;
+ }
+
+ public Integer getNBookedSeats() {
+ return noOfBookedSeats;
+ }
+
+ public void setNBookedSeats(Integer noOfBookedSeats) {
+ this.noOfBookedSeats = noOfBookedSeats;
+ }
+
+ public Integer getNPreparedSeats() {
+ return noOfPreparedSeats;
+ }
+
+ public void setNoOfPreparedSeats(Integer noOfPreparedSeats) {
+ this.noOfPreparedSeats = noOfPreparedSeats;
+ }
+
+ public Integer getNCommittedSeats() {
+ return noOfCommittedSeats;
+ }
+
+ public void setNCommittedSeats(Integer noOfCommittedSeats) {
+ this.noOfCommittedSeats = noOfCommittedSeats;
+ }
+
+ public boolean isAutoCommitMode() {
+ return autoCommitMode;
+ }
+
+ public void setAutoCommitMode(boolean autoCommitMode) {
+ this.autoCommitMode = autoCommitMode;
+ }
+
+ public Object getPreparation() {
+ return preparation;
+ }
+
+ public void setPreparation(Object preparation) {
+ this.preparation = preparation;
+ }
+
+ public boolean isPreparationWaiting() {
+ return isPreparationWaiting;
+ }
+
+ public void setPreparationWaiting(boolean preparationWaiting) {
+ isPreparationWaiting = preparationWaiting;
+ }
+
+ public boolean isCommit() {
+ return isCommit;
+ }
+
+ public void setCommit(boolean commit) {
+ isCommit = commit;
+ }
+
+ public void newCapacity(int newCapacity) {
+ noOfSeats = newCapacity;
+ }
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/flight/FlightParticipantAT.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/flight/FlightParticipantAT.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/flight/FlightParticipantAT.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,94 @@
+package com.machulak.jboss.test.wstest.services.flight;
+
+import com.arjuna.wst.*;
+import com.machulak.jboss.test.wstest.services.restaurant.RestaurantManager;
+import com.machulak.jboss.test.wstest.services.restaurant.RestaurantView;
+import org.apache.log4j.Logger;
+
+/**
+ * Author: Maciej Machulak
+ */
+public class FlightParticipantAT implements Durable2PCParticipant
+{
+
+ // Logger
+ private static Logger log = Logger.getLogger(FlightParticipantAT.class);
+
+ // Transaction identifier
+ String txId;
+
+ // Business logic
+ private FlightManager flightManager;
+ // View
+ private FlightView flightView;
+
+
+ public FlightParticipantAT(String txId)
+ {
+ log.info("Constructor.");
+ flightManager = FlightManager.getSingletonInstance();
+ flightView = FlightView.getSingletonInstance();
+ this.txId = txId;
+ flightView.addMessage("Transaction: txId");
+ }
+
+ public Vote prepare() throws WrongStateException, SystemException
+ {
+ log.info("prepare()");
+
+ // Executing perform logic
+ boolean success = flightManager.prepare(txId);
+
+ // Checking if the logic has been executed successfully
+ if ( success )
+ {
+ log.info("prepare() successful");
+ return new Prepared();
+ }
+ log.info("prepare() failed");
+ return new Aborted();
+ }
+
+ public void commit() throws WrongStateException, SystemException
+ {
+ log.info("commit()");
+
+ // Executing commit logic
+ boolean success = flightManager.commit(txId);
+
+ // Checking if the logic has been executed succesfully
+ if ( success )
+ {
+ log.info("commit() succesful");
+ }
+ else
+ {
+ log.info("commit() failed");
+ }
+ }
+
+ public void rollback() throws WrongStateException, SystemException
+ {
+ log.info("rollback()");
+
+ // Executing rollback
+ boolean success = flightManager.rollback(txId);
+ if ( success )
+ {
+ log.info("rollback() successful");
+ }
+ else
+ {
+ log.info("rollback() failed");
+ }
+ }
+
+ public void unknown() throws SystemException
+ {
+ log.info("uknown()");
+ }
+
+ public void error() throws SystemException {
+ log.info("error()");
+ }
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/flight/FlightView.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/flight/FlightView.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/flight/FlightView.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,469 @@
+package com.machulak.jboss.test.wstest.services.flight;
+/*
+ * 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 in the distribution for a full listing
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * FlightView.java
+ *
+ * Copyright (c) 2003 Arjuna Technologies Ltd.
+ *
+ * $Id: FlightView.java,v 1.2 2004/04/21 13:09:18 jhalliday Exp $
+ *
+ */
+
+/**
+ * The visual interface (GUI) for the RestaurantAT Service.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Revision: 1.2 $
+ */
+public class FlightView extends javax.swing.JFrame
+{
+ // Note: Some parts of this file were auto-generated
+ // by NetBeans 3.3 FormEditor (http://www.netbeans.org)
+
+ /**
+ * Create a new FlightView instance.
+ *
+ * @param fManager The {@link FlightManager} instance to bind to
+ */
+ public FlightView(FlightManager fManager)
+ {
+ flightManager = fManager;
+ initComponents();
+ updateFields();
+ backButtonColor = jButtonConfirm.getBackground();
+ }
+
+ /**
+ * Initialize the form.
+ * This is called by the constructor
+ * <p/>
+ * WARNING: Automatically generated code, may be overwritten
+ */
+ private void initComponents()
+ {//GEN-BEGIN:initComponents
+ jPanel2 = new javax.swing.JPanel();
+ jLabel5 = new javax.swing.JLabel();
+ jLabelNBookedSeats = new javax.swing.JLabel();
+ jLabel9 = new javax.swing.JLabel();
+ jLabelNPreparedSeats = new javax.swing.JLabel();
+ jLabel2 = new javax.swing.JLabel();
+ jLabelNConfirmedSeats = new javax.swing.JLabel();
+ jLabel6 = new javax.swing.JLabel();
+ jLabelNFreeSeats = new javax.swing.JLabel();
+ jLabel7 = new javax.swing.JLabel();
+ jButtonResetFields = new javax.swing.JButton();
+ jPanel1 = new javax.swing.JPanel();
+ jLabel8 = new javax.swing.JLabel();
+ jLabel1 = new javax.swing.JLabel();
+ jLabelNTotalSeats = new javax.swing.JLabel();
+ jLabel4 = new javax.swing.JLabel();
+ jLabel3 = new javax.swing.JLabel();
+ jTextFieldNewNTotalSeats = new javax.swing.JTextField();
+ jButtonSetNTotalSeats = new javax.swing.JButton();
+ jPanelLeft = new javax.swing.JPanel();
+ jLabel10 = new javax.swing.JLabel();
+ jLabelDisplayMode = new javax.swing.JLabel();
+ jButtonChangeMode = new javax.swing.JButton();
+ jLabelResponse = new javax.swing.JLabel();
+ jButtonConfirm = new javax.swing.JButton();
+ jButtonCancel = new javax.swing.JButton();
+ jScrollPane1 = new javax.swing.JScrollPane();
+ jTextArea = new javax.swing.JTextArea();
+
+ setTitle("FlightAT Service");
+ setName("flightView");
+ addWindowListener(new java.awt.event.WindowAdapter()
+ {
+ public void windowClosing(java.awt.event.WindowEvent evt)
+ {
+ exitForm(evt);
+ }
+ });
+
+ jPanel2.setBorder(new javax.swing.border.LineBorder(java.awt.Color.black));
+ jLabel5.setText("Seats: ");
+ jLabel5.setFont(new java.awt.Font("Dialog", 1, 14));
+ jPanel2.add(jLabel5);
+
+ jLabelNBookedSeats.setText(Integer.toString(flightManager.getNBookedSeats()));
+ jLabelNBookedSeats.setForeground(java.awt.Color.gray);
+ jLabelNBookedSeats.setFont(new java.awt.Font("Dialog", 1, 18));
+ jPanel2.add(jLabelNBookedSeats);
+
+ jLabel9.setText("Booked, ");
+ jPanel2.add(jLabel9);
+
+ jLabelNPreparedSeats.setText(Integer.toString(flightManager.getNPreparedSeats()));
+ jLabelNPreparedSeats.setForeground(java.awt.Color.darkGray);
+ jLabelNPreparedSeats.setFont(new java.awt.Font("Dialog", 1, 18));
+ jPanel2.add(jLabelNPreparedSeats);
+
+ jLabel2.setText("Prepared, ");
+ jPanel2.add(jLabel2);
+
+ jLabelNConfirmedSeats.setText(Integer.toString(flightManager.getNCommittedSeats()));
+ jLabelNConfirmedSeats.setForeground(new java.awt.Color(0, 51, 204));
+ jLabelNConfirmedSeats.setFont(new java.awt.Font("Dialog", 1, 18));
+ jPanel2.add(jLabelNConfirmedSeats);
+
+ jLabel6.setText("Confirmed, ");
+ jPanel2.add(jLabel6);
+
+ jLabelNFreeSeats.setText(Integer.toString(flightManager.getNFreeSeats()));
+ jLabelNFreeSeats.setForeground(new java.awt.Color(0, 153, 0));
+ jLabelNFreeSeats.setFont(new java.awt.Font("Dialog", 1, 18));
+ jPanel2.add(jLabelNFreeSeats);
+
+ jLabel7.setText("Free ");
+ jPanel2.add(jLabel7);
+
+ jButtonResetFields.setText("Reset Fields");
+ jButtonResetFields.addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(java.awt.event.ActionEvent evt)
+ {
+ jButtonResetFieldsActionPerformed(evt);
+ }
+ });
+
+ jPanel2.add(jButtonResetFields);
+
+ getContentPane().add(jPanel2, java.awt.BorderLayout.SOUTH);
+
+ jPanel1.setBorder(new javax.swing.border.LineBorder(java.awt.Color.black));
+ jLabel8.setText("RestaurantAT ");
+ jLabel8.setForeground(java.awt.Color.red);
+ jLabel8.setFont(new java.awt.Font("Dialog", 1, 24));
+ jPanel1.add(jLabel8);
+
+ jLabel1.setText("Capacity:");
+ jLabel1.setFont(new java.awt.Font("Dialog", 1, 14));
+ jPanel1.add(jLabel1);
+
+ jLabelNTotalSeats.setText(Integer.toString(flightManager.getNTotalSeats()));
+ jLabelNTotalSeats.setForeground(java.awt.Color.darkGray);
+ jLabelNTotalSeats.setFont(new java.awt.Font("Dialog", 1, 18));
+ jPanel1.add(jLabelNTotalSeats);
+
+ jLabel4.setText("Seats");
+ jLabel4.setFont(new java.awt.Font("Dialog", 1, 14));
+ jPanel1.add(jLabel4);
+
+ jLabel3.setText(" New capacity:");
+ jLabel3.setFont(new java.awt.Font("Dialog", 1, 14));
+ jPanel1.add(jLabel3);
+
+ jTextFieldNewNTotalSeats.setFont(new java.awt.Font("Dialog", 0, 18));
+ jTextFieldNewNTotalSeats.setText(Integer.toString(flightManager.getNTotalSeats()));
+ jPanel1.add(jTextFieldNewNTotalSeats);
+
+ jButtonSetNTotalSeats.setFont(new java.awt.Font("Dialog", 1, 14));
+ jButtonSetNTotalSeats.setText("Set");
+ jButtonSetNTotalSeats.addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(java.awt.event.ActionEvent evt)
+ {
+ jButtonSetNTotalSeatsActionPerformed(evt);
+ }
+ });
+
+ jPanel1.add(jButtonSetNTotalSeats);
+
+ getContentPane().add(jPanel1, java.awt.BorderLayout.NORTH);
+
+ jPanelLeft.setLayout(new javax.swing.BoxLayout(jPanelLeft, javax.swing.BoxLayout.Y_AXIS));
+
+ jLabel10.setText("Mode:");
+ jPanelLeft.add(jLabel10);
+
+ jLabelDisplayMode.setText("Automatic");
+ jLabelDisplayMode.setForeground(java.awt.Color.blue);
+ jLabelDisplayMode.setFont(new java.awt.Font("Dialog", 1, 18));
+ jPanelLeft.add(jLabelDisplayMode);
+
+ jButtonChangeMode.setText("Change mode");
+ jButtonChangeMode.setPreferredSize(new java.awt.Dimension(119, 27));
+ jButtonChangeMode.setMaximumSize(new java.awt.Dimension(119, 27));
+ jButtonChangeMode.addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(java.awt.event.ActionEvent evt)
+ {
+ jButtonChangeModeActionPerformed(evt);
+ }
+ });
+
+ jPanelLeft.add(jButtonChangeMode);
+
+ jLabelResponse.setText("Response:");
+ jPanelLeft.add(jLabelResponse);
+
+ jButtonConfirm.setText("Confirm");
+ jButtonConfirm.setPreferredSize(new java.awt.Dimension(119, 27));
+ jButtonConfirm.setMaximumSize(new java.awt.Dimension(119, 27));
+ jButtonConfirm.addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(java.awt.event.ActionEvent evt)
+ {
+ jButtonConfirmActionPerformed(evt);
+ }
+ });
+
+ jPanelLeft.add(jButtonConfirm);
+
+ jButtonCancel.setText("Cancel");
+ jButtonCancel.setPreferredSize(new java.awt.Dimension(119, 27));
+ jButtonCancel.setMaximumSize(new java.awt.Dimension(119, 27));
+ jButtonCancel.addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(java.awt.event.ActionEvent evt)
+ {
+ jButtonCancelActionPerformed(evt);
+ }
+ });
+
+ jPanelLeft.add(jButtonCancel);
+
+ getContentPane().add(jPanelLeft, java.awt.BorderLayout.WEST);
+
+ jScrollPane1.setAutoscrolls(true);
+ jTextArea.setEditable(false);
+ jTextArea.setRows(10);
+ jTextArea.setMargin(new java.awt.Insets(5, 5, 5, 5));
+ jScrollPane1.setViewportView(jTextArea);
+
+ getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
+
+ pack();
+ }//GEN-END:initComponents
+
+ /**
+ * Reset event handler.
+ */
+ private void jButtonResetFieldsActionPerformed(java.awt.event.ActionEvent evt)
+ {//GEN-FIRST:event_jButtonResetFieldsActionPerformed
+ flightManager.setToDefault();
+ updateFields();
+ }//GEN-LAST:event_jButtonResetFieldsActionPerformed
+
+ /**
+ * Cancel event handler.
+ */
+ private void jButtonCancelActionPerformed(java.awt.event.ActionEvent evt)
+ {//GEN-FIRST:event_jButtonCancelActionPerformed
+ if (flightManager.isPreparationWaiting())
+ {
+ Object preparation = flightManager.getPreparation();
+ try
+ {
+ flightManager.setCommit(false);
+ synchronized (preparation)
+ {
+ preparation.notify();
+ }
+ }
+ catch (Exception e)
+ {
+ System.err.println("FlightView.jButtonCancelActionPerformed(): Unable to notify preparation.");
+ }
+ }
+ }//GEN-LAST:event_jButtonCancelActionPerformed
+
+ /**
+ * Confirm event handler.
+ */
+ private void jButtonConfirmActionPerformed(java.awt.event.ActionEvent evt)
+ {//GEN-FIRST:event_jButtonConfirmActionPerformed
+ if (flightManager.isPreparationWaiting())
+ {
+ Object preparation = flightManager.getPreparation();
+ try
+ {
+ flightManager.setCommit(true);
+ synchronized (preparation)
+ {
+ preparation.notify();
+ }
+ }
+ catch (Exception e)
+ {
+ System.err.println("FlightView.jButtonCancelActionPerformed(): Unable to notify preparation.");
+ }
+ }
+ }//GEN-LAST:event_jButtonConfirmActionPerformed
+
+ /**
+ * ChangeMode event handler.
+ */
+ private void jButtonChangeModeActionPerformed(java.awt.event.ActionEvent evt)
+ {//GEN-FIRST:event_jButtonChangeModeActionPerformed
+ if (flightManager.isAutoCommitMode())
+ {
+ flightManager.setAutoCommitMode(false);
+ }
+ else
+ {
+ flightManager.setAutoCommitMode(true);
+ }
+ updateFields();
+ }//GEN-LAST:event_jButtonChangeModeActionPerformed
+
+ /**
+ * Capacity change event handler.
+ */
+ private void jButtonSetNTotalSeatsActionPerformed(java.awt.event.ActionEvent evt)
+ {//GEN-FIRST:event_jButtonSetNTotalSeatsActionPerformed
+ String strNSeats = jTextFieldNewNTotalSeats.getText();
+
+ flightManager.newCapacity(Integer.parseInt(strNSeats));
+ int nFreeSeats = flightManager.getNFreeSeats();
+
+ jLabelNTotalSeats.setText(strNSeats);
+ jLabelNFreeSeats.setText(Integer.toString(nFreeSeats));
+ }//GEN-LAST:event_jButtonSetNTotalSeatsActionPerformed
+
+ /**
+ * Exit the application.
+ */
+ private void exitForm(java.awt.event.WindowEvent evt)
+ {//GEN-FIRST:event_exitForm
+ //System.exit(0); // disabled for embedding in application servers.
+ }//GEN-LAST:event_exitForm
+
+ /**
+ * Add regular text to the central jTextArea.
+ *
+ * @param text The String to add
+ */
+ public void addMessage(java.lang.String text)
+ {
+ jButtonConfirm.setBackground(backButtonColor);
+ jButtonCancel.setBackground(backButtonColor);
+ jTextArea.append(text + "\n");
+ jScrollPane1.getVerticalScrollBar().setValue(jScrollPane1.getVerticalScrollBar().getMaximum());
+ }
+
+ /**
+ * Add status (highlighted) text to the central jTextArea.
+ *
+ * @param text The String to add
+ */
+ public void addPrepareMessage(java.lang.String text)
+ {
+ jButtonConfirm.setBackground(java.awt.Color.red);
+ jButtonCancel.setBackground(java.awt.Color.red);
+ jTextArea.append(text + "\n");
+ jScrollPane1.getVerticalScrollBar().setValue(jScrollPane1.getVerticalScrollBar().getMaximum());
+ }
+
+
+ /**
+ * Synchronise the GUI with the underlying state.
+ */
+ public void updateFields()
+ {
+ jLabelNTotalSeats.setText(Integer.toString(flightManager.getNTotalSeats()));
+ jTextFieldNewNTotalSeats.setText(Integer.toString(flightManager.getNTotalSeats()));
+ jLabelNPreparedSeats.setText(Integer.toString(flightManager.getNPreparedSeats()));
+ jLabelNConfirmedSeats.setText(Integer.toString(flightManager.getNCommittedSeats()));
+ jLabelNFreeSeats.setText(Integer.toString(flightManager.getNFreeSeats()));
+ jLabelNBookedSeats.setText(Integer.toString(flightManager.getNBookedSeats()));
+
+ //update fields related to interactive mode.
+ if (flightManager.isAutoCommitMode())
+ {
+ jLabelResponse.setVisible(false);
+ jButtonConfirm.setVisible(false);
+ jButtonCancel.setVisible(false);
+ jLabelDisplayMode.setText("automatic");
+ }
+ else
+ {
+ jLabelResponse.setVisible(true);
+ jButtonConfirm.setVisible(true);
+ jButtonCancel.setVisible(true);
+ jLabelDisplayMode.setText("interactive");
+ }
+ }
+
+ /**
+ * Allow use of a singleton model for web services demo.
+ */
+ public static FlightView getSingletonInstance()
+ {
+ if (singletonInstance == null)
+ {
+ singletonInstance = new FlightView(FlightManager.getSingletonInstance());
+ }
+
+ singletonInstance.show();
+ return singletonInstance;
+ }
+
+ /**
+ * A singleton instance of this class.
+ */
+ private static FlightView singletonInstance;
+
+
+ // Variables declaration - automatically generated - do not modify
+
+ private javax.swing.JPanel jPanel2;
+ private javax.swing.JLabel jLabel5;
+ private javax.swing.JLabel jLabelNBookedSeats;
+ private javax.swing.JLabel jLabel9;
+ private javax.swing.JLabel jLabelNPreparedSeats;
+ private javax.swing.JLabel jLabel2;
+ private javax.swing.JLabel jLabelNConfirmedSeats;
+ private javax.swing.JLabel jLabel6;
+ private javax.swing.JLabel jLabelNFreeSeats;
+ private javax.swing.JLabel jLabel7;
+ private javax.swing.JButton jButtonResetFields;
+ private javax.swing.JPanel jPanel1;
+ private javax.swing.JLabel jLabel8;
+ private javax.swing.JLabel jLabel1;
+ private javax.swing.JLabel jLabelNTotalSeats;
+ private javax.swing.JLabel jLabel4;
+ private javax.swing.JLabel jLabel3;
+ private javax.swing.JTextField jTextFieldNewNTotalSeats;
+ private javax.swing.JButton jButtonSetNTotalSeats;
+ private javax.swing.JPanel jPanelLeft;
+ private javax.swing.JLabel jLabel10;
+ private javax.swing.JLabel jLabelDisplayMode;
+ private javax.swing.JButton jButtonChangeMode;
+ private javax.swing.JLabel jLabelResponse;
+ private javax.swing.JButton jButtonConfirm;
+ private javax.swing.JButton jButtonCancel;
+ private javax.swing.JScrollPane jScrollPane1;
+ private javax.swing.JTextArea jTextArea;
+
+ // End of automatically generated variables declarations
+
+ /**
+ * The {@link FlightManager} instance this view is bound to.
+ */
+ private FlightManager flightManager;
+
+ /**
+ * The current color of the back button.
+ */
+ private java.awt.Color backButtonColor;
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/hotel/DummyParticipantAT.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/hotel/DummyParticipantAT.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/hotel/DummyParticipantAT.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,42 @@
+package com.machulak.jboss.test.wstest.services.hotel;
+
+import com.arjuna.wst.*;
+import org.apache.log4j.Logger;
+
+/**
+ * Author: Maciej Machulak
+ */
+public class DummyParticipantAT implements Durable2PCParticipant {
+
+
+ public DummyParticipantAT() {
+ log.info("constructor");
+ }
+
+ private static Logger log = Logger.getLogger(DummyParticipantAT.class);
+
+ public Vote prepare() throws WrongStateException, SystemException {
+ log.info("prepare()");
+ return new Prepared();
+ }
+
+ public void commit() throws WrongStateException, SystemException {
+ log.info("commit()");
+ //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public void rollback() throws WrongStateException, SystemException {
+ log.info("rollback()");
+ //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public void unknown() throws SystemException {
+ log.info("unknown()");
+ //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public void error() throws SystemException {
+ log.info("error()");
+ //To change body of implemented methods use File | Settings | File Templates.
+ }
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/hotel/Hotel.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/hotel/Hotel.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/hotel/Hotel.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,23 @@
+package com.machulak.jboss.test.wstest.services.hotel;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import java.rmi.RemoteException;
+
+/**
+ * Author: Maciej Machulak
+ * Date: May 16, 2007
+ */
+ at WebService
+public interface Hotel {
+
+ void bookRooms(int how_many) throws HotelException;
+
+ int getBookingCount();
+
+ String getHotelInfo();
+
+ String getHotelAddress();
+
+ String getHotelOwner();
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/hotel/HotelEntityImpl.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/hotel/HotelEntityImpl.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/hotel/HotelEntityImpl.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,51 @@
+package com.machulak.jboss.test.wstest.services.hotel;
+
+import org.apache.log4j.Logger;
+
+import javax.persistence.Id;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+
+/**
+ * Author: Maciej Machulak
+ */
+ at Entity
+ at Table(name = "hotel")
+public class HotelEntityImpl
+{
+ private static Logger log = Logger.getLogger(HotelEntityImpl.class);
+
+ private int id;
+ private int bookingCount;
+
+ public HotelEntityImpl() { }
+
+ @Id
+ @GeneratedValue
+ public int getId ()
+ {
+ return id;
+ }
+
+ public void setId (int id)
+ {
+ this.id = id;
+ }
+
+ public int getBookingCount()
+ {
+ return bookingCount;
+ }
+
+
+ public void setBookingCount(int bookingCount)
+ {
+ this.bookingCount = bookingCount;
+ }
+
+ public void increaseBookingCount(int how_many)
+ {
+ setBookingCount( getBookingCount() + how_many );
+ }
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/hotel/HotelException.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/hotel/HotelException.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/hotel/HotelException.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,21 @@
+package com.machulak.jboss.test.wstest.services.hotel;
+
+import javax.ejb.ApplicationException;
+
+/**
+ * Author: Maciej Machulak
+ */
+ at ApplicationException
+public class HotelException extends Exception
+{
+
+ public HotelException()
+ {
+ super();
+ }
+
+ public HotelException(String message)
+ {
+ super(message);
+ }
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/hotel/HotelImpl.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/hotel/HotelImpl.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/hotel/HotelImpl.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,88 @@
+package com.machulak.jboss.test.wstest.services.hotel;
+
+import org.apache.log4j.Logger;
+
+import javax.persistence.PersistenceContext;
+import javax.persistence.EntityManager;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.HandlerChain;
+import javax.jws.soap.SOAPBinding;
+import javax.ejb.*;
+
+import com.machulak.jboss.test.wstest.services.bistro.BistroEntityImpl;
+import com.machulak.jboss.test.wstest.services.bistro.Bistro;
+import com.machulak.jboss.test.wstest.annotations.WSTransactionAttribute;
+import com.machulak.jboss.test.wstest.annotations.WSTransactionAttributeType;
+
+import java.rmi.RemoteException;
+
+ at Stateless
+ at Remote(Hotel.class)
+
+// default is REQUIRED for all methods unless overriden.
+// the container gets first crack at this, so we have to
+// tell it not to create it's own tx as we will do that.
+// TODO: ordering of container vs. registered handlers?
+//@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
+
+ at WebService(name="Hotel") // (name = "Bistro2", targetNamespace = "http://www.jboss.org/txbridgedemoejb", serviceName = "BistroService")
+ at SOAPBinding(style = SOAPBinding.Style.RPC)
+ at HandlerChain(file = "../jaxws-hotel-handlers-server.xml") // relative path from the class file
+public class HotelImpl implements Hotel
+{
+
+ private static Logger log = Logger.getLogger(HotelImpl.class);
+ private static final int HOTEL_ID = 1;
+
+ @PersistenceContext
+ protected EntityManager em;
+
+ @WebMethod
+ public void bookRooms(int how_many) throws HotelException
+ {
+ log.info("bookRooms(how_many="+how_many+")");
+ HotelEntityImpl entity = getHotelEntity();
+ entity.increaseBookingCount(how_many);
+ }
+
+ @WebMethod
+ @WSTransactionAttribute(WSTransactionAttributeType.MANDATORY)
+ public int getBookingCount()
+ {
+ log.info("getBookedSeatCount()");
+ return getHotelEntity().getBookingCount();
+ }
+
+ @WebMethod
+ @WSTransactionAttribute(WSTransactionAttributeType.MANDATORY)
+ public String getHotelInfo()
+ {
+ log.info("getHotelInfo()");
+ return "Hotel Hilton";
+ }
+
+ @WebMethod
+ @WSTransactionAttribute(WSTransactionAttributeType.NOT_SUPPORTED)
+ public String getHotelAddress()
+ {
+ log.info("getHotelAddress()");
+ return "Hotel Address";
+ }
+
+ public String getHotelOwner()
+ {
+ log.info("getHotelOwner()");
+ return "Hotel Owner";
+ }
+
+ private HotelEntityImpl getHotelEntity()
+ {
+ HotelEntityImpl entity = em.find(HotelEntityImpl.class, HOTEL_ID);
+ if(entity == null) {
+ entity = new HotelEntityImpl();
+ em.persist(entity);
+ }
+ return entity;
+ }
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/hotel/jaxws-handlers.xml
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/hotel/jaxws-handlers.xml (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/hotel/jaxws-handlers.xml 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,5 @@
+ <?xml version="1.0" encoding="UTF-8" ?>
+- <handler-chains xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd">
+- <handler-chain>
+ <protocol-bindings>##SOAP11_HTTP</protocol-bindings>
+<handler><handler-name>JaxWSTransactionBridgeHandler</handler-name><handler-class>com.machulak.jboss.test.wstest.services.hotel.JaxWSTransactionBridgeHandler</handler-class></handler><handler><handler-name>JaxWSServerHeaderContextProcessor</handler-name><handler-class>com.machulak.jboss.test.wstest.services.hotel.JaxWSServerHeaderContextProcessor</handler-class></handler><handler><handler-name>JaxWSTransactionBridgeHandler</handler-name><handler-class>com.machulak.jboss.test.wstest.services.hotel.JaxWSTransactionBridgeHandler</handler-class></handler><handler><handler-name>JaxWSServerHeaderContextProcessor</handler-name><handler-class>com.machulak.jboss.test.wstest.services.hotel.JaxWSServerHeaderContextProcessor</handler-class></handler><handler><handler-name>JaxWSTransactionBridgeHandler</handler-name><handler-class>com.machulak.jboss.test.wstest.services.hotel.JaxWSTransactionBridgeHandler</handler-class></handler><handler><handler-name>JaxWSServerHeaderContextProcessor<!
/handler-name><handler-class>com.machulak.jboss.test.wstest.services.hotel.JaxWSServerHeaderContextProcessor</handler-class></handler></handler-chain></handler-chains>
\ No newline at end of file
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantAT.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantAT.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantAT.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,12 @@
+package com.machulak.jboss.test.wstest.services.restaurant;
+
+import javax.jws.WebService;
+
+/**
+ * Author: Maciej Machulak
+ */
+ at WebService
+public interface RestaurantAT
+{
+ public void bookTables(int noOfTables);
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantATImpl.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantATImpl.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantATImpl.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,70 @@
+package com.machulak.jboss.test.wstest.services.restaurant;
+
+import org.apache.log4j.Logger;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+import javax.jws.HandlerChain;
+import javax.jws.soap.SOAPBinding;
+
+import com.arjuna.mw.wst.UserTransactionFactory;
+import com.arjuna.mw.wst.TransactionManagerFactory;
+import com.arjuna.ats.arjuna.common.Uid;
+
+/**
+ * Author: Maciej Machulak
+ */
+
+ at Stateless
+ at WebService(endpointInterface = "com.machulak.jboss.test.wstest.services.restaurant.RestaurantAT")
+ at SOAPBinding(style=SOAPBinding.Style.RPC)
+ at HandlerChain(file="../jaxws-handlers-server.xml")
+public class RestaurantATImpl implements RestaurantAT {
+ // Logger
+ private static Logger log = Logger.getLogger(RestaurantATImpl.class);
+
+ // RestaurantAT manager - business logic + transactions
+ private static RestaurantManager restaurant = RestaurantManager.getSingletonInstance();
+
+ // Exposed business method
+ public void bookTables(int noOfTables)
+ {
+ // Debug information
+ log.info("bookTables()");
+
+ // Getting the transaction identifier
+ String txId = UserTransactionFactory.userTransaction().transactionIdentifier();
+ log.info("Transaction identifier: " + txId);
+
+ // Checking if this is a transaction we are aware of
+ if (restaurant.knowsAbout(txId))
+ {
+ log.info("Transaction known.");
+ }
+ else
+ {
+ // Creating a participant for a new transaction
+ try
+ {
+ log.info("New transaction.");
+
+ // Creating a participant
+ log.info("Creating participant.");
+ RestaurantParticipantAT participant = new RestaurantParticipantAT(txId);
+
+ // Enlisting the participant
+ log.info("Enlisting participant.");
+ TransactionManagerFactory.transactionManager().enlistForDurableTwoPhase(participant,new Uid().toString());
+ log.info("Participant successfully enlisted.");
+ }
+ catch (Exception e)
+ {
+ log.error("Participant could not be enlisted.");
+ }
+ }
+ // Calling a bookTables method on the restaurant manager
+ restaurant.bookTables(txId,noOfTables);
+
+ }
+
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantEntityImpl.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantEntityImpl.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantEntityImpl.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,80 @@
+package com.machulak.jboss.test.wstest.services.restaurant;
+
+import org.apache.log4j.Logger;
+
+import javax.persistence.Entity;
+import javax.persistence.Table;
+import javax.persistence.Id;
+import javax.persistence.GeneratedValue;
+import java.io.Serializable;
+
+/**
+ * Author: Maciej Machulak
+ */
+ at Entity
+ at Table(name="restaurant")
+public class RestaurantEntityImpl implements Serializable {
+
+ private final static int DEFAULT_NUMBER_OF_TABLES = 10;
+
+ private static Logger log = Logger.getLogger(RestaurantEntityImpl.class);
+
+ private int id;
+ private int noOfTables = DEFAULT_NUMBER_OF_TABLES;
+ private int noOfBookedTables = 0;
+
+ public RestaurantEntityImpl()
+ {
+ }
+
+ @Id
+ @GeneratedValue
+ public int getId()
+ {
+ log.info("getId: " + id);
+ return id;
+ }
+
+ public void setId(int id)
+ {
+ log.info("setId: " + id);
+ this.id = id;
+ }
+
+ public int getNoOfTables()
+ {
+ log.info("getNoOfTables: " + noOfTables);
+ return noOfTables;
+ }
+
+ public void setNoOfTables(int noOfTables)
+ {
+ log.info("setNoOfTables: " + noOfTables);
+ this.noOfTables = noOfTables;
+ }
+
+ public void increaseNoOfTables(int noOfTables)
+ {
+ setNoOfTables(getNoOfTables() + noOfTables);
+ }
+
+ public int getNoOfBookedTables() {
+ return noOfBookedTables;
+ }
+
+ private void setNoOfBookedTables(int noOfBookedTables)
+ {
+ this.noOfBookedTables = noOfBookedTables;
+ }
+
+ public boolean bookTables(int noOfTables)
+ {
+ log.info("bookTables: " + noOfTables);
+ if (getNoOfBookedTables() + noOfTables > this.noOfTables)
+ {
+ setNoOfBookedTables(getNoOfBookedTables() + noOfTables);
+ return true;
+ }
+ return false;
+ }
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantManager.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantManager.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantManager.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,290 @@
+package com.machulak.jboss.test.wstest.services.restaurant;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.BasicConfigurator;
+import org.apache.log4j.PropertyConfigurator;
+
+import java.util.Hashtable;
+
+
+/**
+ * Author: Maciej Machulak
+ */
+public class RestaurantManager {
+
+ private static Logger log = Logger.getLogger(RestaurantParticipantAT.class);
+
+ // Default values
+ private final static int TABLE_CAPACITY = 15;
+
+ // It's a singleton pattern so we have only one restaurant manager
+ private static RestaurantManager restaurant = null;
+
+ // Those hashtables will store all the transactions - both prepared and unprepared
+ // A transaction will be stored as a pair:
+ // 1) key (transaction id = txId) - Integer
+ // 2) value (number of tables) - String
+ private Hashtable preparedTransactions;
+ private Hashtable unpreparedTransactions;
+
+ // I'm still not sure how I will represent resources in the annotation style
+ // programming
+ // Maybe I will have just 3 copies of resources
+ // - total number of tables
+ private Integer noOfTables;
+ // - number of free tables
+ private Integer noOfFreeTables;
+ // - number of provisionally booked tables (can be greater > noOfFreeTables/noOfTables)
+ private Integer noOfBookedTables;
+ // - number of prepared tables
+ private Integer noOfPreparedTables;
+ // - number of committed tables
+ private Integer noOfCommittedTables;
+
+ /**
+ * The auto commit mode.
+ * <p/>
+ * true = automatically commit, false = manually commit
+ */
+ private boolean autoCommitMode;
+
+ /**
+ * The object used for wait/notify in manual commit mode.
+ */
+ private Object preparation;
+
+ /**
+ * The waiting status, when in manual commit mode.
+ */
+ private boolean isPreparationWaiting;
+
+ /**
+ * The user specified outcome when in manual commit mode.
+ */
+ private boolean isCommit;
+
+ private RestaurantManager()
+ {
+ log.info("Creating manager.");
+ setToDefault();
+ }
+
+ // Initialise method
+ public void setToDefault()
+ {
+ log.info("setToDefault()");
+ preparedTransactions = new Hashtable();
+ unpreparedTransactions = new Hashtable();
+ noOfTables = TABLE_CAPACITY;
+ noOfFreeTables = noOfTables;
+ noOfBookedTables = 0;
+ noOfPreparedTables = 0;
+ noOfCommittedTables = 0;
+ }
+ // Pre-booking the tables
+ // This method does not have to return anything - basically if the pre-booking does
+ // not succeed then it will not be possible to prepare/commit - so the error will
+ // be detected then.
+ public void bookTables(String txId, int noOfTables)
+ {
+ log.info("bookTables()");
+
+ // Check if there is already something associated with this transaction
+ Integer request = (Integer) unpreparedTransactions.get(txId);
+
+ // If the transaction is new
+ if (request == null)
+ {
+ log.info("This is a new transaction.");
+ request = 0;
+ }
+ else
+ {
+ log.info("This is a known transaction.");
+ }
+ noOfBookedTables = noOfBookedTables + noOfTables;
+ unpreparedTransactions.put(txId, request + noOfTables);
+ log.info("Transaction added to unprepared transactions.");
+
+ }
+
+ // Reserving the tables - this method checks if we actually can reserve the table
+ // (btw. methods do not have to be synchronised because this is the singleton pattern
+ // and we only have 1 instance - although... hmm... I think those methods should be
+ // synchronised...)
+ public boolean prepare(String txId)
+ {
+ log.info("prepare()");
+
+ // Check if there is such transaction to be prepared
+ Integer request = (Integer) unpreparedTransactions.get(txId);
+ if (request == null)
+ {
+ log.info("No such transaction.");
+ return false;
+ }
+ else
+ {
+ log.info("Request for transaction found - proceeding.");
+ }
+
+ // Check if there are enough resources
+ if (request > noOfFreeTables)
+ {
+ log.info("Cannot prepare - no free resources.");
+ return false;
+ }
+ else
+ {
+ log.info("Resources are available - proceeding.");
+ }
+
+ // Calculate number of new resources
+ noOfFreeTables = noOfFreeTables - noOfTables;
+ noOfPreparedTables = noOfPreparedTables + noOfTables;
+
+ // Move transaction to the pool of prepared transactions
+ log.info("Marking transaction as PREPARED.");
+ preparedTransactions.put(txId,request);
+ unpreparedTransactions.remove(txId);
+
+ return true;
+ }
+
+ // Committing the tables - it produces the output (whether committing has been successful
+ // or not -> but the participant is still going to ignore the output of this method)
+ public boolean commit(String txId)
+ {
+
+ log.info("commit()");
+
+ // Initially the method is not successful
+ boolean success = false;
+
+ // There can be 3 situations:
+ // - 2 phase commit protocol
+ if (preparedTransactions.get(txId) != null)
+ {
+ log.info("- 2 phase commit");
+ Integer request = (Integer) preparedTransactions.get(txId);
+ preparedTransactions.remove(txId);
+ noOfPreparedTables -= request;
+ noOfCommittedTables += request;
+ success = true;
+ }
+ // - 1 phase commit protocol
+ else if (unpreparedTransactions.get(txId) != null)
+ {
+ log.info("- 1 phase commit");
+ Integer request = (Integer) unpreparedTransactions.get(txId);
+ unpreparedTransactions.remove(txId);
+ noOfPreparedTables -= request;
+ noOfCommittedTables += request;
+ success = true;
+ }
+ // - transaction invalid
+ else
+ {
+ log.info("- no such transaction");
+ }
+ return success;
+
+ }
+
+ public boolean knowsAbout(Object txID)
+ {
+ log.info("knowsAbout()");
+ return (unpreparedTransactions.containsKey(txID) || preparedTransactions.containsKey(txID));
+ }
+
+
+ public boolean rollback(String txId)
+ {
+ log.info("rollback()");
+ boolean success = false;
+
+ // If the transaction has already been told to prepare
+ if (preparedTransactions.containsKey(txId))
+ {
+ log.info("Rolling back prepared transaction.");
+ Integer request = (Integer) preparedTransactions.get(txId);
+ noOfPreparedTables -= request;
+ noOfFreeTables += request;
+ noOfBookedTables -= request;
+ success = true;
+ }
+ else if (unpreparedTransactions.containsKey(txId))
+ {
+ log.info("Rolling back unprepared transaction.");
+ noOfBookedTables += (Integer) unpreparedTransactions.get(txId);
+ success = true;
+ }
+ else
+ {
+ log.info("No such transaction.");
+ }
+ return success;
+
+ }
+
+ public static RestaurantManager getSingletonInstance()
+ {
+ log.info("getSingletonInstance()");
+ if (restaurant == null)
+ {
+ log.info("New instance.");
+ restaurant = new RestaurantManager();
+ }
+ else
+ {
+ log.info("Instance already exists.");
+ }
+ return restaurant;
+ }
+
+
+ public int getNBookedTables() {
+ return noOfBookedTables;
+ }
+
+ public int getNPreparedTables() {
+ return noOfPreparedTables;
+ }
+
+ public int getNCommittedTables() {
+ return noOfCommittedTables;
+ }
+
+ public int getNFreeTables() {
+ return noOfFreeTables;
+ }
+
+ public int getNTotalTables() {
+ return noOfTables;
+ }
+
+
+ public boolean isAutoCommitMode() {
+ return autoCommitMode;
+ }
+
+ public boolean getIsPreparationWaiting() {
+ return isPreparationWaiting;
+ }
+
+ public void setAutoCommitMode(boolean autoCommitMode) {
+ this.autoCommitMode = autoCommitMode;
+ }
+
+ public Object getPreparation() {
+ return preparation;
+ }
+
+ public void setCommit(boolean commit) {
+ this.isCommit = commit;
+ }
+
+ public void newCapacity(int newCapacity) {
+ this.noOfTables = newCapacity;
+ }
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantParticipantAT.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantParticipantAT.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantParticipantAT.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,90 @@
+package com.machulak.jboss.test.wstest.services.restaurant;
+
+import com.arjuna.wst.*;
+import org.apache.log4j.Logger;
+
+/**
+ * Author: Maciej Machulak
+ */
+public class RestaurantParticipantAT implements Durable2PCParticipant
+{
+ // Logger
+ private static Logger log = Logger.getLogger(RestaurantParticipantAT.class);
+
+ // Transaction identifier
+ private String txId;
+
+ // RestaurantAT manager (business logic + transactions)
+ private RestaurantManager restaurantManager;
+ private RestaurantView restaurantView;
+
+ public RestaurantParticipantAT(String txId)
+ {
+ log.info("Constructor.");
+ restaurantManager = RestaurantManager.getSingletonInstance();
+ restaurantView = RestaurantView.getSingletonInstance();
+ this.txId = txId;
+ restaurantView.addMessage("Transaction: txId");
+ }
+
+ public Vote prepare() throws WrongStateException, SystemException
+ {
+ log.info("prepare()");
+
+ // Executing perform logic
+ boolean success = restaurantManager.prepare(txId);
+
+ // Checking if the logic has been executed successfully
+ if ( success )
+ {
+ log.info("prepare() successful");
+ return new Prepared();
+ }
+ log.info("prepare() failed");
+ return new Aborted();
+ }
+
+ public void commit() throws WrongStateException, SystemException
+ {
+ log.info("commit()");
+
+ // Executing commit logic
+ boolean success = restaurantManager.commit(txId);
+
+ // Checking if the logic has been executed succesfully
+ if ( success )
+ {
+ log.info("commit() succesful");
+ }
+ else
+ {
+ log.info("commit() failed");
+ }
+ }
+
+ public void rollback() throws WrongStateException, SystemException
+ {
+ log.info("rollback()");
+
+ // Executing rollback
+ boolean success = restaurantManager.rollback(txId);
+ if ( success )
+ {
+ log.info("rollback() successful");
+ }
+ else
+ {
+ log.info("rollback() failed");
+ }
+ }
+
+ public void unknown() throws SystemException
+ {
+ log.info("unknown()");
+ }
+
+ public void error() throws SystemException
+ {
+ log.info("error()");
+ }
+}
Added: labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantView.java
===================================================================
--- labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantView.java (rev 0)
+++ labs/jbosstm/workspace/maciej.machulak/code/WSTest/src/com/machulak/jboss/test/wstest/services/restaurant/RestaurantView.java 2007-05-18 01:20:00 UTC (rev 11930)
@@ -0,0 +1,469 @@
+package com.machulak.jboss.test.wstest.services.restaurant;
+/*
+ * 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 in the distribution for a full listing
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * RestaurantView.java
+ *
+ * Copyright (c) 2003 Arjuna Technologies Ltd.
+ *
+ * $Id: RestaurantView.java,v 1.2 2004/04/21 13:09:18 jhalliday Exp $
+ *
+ */
+
+/**
+ * The visual interface (GUI) for the RestaurantAT Service.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Revision: 1.2 $
+ */
+public class RestaurantView extends javax.swing.JFrame
+{
+ // Note: Some parts of this file were auto-generated
+ // by NetBeans 3.3 FormEditor (http://www.netbeans.org)
+
+ /**
+ * Create a new RestaurantView instance.
+ *
+ * @param rManager The {@link RestaurantManager} instance to bind to
+ */
+ public RestaurantView(RestaurantManager rManager)
+ {
+ restManager = rManager;
+ initComponents();
+ updateFields();
+ backButtonColor = jButtonConfirm.getBackground();
+ }
+
+ /**
+ * Initialize the form.
+ * This is called by the constructor
+ * <p/>
+ * WARNING: Automatically generated code, may be overwritten
+ */
+ private void initComponents()
+ {//GEN-BEGIN:initComponents
+ jPanel2 = new javax.swing.JPanel();
+ jLabel5 = new javax.swing.JLabel();
+ jLabelNBookedTables = new javax.swing.JLabel();
+ jLabel9 = new javax.swing.JLabel();
+ jLabelNPreparedTables = new javax.swing.JLabel();
+ jLabel2 = new javax.swing.JLabel();
+ jLabelNConfirmedTables = new javax.swing.JLabel();
+ jLabel6 = new javax.swing.JLabel();
+ jLabelNFreeTables = new javax.swing.JLabel();
+ jLabel7 = new javax.swing.JLabel();
+ jButtonResetFields = new javax.swing.JButton();
+ jPanel1 = new javax.swing.JPanel();
+ jLabel8 = new javax.swing.JLabel();
+ jLabel1 = new javax.swing.JLabel();
+ jLabelNTotalTables = new javax.swing.JLabel();
+ jLabel4 = new javax.swing.JLabel();
+ jLabel3 = new javax.swing.JLabel();
+ jTextFieldNewNTotalTables = new javax.swing.JTextField();
+ jButtonSetNTotalTables = new javax.swing.JButton();
+ jPanelLeft = new javax.swing.JPanel();
+ jLabel10 = new javax.swing.JLabel();
+ jLabelDisplayMode = new javax.swing.JLabel();
+ jButtonChangeMode = new javax.swing.JButton();
+ jLabelResponse = new javax.swing.JLabel();
+ jButtonConfirm = new javax.swing.JButton();
+ jButtonCancel = new javax.swing.JButton();
+ jScrollPane1 = new javax.swing.JScrollPane();
+ jTextArea = new javax.swing.JTextArea();
+
+ setTitle("RestaurantAT Service");
+ setName("restaurantView");
+ addWindowListener(new java.awt.event.WindowAdapter()
+ {
+ public void windowClosing(java.awt.event.WindowEvent evt)
+ {
+ exitForm(evt);
+ }
+ });
+
+ jPanel2.setBorder(new javax.swing.border.LineBorder(java.awt.Color.black));
+ jLabel5.setText("Tables: ");
+ jLabel5.setFont(new java.awt.Font("Dialog", 1, 14));
+ jPanel2.add(jLabel5);
+
+ jLabelNBookedTables.setText(Integer.toString(restManager.getNBookedTables()));
+ jLabelNBookedTables.setForeground(java.awt.Color.gray);
+ jLabelNBookedTables.setFont(new java.awt.Font("Dialog", 1, 18));
+ jPanel2.add(jLabelNBookedTables);
+
+ jLabel9.setText("Booked, ");
+ jPanel2.add(jLabel9);
+
+ jLabelNPreparedTables.setText(Integer.toString(restManager.getNPreparedTables()));
+ jLabelNPreparedTables.setForeground(java.awt.Color.darkGray);
+ jLabelNPreparedTables.setFont(new java.awt.Font("Dialog", 1, 18));
+ jPanel2.add(jLabelNPreparedTables);
+
+ jLabel2.setText("Prepared, ");
+ jPanel2.add(jLabel2);
+
+ jLabelNConfirmedTables.setText(Integer.toString(restManager.getNCommittedTables()));
+ jLabelNConfirmedTables.setForeground(new java.awt.Color(0, 51, 204));
+ jLabelNConfirmedTables.setFont(new java.awt.Font("Dialog", 1, 18));
+ jPanel2.add(jLabelNConfirmedTables);
+
+ jLabel6.setText("Confirmed, ");
+ jPanel2.add(jLabel6);
+
+ jLabelNFreeTables.setText(Integer.toString(restManager.getNFreeTables()));
+ jLabelNFreeTables.setForeground(new java.awt.Color(0, 153, 0));
+ jLabelNFreeTables.setFont(new java.awt.Font("Dialog", 1, 18));
+ jPanel2.add(jLabelNFreeTables);
+
+ jLabel7.setText("Free ");
+ jPanel2.add(jLabel7);
+
+ jButtonResetFields.setText("Reset Fields");
+ jButtonResetFields.addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(java.awt.event.ActionEvent evt)
+ {
+ jButtonResetFieldsActionPerformed(evt);
+ }
+ });
+
+ jPanel2.add(jButtonResetFields);
+
+ getContentPane().add(jPanel2, java.awt.BorderLayout.SOUTH);
+
+ jPanel1.setBorder(new javax.swing.border.LineBorder(java.awt.Color.black));
+ jLabel8.setText("RestaurantAT ");
+ jLabel8.setForeground(java.awt.Color.red);
+ jLabel8.setFont(new java.awt.Font("Dialog", 1, 24));
+ jPanel1.add(jLabel8);
+
+ jLabel1.setText("Capacity:");
+ jLabel1.setFont(new java.awt.Font("Dialog", 1, 14));
+ jPanel1.add(jLabel1);
+
+ jLabelNTotalTables.setText(Integer.toString(restManager.getNTotalTables()));
+ jLabelNTotalTables.setForeground(java.awt.Color.darkGray);
+ jLabelNTotalTables.setFont(new java.awt.Font("Dialog", 1, 18));
+ jPanel1.add(jLabelNTotalTables);
+
+ jLabel4.setText("Tables");
+ jLabel4.setFont(new java.awt.Font("Dialog", 1, 14));
+ jPanel1.add(jLabel4);
+
+ jLabel3.setText(" New capacity:");
+ jLabel3.setFont(new java.awt.Font("Dialog", 1, 14));
+ jPanel1.add(jLabel3);
+
+ jTextFieldNewNTotalTables.setFont(new java.awt.Font("Dialog", 0, 18));
+ jTextFieldNewNTotalTables.setText(Integer.toString(restManager.getNTotalTables()));
+ jPanel1.add(jTextFieldNewNTotalTables);
+
+ jButtonSetNTotalTables.setFont(new java.awt.Font("Dialog", 1, 14));
+ jButtonSetNTotalTables.setText("Set");
+ jButtonSetNTotalTables.addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(java.awt.event.ActionEvent evt)
+ {
+ jButtonSetNTotalTablesActionPerformed(evt);
+ }
+ });
+
+ jPanel1.add(jButtonSetNTotalTables);
+
+ getContentPane().add(jPanel1, java.awt.BorderLayout.NORTH);
+
+ jPanelLeft.setLayout(new javax.swing.BoxLayout(jPanelLeft, javax.swing.BoxLayout.Y_AXIS));
+
+ jLabel10.setText("Mode:");
+ jPanelLeft.add(jLabel10);
+
+ jLabelDisplayMode.setText("Automatic");
+ jLabelDisplayMode.setForeground(java.awt.Color.blue);
+ jLabelDisplayMode.setFont(new java.awt.Font("Dialog", 1, 18));
+ jPanelLeft.add(jLabelDisplayMode);
+
+ jButtonChangeMode.setText("Change mode");
+ jButtonChangeMode.setPreferredSize(new java.awt.Dimension(119, 27));
+ jButtonChangeMode.setMaximumSize(new java.awt.Dimension(119, 27));
+ jButtonChangeMode.addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(java.awt.event.ActionEvent evt)
+ {
+ jButtonChangeModeActionPerformed(evt);
+ }
+ });
+
+ jPanelLeft.add(jButtonChangeMode);
+
+ jLabelResponse.setText("Response:");
+ jPanelLeft.add(jLabelResponse);
+
+ jButtonConfirm.setText("Confirm");
+ jButtonConfirm.setPreferredSize(new java.awt.Dimension(119, 27));
+ jButtonConfirm.setMaximumSize(new java.awt.Dimension(119, 27));
+ jButtonConfirm.addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(java.awt.event.ActionEvent evt)
+ {
+ jButtonConfirmActionPerformed(evt);
+ }
+ });
+
+ jPanelLeft.add(jButtonConfirm);
+
+ jButtonCancel.setText("Cancel");
+ jButtonCancel.setPreferredSize(new java.awt.Dimension(119, 27));
+ jButtonCancel.setMaximumSize(new java.awt.Dimension(119, 27));
+ jButtonCancel.addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(java.awt.event.ActionEvent evt)
+ {
+ jButtonCancelActionPerformed(evt);
+ }
+ });
+
+ jPanelLeft.add(jButtonCancel);
+
+ getContentPane().add(jPanelLeft, java.awt.BorderLayout.WEST);
+
+ jScrollPane1.setAutoscrolls(true);
+ jTextArea.setEditable(false);
+ jTextArea.setRows(10);
+ jTextArea.setMargin(new java.awt.Insets(5, 5, 5, 5));
+ jScrollPane1.setViewportView(jTextArea);
+
+ getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
+
+ pack();
+ }//GEN-END:initComponents
+
+ /**
+ * Reset event handler.
+ */
+ private void jButtonResetFieldsActionPerformed(java.awt.event.ActionEvent evt)
+ {//GEN-FIRST:event_jButtonResetFieldsActionPerformed
+ restManager.setToDefault();
+ updateFields();
+ }//GEN-LAST:event_jButtonResetFieldsActionPerformed
+
+ /**
+ * Cancel event handler.
+ */
+ private void jButtonCancelActionPerformed(java.awt.event.ActionEvent evt)
+ {//GEN-FIRST:event_jButtonCancelActionPerformed
+ if (restManager.getIsPreparationWaiting())
+ {
+ Object preparation = restManager.getPreparation();
+ try
+ {
+ restManager.setCommit(false);
+ synchronized (preparation)
+ {
+ preparation.notify();
+ }
+ }
+ catch (Exception e)
+ {
+ System.err.println("RestaurantView.jButtonCancelActionPerformed(): Unable to notify preparation.");
+ }
+ }
+ }//GEN-LAST:event_jButtonCancelActionPerformed
+
+ /**
+ * Confirm event handler.
+ */
+ private void jButtonConfirmActionPerformed(java.awt.event.ActionEvent evt)
+ {//GEN-FIRST:event_jButtonConfirmActionPerformed
+ if (restManager.getIsPreparationWaiting())
+ {
+ Object preparation = restManager.getPreparation();
+ try
+ {
+ restManager.setCommit(true);
+ synchronized (preparation)
+ {
+ preparation.notify();
+ }
+ }
+ catch (Exception e)
+ {
+ System.err.println("RestaurantView.jButtonCancelActionPerformed(): Unable to notify preparation.");
+ }
+ }
+ }//GEN-LAST:event_jButtonConfirmActionPerformed
+
+ /**
+ * ChangeMode event handler.
+ */
+ private void jButtonChangeModeActionPerformed(java.awt.event.ActionEvent evt)
+ {//GEN-FIRST:event_jButtonChangeModeActionPerformed
+ if (restManager.isAutoCommitMode())
+ {
+ restManager.setAutoCommitMode(false);
+ }
+ else
+ {
+ restManager.setAutoCommitMode(true);
+ }
+ updateFields();
+ }//GEN-LAST:event_jButtonChangeModeActionPerformed
+
+ /**
+ * Capacity change event handler.
+ */
+ private void jButtonSetNTotalTablesActionPerformed(java.awt.event.ActionEvent evt)
+ {//GEN-FIRST:event_jButtonSetNTotalTablesActionPerformed
+ String strNTables = jTextFieldNewNTotalTables.getText();
+
+ restManager.newCapacity(Integer.parseInt(strNTables));
+ int nFreeTables = restManager.getNFreeTables();
+
+ jLabelNTotalTables.setText(strNTables);
+ jLabelNFreeTables.setText(Integer.toString(nFreeTables));
+ }//GEN-LAST:event_jButtonSetNTotalTablesActionPerformed
+
+ /**
+ * Exit the application.
+ */
+ private void exitForm(java.awt.event.WindowEvent evt)
+ {//GEN-FIRST:event_exitForm
+ //System.exit(0); // disabled for embedding in application servers.
+ }//GEN-LAST:event_exitForm
+
+ /**
+ * Add regular text to the central jTextArea.
+ *
+ * @param text The String to add
+ */
+ public void addMessage(java.lang.String text)
+ {
+ jButtonConfirm.setBackground(backButtonColor);
+ jButtonCancel.setBackground(backButtonColor);
+ jTextArea.append(text + "\n");
+ jScrollPane1.getVerticalScrollBar().setValue(jScrollPane1.getVerticalScrollBar().getMaximum());
+ }
+
+ /**
+ * Add status (highlighted) text to the central jTextArea.
+ *
+ * @param text The String to add
+ */
+ public void addPrepareMessage(java.lang.String text)
+ {
+ jButtonConfirm.setBackground(java.awt.Color.red);
+ jButtonCancel.setBackground(java.awt.Color.red);
+ jTextArea.append(text + "\n");
+ jScrollPane1.getVerticalScrollBar().setValue(jScrollPane1.getVerticalScrollBar().getMaximum());
+ }
+
+
+ /**
+ * Synchronise the GUI with the underlying state.
+ */
+ public void updateFields()
+ {
+ jLabelNTotalTables.setText(Integer.toString(restManager.getNTotalTables()));
+ jTextFieldNewNTotalTables.setText(Integer.toString(restManager.getNTotalTables()));
+ jLabelNPreparedTables.setText(Integer.toString(restManager.getNPreparedTables()));
+ jLabelNConfirmedTables.setText(Integer.toString(restManager.getNCommittedTables()));
+ jLabelNFreeTables.setText(Integer.toString(restManager.getNFreeTables()));
+ jLabelNBookedTables.setText(Integer.toString(restManager.getNBookedTables()));
+
+ //update fields related to interactive mode.
+ if (restManager.isAutoCommitMode())
+ {
+ jLabelResponse.setVisible(false);
+ jButtonConfirm.setVisible(false);
+ jButtonCancel.setVisible(false);
+ jLabelDisplayMode.setText("automatic");
+ }
+ else
+ {
+ jLabelResponse.setVisible(true);
+ jButtonConfirm.setVisible(true);
+ jButtonCancel.setVisible(true);
+ jLabelDisplayMode.setText("interactive");
+ }
+ }
+
+ /**
+ * Allow use of a singleton model for web services demo.
+ */
+ public static RestaurantView getSingletonInstance()
+ {
+ if (singletonInstance == null)
+ {
+ singletonInstance = new RestaurantView(RestaurantManager.getSingletonInstance());
+ }
+
+ singletonInstance.show();
+ return singletonInstance;
+ }
+
+ /**
+ * A singleton instance of this class.
+ */
+ private static RestaurantView singletonInstance;
+
+
+ // Variables declaration - automatically generated - do not modify
+
+ private javax.swing.JPanel jPanel2;
+ private javax.swing.JLabel jLabel5;
+ private javax.swing.JLabel jLabelNBookedTables;
+ private javax.swing.JLabel jLabel9;
+ private javax.swing.JLabel jLabelNPreparedTables;
+ private javax.swing.JLabel jLabel2;
+ private javax.swing.JLabel jLabelNConfirmedTables;
+ private javax.swing.JLabel jLabel6;
+ private javax.swing.JLabel jLabelNFreeTables;
+ private javax.swing.JLabel jLabel7;
+ private javax.swing.JButton jButtonResetFields;
+ private javax.swing.JPanel jPanel1;
+ private javax.swing.JLabel jLabel8;
+ private javax.swing.JLabel jLabel1;
+ private javax.swing.JLabel jLabelNTotalTables;
+ private javax.swing.JLabel jLabel4;
+ private javax.swing.JLabel jLabel3;
+ private javax.swing.JTextField jTextFieldNewNTotalTables;
+ private javax.swing.JButton jButtonSetNTotalTables;
+ private javax.swing.JPanel jPanelLeft;
+ private javax.swing.JLabel jLabel10;
+ private javax.swing.JLabel jLabelDisplayMode;
+ private javax.swing.JButton jButtonChangeMode;
+ private javax.swing.JLabel jLabelResponse;
+ private javax.swing.JButton jButtonConfirm;
+ private javax.swing.JButton jButtonCancel;
+ private javax.swing.JScrollPane jScrollPane1;
+ private javax.swing.JTextArea jTextArea;
+
+ // End of automatically generated variables declarations
+
+ /**
+ * The {@link RestaurantManager} instance this view is bound to.
+ */
+ private RestaurantManager restManager;
+
+ /**
+ * The current color of the back button.
+ */
+ private java.awt.Color backButtonColor;
+}
More information about the jboss-svn-commits
mailing list