diff --git a/.awestruct_ignore b/.awestruct_ignore
deleted file mode 100644
index 6d2bf4f..0000000
--- a/.awestruct_ignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Gemfile*
-Rakefile
-spec
diff --git a/.gitignore b/.gitignore
index ff2d19a..8c4ee80 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,17 +1,10 @@
-_deploy/
-_site/
-_tmp/
-.sass-cache
-*.swp
-.project
-*.bak
-.rvmrc
-.ruby-version
+.awestruct/
+.bundle/
+.github-auth
.ruby-gemset
-TODO
-.awestruct
-Guardfile
+.ruby-version
+.sass-cache/
Gemfile.lock
-.*-auth
-*~
-.bundle
+_site/
+_tmp/
+
diff --git a/Gemfile b/Gemfile
deleted file mode 100644
index 5414607..0000000
--- a/Gemfile
+++ /dev/null
@@ -1,54 +0,0 @@
-# This is a bundler configuration file (http://gembundler.com).
-#
-# Bundler makes it easy to make sure that your application has the dependencies
-# it needs to start up and run without errors. It locates and installs the gems
-# and their dependencies listed in this file, Gemfile.
-#
-# After installing any needed gems to your system, bundler writes a snapshot of
-# all of the gems and versions that it installed to Gemfile.lock.
-#
-# Gemfile.lock makes your application a single package of both your own code
-# and the third-party code so it remains stable in a known working state.
-#
-# To get started, first make sure you've installed bundler using gem install
-# (or jgem install for JRuby):
-#
-# gem install bundler
-#
-# Then, use bundler to fetch the remaining libraries you'll need:
-#
-# bundle install
-#
-# Now, you're ready to start developing!
-#
-# awestruct -s
-#
-# Though if you want to be strict, you should execute in a bundle sandbox:
-#
-# bundle exec awestruct -s
-
-source "https://rubygems.org"
-
-ruby '1.9.3', :engine => 'jruby', :engine_version => '1.7.17'
-
-gem "awestruct", "0.5.5"
-
-gem "slim"
-gem "kramdown"
-gem "asciidoctor"
-gem "uglifier"
-gem "htmlcompressor"
-gem "coffee-script"
-
-gem "rest-client"
-gem "hpricot"
-gem "git"
-
-gem "bouncy-castle-java", :platforms => :jruby
-gem "therubyrhino", :platforms => :jruby
-gem "therubyracer", "0.10.1", :platforms => :ruby
-gem "jruby-openssl", :platforms => :jruby
-gem "rb-inotify", :platforms => [:ruby, :jruby]
-
-gem "puma"
-gem "rspec", ">= 2.9"
diff --git a/README.asciidoc b/README.asciidoc
deleted file mode 100644
index a69fc3c..0000000
--- a/README.asciidoc
+++ /dev/null
@@ -1,121 +0,0 @@
-== JavaEE Samples Website
-
-=== How to setup the environment
-
-The website rely on Awestruct to generate the dynamic content, and Awestruct is written in Ruby. So the first step is to install Ruby. We *highly* recommend using http://rvm.io/[RVM] to control your Ruby environment as it makes the whole thing a lot easier.
-
-For Linux users all you need to do to install RVM is to run the following command in your terminal:
-
-[source,console]
-----
-curl -sSL https://get.rvm.io | bash
-----
-
-NOTE: For Mac or Windows users, please see the http://rvm.io/rvm/install[RVM Install Guide]
-
-The website rely on running some Java code, e.g. JavaDoc, so we need to use JRuby. Next is to install JRuby in your RVM environment. In your terminal execute the following command:
-
-[source,console]
-----
-rvm install jruby-1.7.9
-----
-
-NOTE: If the install aborts with messages regarding permission errors, try re executing with root permissions; "sudo rvm.."
-
-NOTE: If the rvm command can't be found, try to restart the terminal.
-
-NOTE: The site requires JRUBY to use JDK 1.8.0. You can set this by using JAVA_HOME.
-
-That should be it on the ruby environment side for now. Next we need to get the website repository by cloning the Git repository:
-
-[source,console]
-----
-git clone git@github.com:javaee-samples/javaee-samples.github.io.git
-----
-
-Next we need to link the repository to a RVM configuration.
-
-Create two new files under the repository root, but first remember to go into the root folder:
-
-[source,console]
-----
-cd javaee-samples.github.io
-----
-
-NOTE: On first entry you will be presented with a message from RVM telling you it read the environment from the Gemfile. Doing the next steps will remove this.
-
-Create file *.ruby-gemset* in your favorite editor and add this as content:
-[source,content]
-----
-javaee-samples
-----
-
-Create file *.ruby-version* in your favorite editor and add this as content:
-[source,ruby]
-----
-jruby-1.7.9
-----
-
-At this point you can allow RVM to pickup the new environment settings by leaving the folder and re-entering.
-
-[source,console]
-----
-cd .. & cd javaee-samples.github.io
-----
-
-Run the next command to verify that the environment is picked up correctly:
-
-[source,console]
-----
-rvm info
-----
-
-The first line should tell you something like *jruby-1.7.9@javaee-samples*.
-
-Then on to the Awestruct bits!
-
-First we need to pull in all the dependencies. Execute the following in the terminal:
-
-[source,console]
-----
-bundle install
-----
-
-NOTE: If you get an error telling you bundle could not be found, execute *gem install bundler* and reexecute the previous step
-
-NOTE: If you get an error telling you _libxml2_ is missing, please visit http://nokogiri.org/tutorials/installing_nokogiri.html[Installing Nokogiri]. Additional development packages for *libxslt* and *libxml2* are required. Depending on system, install dependencies (for Ubuntu execute *sudo apt-get install libxslt-dev libxml2-dev*) and reexecute the previous step
-
-NOTE: If you get an error telling you _no such file to load -- mkmf (LoadError)_, *rvm install ruby-1.9.3-dev* and reexecute the previous step
-
-
-The site rely on fetching data from Github so we need to give it a *Personal Access Tokens* to use.
-Create a file called *.github-auth* in the javaee-samples.github.io folder and add the Access token generated from the https://github.com/settings/applications[Gihub settings page].
-
-That's it!
-
-=== How to generate the site
-
-The website not only requires Java, but it also requires the JDK. More specifically tools.jar on classpath to call JavaDoc.
-
-You can either set JAVA_HOME to point to your JDK installation as a global environment variable if it's not already set, or include it on the command line:
-
-[source,console]
-----
-JAVA_HOME=/usr/lib/jvm/java-1.7.0/ bundle exec awestruct --force -d -P production
-----
-
-You can now point your browser to http://localhost:4242 to see the result.
-
-
-=== How to deploy to production
-
-When deploying to production you execute a similar command as when generating:
-
-[source,console]
-----
-JAVA_HOME=/usr/lib/jvm/java-1.7.0/ bundle exec awestruct --deploy -P production
-----
-
-WARNING: --deploy will only deploy what is currently in the _site folder. Remember to generate it first!
-
-WARNING: Remember to have no uncommitted changes when you execute this command, or else it will complain.
diff --git a/README/index.html b/README/index.html
new file mode 100644
index 0000000..4aa8970
--- /dev/null
+++ b/README/index.html
@@ -0,0 +1,670 @@
+
+
+
+
+
+
+
+JavaEE Samples Website
+
+
+
+
+
+
+
+
+
JavaEE Samples Website
+
+
+
How to setup the environment
+
+
The website rely on Awestruct to generate the dynamic content, and Awestruct is written in Ruby. So the first step is to install Ruby. We highly recommend using RVM to control your Ruby environment as it makes the whole thing a lot easier.
+
+
+
For Linux users all you need to do to install RVM is to run the following command in your terminal:
The website rely on running some Java code, e.g. JavaDoc, so we need to use JRuby. Next is to install JRuby in your RVM environment. In your terminal execute the following command:
+
+
+
+
rvm install jruby-1.7.9
+
+
+
+
+
+
+
Note
+
+
+If the install aborts with messages regarding permission errors, try re executing with root permissions; "sudo rvm.."
+
+
+
+
+
+
+
+
+
Note
+
+
+If the rvm command can’t be found, try to restart the terminal.
+
+
+
+
+
+
+
+
+
Note
+
+
+The site requires JRUBY to use JDK 1.8.0. You can set this by using JAVA_HOME.
+
+
+
+
+
+
That should be it on the ruby environment side for now. Next we need to get the website repository by cloning the Git repository:
Next we need to link the repository to a RVM configuration.
+
+
+
Create two new files under the repository root, but first remember to go into the root folder:
+
+
+
+
cd javaee-samples.github.io
+
+
+
+
+
+
+
Note
+
+
+On first entry you will be presented with a message from RVM telling you it read the environment from the Gemfile. Doing the next steps will remove this.
+
+
+
+
+
+
Create file .ruby-gemset in your favorite editor and add this as content:
+
+
+
+
javaee-samples
+
+
+
+
Create file .ruby-version in your favorite editor and add this as content:
+
+
+
+
jruby-1.7.9
+
+
+
+
At this point you can allow RVM to pickup the new environment settings by leaving the folder and re-entering.
+
+
+
+
cd .. & cd javaee-samples.github.io
+
+
+
+
Run the next command to verify that the environment is picked up correctly:
+
+
+
+
rvm info
+
+
+
+
The first line should tell you something like jruby-1.7.9@javaee-samples.
+
+
+
Then on to the Awestruct bits!
+
+
+
First we need to pull in all the dependencies. Execute the following in the terminal:
+
+
+
+
bundle install
+
+
+
+
+
+
+
Note
+
+
+If you get an error telling you bundle could not be found, execute gem install bundler and reexecute the previous step
+
+
+
+
+
+
+
+
+
Note
+
+
+If you get an error telling you libxml2 is missing, please visit Installing Nokogiri. Additional development packages for libxslt and libxml2 are required. Depending on system, install dependencies (for Ubuntu execute sudo apt-get install libxslt-dev libxml2-dev) and reexecute the previous step
+
+
+
+
+
+
+
+
+
Note
+
+
+If you get an error telling you no such file to load — mkmf (LoadError), rvm install ruby-1.9.3-dev and reexecute the previous step
+
+
+
+
+
+
The site rely on fetching data from Github so we need to give it a Personal Access Tokens to use.
+Create a file called .github-auth in the javaee-samples.github.io folder and add the Access token generated from the Gihub settings page.
+
+
+
That’s it!
+
+
+
+
How to generate the site
+
+
The website not only requires Java, but it also requires the JDK. More specifically tools.jar on classpath to call JavaDoc.
+
+
+
You can either set JAVA_HOME to point to your JDK installation as a global environment variable if it’s not already set, or include it on the command line:
+
+
+
+
JAVA_HOME=/usr/lib/jvm/java-1.7.0/ bundle exec awestruct --force -d -P production
Describe the method(s) createDeployment, testSubmitWithRunnableDefault, testSubmitWithCallableDefault, testInvokeAllWithCallableDefault, testInvokeAnyWithCallableDefault in test ExecutorJNDITest.
Describe the method(s) createDeployment, testSubmitWithRunnableDefault, testSubmitWithCallableDefault, testInvokeAllWithCallableDefault, testInvokeAnyWithCallableDefault, testSubmitWithRunnableNoName, testSubmitWithCallableNoName, testInvokeAllWithCallableNoName, testInvokeAnyWithCallableNoName, testSubmitWithRunnableFromWebXML, testSubmitWithCallableFromWebXML, testInvokeAllWithCallableFromWebXML, testInvokeAnyWithCallableFromWebXML, testSubmitWithListener, testSubmitWithTransaction, testSubmitWithEJB in test ExecutorInjectTest.
Describe the method(s) createDeployment, testInvalidRequest, testValidRequest, testValidPostRequest, testInvalidPostRequest, testInvalidPostRequestLesserAge, testInvalidPostRequestGreaterAge in test MyResourceTest.
Describe the method(s) createDeployment, shouldPostOctetStreamContentAsInputStream, shouldNotPostImagePngContentAsInputStream, shouldPostOctetStreamContentAsFile, shouldPostImagePngContentAsFile in test MyResourceTest.
Describe the method(s) createDeployment, shouldPassNameValidation, shouldFailAtFirstNameSizeValidation, shouldFailAtFirstNameNullValidation, shouldFailAtLastNameSizeValidation, shouldFailAtLastNameNullValidation, shouldFailAtEmailAtSymbolValidation, shouldFailAtEmailComDomainValidation in test NameAddResourceTest.
Describe the method(s) createDeployment, testGetWithCorrectCredentials, testGetSubResourceWithCorrectCredentials, testGetWithIncorrectCredentials, testPost, testPut in test MyResourceTest.
Describe the method(s) createDeployment, testLockingOptimisticUpdateAndRead, testLockingOptimisticReadAndUpdate, testLockingOptimisticDelete in test LockingOptimisticTest.
Describe the method(s) deploy, should_required_work, should_requiresNew_work, should_mandatory_throw_exception, should_supports_work, should_notSupported_work, should_never_work in test MyTransactionalTxTypeBeanTest.
Describe the method(s) deploy, should_withTransaction_have_only_one_instance_injected, should_withTransaction_called_twice_have_same_instances_injected, should_withoutTransaction_NOT_fail in test MyTransactionalBeanWithUserTransactionTest.
Describe the method(s) deploy, should_withTransaction_have_only_one_instance_injected, should_withTransaction_called_twice_have_different_instances_injected, should_withoutTransaction_fail in test MyTransactionalBeanTest.
Describe the method(s) createDeployment, filtered_servlet_should_return_enhanced_foobar_text, standard_servlet_should_return_simple_text in test FilterServletTest.
Describe the method(s) createDeployment, testGetWithCorrectCredentials, testGetWithIncorrectCredentials, testPostWithCorrectCredentials, testPostWithIncorrectCredentials in test SecureServletTest.
Describe the method(s) createDeployment, testPostWithNoCredentials, testPostWithCorrectCredentials, testPostWithIncorrectCredentials in test SecureServletTest.
Describe the method(s) deployment, constructorViolationsWhenNullParameters, constructorViolationsWhenNotNullParameters in test ConstructorParametersConstraintsTest.
Describe the method(s) deployment, methodSizeTooLong, methodSizeOk, showDateFromPast, showDateFromFuture, multipleParametersWithEmptyList, multipleParametersNullSecondParameter, multipleParametersWithCorrectValues in test MethodParametersConstraintsTest.
Describe the method(s) createDeployment, testTextEndpoint, testEndpointByteBuffer, testEndpointByteArray, testEndpointInputStream in test MyEndpointTest.
Describe the method(s) createDeployment, setupDB_ARQ1077_Workaround_2, setupDB_ARQ1077_Workaround_3, addNewNote, onenterContainsNotesFromDB, removeNote in test NoteResourceImplTest.
Describe the method(s) createDeployment, testEntityGraphMovieDefault, testEntityGraphMovieWithActors, testEntityGraphMovieWithActorsAndAwards, testEntityGraphProgrammatically, testEntityGraphWithNamedParameters, testEntityGraphWithNamedParametersList in test EntityGraphTest.
Describe the method(s) deploy, should_have_7_employees, should_have_1_more_employee_after_checked_exception, should_not_have_1_more_employee_after_runtime_exception in test EmployeeBeanTest.
Describe the method(s) createDeployment, testProtectedPageNotLoggedin, testProtectedPageLoggedin in test BasicAuthenticationProtectedTest.
Describe the method(s) createDeployment, testPublicPageNotLoggedin, testPublicPageLoggedin, testPublicPageNotRememberLogin in test BasicAuthenticationPublicTest.
+
\ No newline at end of file
diff --git a/contributors.html.slim b/contributors.html.slim
deleted file mode 100644
index 8231494..0000000
--- a/contributors.html.slim
+++ /dev/null
@@ -1,58 +0,0 @@
----
-layout: default
-title: Contributors
----
-header
- .row
- .large-9.columns
- h1 ="#{page.title} #{site.identities.contributors().size}"
-
- .large-3.columns
- .action.right
- a.button.radius.round.success href="#{site.base_url}/contribute"
- |Contribute?
- i.fi-wrench
-
-.row
- .large-12.columns
- ul.contributors.row
- - site.identities.contributors().sort_by{|c| c.commits * Order::DESC}.each do |contributor|
- li.large-4.columns itemscope="" itemtype="http://data-vocabulary.org/Person"
- div.reveal-modal.hide id="#{contributor.github_id}" data-reveal=""
- .modal-header
- a.close-reveal-modal
- i.fi-remove
- h3
- =>contributor.name
- small =contributor.location
- .modal-body.clearfix
- img.thumbnail src="#{contributor.avatar_url(60)}" alt="#{contributor.name}" style='float: left; margin: 2px 10px 3px 0;'
- - if !contributor.bio.nil?
- markdown:
- #{contributor.bio}
- - else
- | No bio available.
- .photo
- img src="#{contributor.avatar_url(140)}" alt="#{contributor.name}" data-reveal-id="#{contributor.github_id}" itemprop="photo"
- ul
- li
- - if contributor.blog
- a href="#{contributor.blog}" itemprop="url" Blog
- - else
- span Blog
- li
- - if !contributor.twitter.nil?
- a href="#{contributor.twitter.url}" itemprop="url" Twitter
- - else
- span Twitter
- li
- a href="#{contributor.github.profile_url}" itemprop="url" GitHub
- meta itemprop="role" content="contributor"
- h5 itemprop="name"=contributor.name
- strong itemprop="affiliation"=contributor.company
- em itemscope="" itemprop="address" itemtype="http://www.data-vocabulary.org/Address"
- span itemprop="locality" =contributor.location
-.row
- .large-12.columns
- strong Is your information incomplete? Is your profile picture missing?
- p.clearfix This page mirrors information from your public github and gravatar profiles. To update your information, fill in your name, location and bio in your github account. To get a photo or avatar to display, upload an image to the gravatar account that's linked to your github account. If you don't want your information on this page, please let us know and we'll honor your request.
diff --git a/contributors/index.html b/contributors/index.html
new file mode 100644
index 0000000..636a3c4
--- /dev/null
+++ b/contributors/index.html
@@ -0,0 +1,16 @@
+Contributors
Software engineer, J2EE enthusiast , open source programming and all about open source.Tech lead in European Parliament on day time ... hacking with J2EE for a new platform
Is your information incomplete? Is your profile picture missing?
This page mirrors information from your public github and gravatar profiles. To update your information, fill in your name, location and bio in your github account. To get a photo or avatar to display, upload an image to the gravatar account that's linked to your github account. If you don't want your information on this page, please let us know and we'll honor your request.
+
\ No newline at end of file
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..3127af9
--- /dev/null
+++ b/index.html
@@ -0,0 +1,13 @@
+Navigate your way through EE via Tests
";
- })
- .get().join('');
-
- $customList.html('')
- .append(liHtml);
-
- } // endif $customSelect.length === 0
-
- self.assign_id($this, $customSelect);
- $customSelect.toggleClass('disabled', $this.is(':disabled'));
- $listItems = $customList.find('li');
-
- // cache list length
- self.cache[$customSelect.data('id')] = $listItems.length;
-
- $options.each(function (index) {
- if (this.selected) {
- $listItems.eq(index).addClass('selected');
-
- if ($currentSelect) {
- $currentSelect.html($(this).html());
- }
- }
- if ($(this).is(':disabled')) {
- $listItems.eq(index).addClass('disabled');
- }
- });
-
- //
- // If we're not specifying a predetermined form size.
- //
- if (!$customSelect.is('.small, .medium, .large, .expand')) {
-
- // ------------------------------------------------------------------------------------
- // This is a work-around for when elements are contained within hidden parents.
- // For example, when custom-form elements are inside of a hidden reveal modal.
- //
- // We need to display the current custom list element as well as hidden parent elements
- // in order to properly calculate the list item element's width property.
- // -------------------------------------------------------------------------------------
-
- $customSelect.addClass('open');
- //
- // Quickly, display all parent elements.
- // This should help us calcualate the width of the list item's within the drop down.
- //
- var self = Foundation.libs.forms;
- self.hidden_fix.adjust($customList);
-
- maxWidth = (self.outerWidth($listItems) > maxWidth) ? self.outerWidth($listItems) : maxWidth;
-
- Foundation.libs.forms.hidden_fix.reset();
-
- $customSelect.removeClass('open');
-
- } // endif
-
- },
-
- assign_id: function ($select, $customSelect) {
- var id = [+new Date(), Foundation.random_str(5)].join('-');
- $select.attr('data-id', id);
- $customSelect.attr('data-id', id);
- },
-
- refresh_custom_select: function ($select, force_refresh) {
- var self = this;
- var maxWidth = 0,
- $customSelect = $select.next(),
- $options = $select.find('option'),
- $customList = $customSelect.find('ul'),
- $listItems = $customSelect.find('li');
-
- if ($options.length !== this.cache[$customSelect.data('id')] || force_refresh) {
- $customList.html('');
-
- // rebuild and re-populate all at once
- var customSelectHtml = '';
- $options.each(function () {
- var $this = $(this), thisHtml = $this.html(), thisSelected = this.selected;
- customSelectHtml += '
' + thisHtml + '
';
- if (thisSelected) {
- $customSelect.find('.current').html(thisHtml);
- }
- });
-
- $customList.html(customSelectHtml);
-
- // fix width
- $customSelect.removeAttr('style');
- $customList.removeAttr('style');
- $customSelect.find('li').each(function () {
- $customSelect.addClass('open');
- if (self.outerWidth($(this)) > maxWidth) {
- maxWidth = self.outerWidth($(this));
- }
- $customSelect.removeClass('open');
- });
-
- $listItems = $customSelect.find('li');
- // cache list length
- this.cache[$customSelect.data('id')] = $listItems.length;
- }
- },
-
- refresh_custom_selection: function ($select) {
- var selectedValue = $('option:selected', $select).text();
- $('a.current', $select.next()).text(selectedValue);
- },
-
- toggle_checkbox: function ($element) {
- var $input = $element.prev(),
- input = $input[0];
-
- if (false === $input.is(':disabled')) {
- input.checked = ((input.checked) ? false : true);
- $element.toggleClass('checked');
-
- $input.trigger('change');
- }
- },
-
- toggle_radio: function ($element) {
- var $input = $element.prev(),
- $form = $input.closest('form.custom'),
- input = $input[0];
-
- if (false === $input.is(':disabled')) {
- $form.find('input[type="radio"][name="' + this.escape($input.attr('name')) + '"]')
- .next().not($element).removeClass('checked');
-
- if (!$element.hasClass('checked')) {
- $element.toggleClass('checked');
- }
-
- input.checked = $element.hasClass('checked');
-
- $input.trigger('change');
- }
- },
-
- escape: function (text) {
- if (!text) return '';
- return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
- },
-
- hidden_fix: {
- /**
- * Sets all hidden parent elements and self to visibile.
- *
- * @method adjust
- * @param {jQuery Object} $child
- */
-
- // We'll use this to temporarily store style properties.
- tmp: [],
-
- // We'll use this to set hidden parent elements.
- hidden: null,
-
- adjust: function ($child) {
- // Internal reference.
- var _self = this;
-
- // Set all hidden parent elements, including this element.
- _self.hidden = $child.parents();
- _self.hidden = _self.hidden.add($child).filter(":hidden");
-
- // Loop through all hidden elements.
- _self.hidden.each(function () {
-
- // Cache the element.
- var $elem = $(this);
-
- // Store the style attribute.
- // Undefined if element doesn't have a style attribute.
- _self.tmp.push($elem.attr('style'));
-
- // Set the element's display property to block,
- // but ensure it's visibility is hidden.
- $elem.css({
- 'visibility': 'hidden',
- 'display': 'block'
- });
- });
-
- }, // end adjust
-
- /**
- * Resets the elements previous state.
- *
- * @method reset
- */
- reset: function () {
- // Internal reference.
- var _self = this;
- // Loop through our hidden element collection.
- _self.hidden.each(function (i) {
- // Cache this element.
- var $elem = $(this),
- _tmp = _self.tmp[i]; // Get the stored 'style' value for this element.
-
- // If the stored value is undefined.
- if (_tmp === undefined)
- // Remove the style attribute.
- $elem.removeAttr('style');
- else
- // Otherwise, reset the element style attribute.
- $elem.attr('style', _tmp);
- });
- // Reset the tmp array.
- _self.tmp = [];
- // Reset the hidden elements variable.
- _self.hidden = null;
-
- } // end reset
- },
-
- off: function () {
- $(this.scope).off('.fndtn.forms');
- },
-
- reflow : function () {}
- };
-
- var getFirstPrevSibling = function($el, selector) {
- var $el = $el.prev();
- while ($el.length) {
- if ($el.is(selector)) return $el;
- $el = $el.prev();
- }
- return $();
- };
-}(Foundation.zj, this, this.document));
+!function($,window,document,undefined){"use strict";Foundation.libs.forms={name:"forms",version:"4.3.2",cache:{},settings:{disable_class:"no-custom",last_combo:null},init:function(scope,method,options){return"object"==typeof method&&$.extend(!0,this.settings,method),"string"!=typeof method?(this.settings.init||this.events(),this.assemble(),this.settings.init):this[method].call(this,options)},assemble:function(){var forms=this;$('form.custom input[type="radio"],[type="checkbox"]',$(this.scope)).not('[data-customforms="disabled"]').not("."+this.settings.disable_class).each(function(idx,sel){forms.set_custom_markup(sel)}).change(function(){forms.set_custom_markup(this)}),$("form.custom select",$(this.scope)).not('[data-customforms="disabled"]').not("."+this.settings.disable_class).not("[multiple=multiple]").each(this.append_custom_select)},events:function(){var self=this;$(this.scope).on("click.fndtn.forms","form.custom span.custom.checkbox",function(e){e.preventDefault(),e.stopPropagation(),self.toggle_checkbox($(this))}).on("click.fndtn.forms","form.custom span.custom.radio",function(e){e.preventDefault(),e.stopPropagation(),self.toggle_radio($(this))}).on("change.fndtn.forms","form.custom select",function(e,force_refresh){$(this).is('[data-customforms="disabled"]')||self.refresh_custom_select($(this),force_refresh)}).on("click.fndtn.forms","form.custom label",function(e){if($(e.target).is("label")){var $customCheckbox,$customRadio,$associatedElement=$("#"+self.escape($(this).attr("for"))).not('[data-customforms="disabled"]');0!==$associatedElement.length&&("checkbox"===$associatedElement.attr("type")?(e.preventDefault(),$customCheckbox=$(this).find("span.custom.checkbox"),0===$customCheckbox.length&&($customCheckbox=$associatedElement.add(this).siblings("span.custom.checkbox").first()),self.toggle_checkbox($customCheckbox)):"radio"===$associatedElement.attr("type")&&(e.preventDefault(),$customRadio=$(this).find("span.custom.radio"),0===$customRadio.length&&($customRadio=$associatedElement.add(this).siblings("span.custom.radio").first()),self.toggle_radio($customRadio)))}}).on("mousedown.fndtn.forms","form.custom div.custom.dropdown",function(){return!1}).on("click.fndtn.forms","form.custom div.custom.dropdown a.current, form.custom div.custom.dropdown a.selector",function(e){var $this=$(this),$dropdown=$this.closest("div.custom.dropdown"),$select=getFirstPrevSibling($dropdown,"select");return $dropdown.hasClass("open")||$(self.scope).trigger("click"),e.preventDefault(),!1===$select.is(":disabled")?($dropdown.toggleClass("open"),$dropdown.hasClass("open")?$(self.scope).on("click.fndtn.forms.customdropdown",function(){$dropdown.removeClass("open"),$(self.scope).off(".fndtn.forms.customdropdown")}):$(self.scope).on(".fndtn.forms.customdropdown"),!1):void 0}).on("click.fndtn.forms touchend.fndtn.forms","form.custom div.custom.dropdown li",function(e){var $this=$(this),$customDropdown=$this.closest("div.custom.dropdown"),$select=getFirstPrevSibling($customDropdown,"select"),selectedIndex=0;if(e.preventDefault(),e.stopPropagation(),!$(this).hasClass("disabled")){$("div.dropdown").not($customDropdown).removeClass("open");var $oldThis=$this.closest("ul").find("li.selected");if($oldThis.removeClass("selected"),$this.addClass("selected"),$customDropdown.removeClass("open").find("a.current").text($this.text()),$this.closest("ul").find("li").each(function(index){$this[0]===this&&(selectedIndex=index)}),$select[0].selectedIndex=selectedIndex,$select.data("prevalue",$oldThis.html()),"undefined"!=typeof document.createEvent){var event=document.createEvent("HTMLEvents");event.initEvent("change",!0,!0),$select[0].dispatchEvent(event)}else $select[0].fireEvent("onchange")}}),$(window).on("keydown",function(e){var self=(document.activeElement,Foundation.libs.forms),dropdown=$(".custom.dropdown"),select=getFirstPrevSibling(dropdown,"select"),inputs=$("input,select,textarea,button");if(dropdown.length>0&&dropdown.hasClass("open")){if(e.preventDefault(),9===e.which&&($(inputs[$(inputs).index(select)+1]).focus(),dropdown.removeClass("open")),13===e.which&&dropdown.find("li.selected").trigger("click"),27===e.which&&dropdown.removeClass("open"),e.which>=65&&e.which<=90){var next=self.go_to(dropdown,e.which),current=dropdown.find("li.selected");next&&(current.removeClass("selected"),self.scrollTo(next.addClass("selected"),300))}if(38===e.which){var current=dropdown.find("li.selected"),prev=current.prev(":not(.disabled)");prev.length>0&&(prev.parent()[0].scrollTop=prev.parent().scrollTop()-self.outerHeight(prev),current.removeClass("selected"),prev.addClass("selected"))}else if(40===e.which){var current=dropdown.find("li.selected"),next=current.next(":not(.disabled)");next.length>0&&(next.parent()[0].scrollTop=next.parent().scrollTop()+self.outerHeight(next),current.removeClass("selected"),next.addClass("selected"))}}}),$(window).on("keyup",function(){var focus=document.activeElement,dropdown=$(".custom.dropdown");focus===dropdown.find(".current")[0]&&dropdown.find(".selector").focus().click()}),this.settings.init=!0},go_to:function(dropdown,character){var lis=dropdown.find("li"),count=lis.length;if(count>0)for(var i=0;count>i;i++){var first_letter=lis.eq(i).text().charAt(0).toLowerCase();if(first_letter===String.fromCharCode(character).toLowerCase())return lis.eq(i)}},scrollTo:function(el,duration){if(!(0>duration)){var parent=el.parent(),li_height=this.outerHeight(el),difference=li_height*el.index()-parent.scrollTop(),perTick=difference/duration*10;this.scrollToTimerCache=setTimeout(function(){isNaN(parseInt(perTick,10))||(parent[0].scrollTop=parent.scrollTop()+perTick,this.scrollTo(el,duration-10))}.bind(this),10)}},set_custom_markup:function(sel){var $this=$(sel),type=$this.attr("type"),$span=$this.next("span.custom."+type);$this.parent().hasClass("switch")||$this.addClass("hidden-field"),0===$span.length&&($span=$('').insertAfter($this)),$span.toggleClass("checked",$this.is(":checked")),$span.toggleClass("disabled",$this.is(":disabled"))},append_custom_select:function(idx,sel){var $listItems,self=Foundation.libs.forms,$this=$(sel),$customSelect=$this.next("div.custom.dropdown"),$customList=$customSelect.find("ul"),$selector=($customSelect.find(".current"),$customSelect.find(".selector")),$options=$this.find("option"),$selectedOption=$options.filter(":selected"),copyClasses=$this.attr("class")?$this.attr("class").split(" "):[],maxWidth=0,liHtml="",$currentSelect=!1;if(0===$customSelect.length){var customSelectSize=$this.hasClass("small")?"small":$this.hasClass("medium")?"medium":$this.hasClass("large")?"large":$this.hasClass("expand")?"expand":"";$customSelect=$('
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/batch-listeners/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=BatchListenersTest
Batch Listeners - Applying Listeners to Job, Chunk, Step, Reader, Processor and Writer
@Named()
+public class MyJobListener extends AbstractJobListener {
+
+ public MyJobListener();
+
+ @Override()
+ public void beforeJob();
+
+ @Override()
+ public void afterJob();
+}
+
+
+
+
Allows you to execute code before and after the job execution. Useful to setup and clear resources needed by the job.
+
+
+
The Step Listener:
+
+
+
+
@Named()
+public class MyStepListener extends AbstractStepListener {
+
+ public MyStepListener();
+
+ @Override()
+ public void beforeStep() throws Exception;
+
+ @Override()
+ public void afterStep() throws Exception;
+}
+
+
+
+
Allows you to execute code before and after the step execution. Useful to setup and clear resources needed by the
+step.
+
+
+
The Chunk Listener:
+
+
+
+
@Named()
+public class MyChunkListener extends AbstractChunkListener {
+
+ public MyChunkListener();
+
+ @Override()
+ public void beforeChunk() throws Exception;
+
+ @Override()
+ public void afterChunk() throws Exception;
+}
+
+
+
+
Allows you to execute code before and after the chunk processing. Useful to setup and clear resources needed by the
+chunk.
+
+
+
The Read Listener:
+
+
+
+
@Named()
+public class MyItemReadListener extends AbstractItemReadListener {
+
+ public MyItemReadListener();
+
+ @Override()
+ public void beforeRead() throws Exception;
+
+ @Override()
+ public void afterRead(Object item) throws Exception;
+
+ @Override()
+ public void onReadError(Exception ex) throws Exception;
+}
+
+
+
+
Allows you to execute code before and after reading a element as well if an error occurs reading that element. Useful
+to setup additional resources and add additional information to the object reading. You can also provide some logic
+to treat a failed object read.
+
+
+
The Processor Listener:
+
+
+
+
@Named()
+public class MyItemProcessorListener extends AbstractItemProcessListener {
+
+ public MyItemProcessorListener();
+
+ @Override()
+ public void beforeProcess(Object item) throws Exception;
+
+ @Override()
+ public void afterProcess(Object item, Object result) throws Exception;
+
+ @Override()
+ public void onProcessError(Object item, Exception ex) throws Exception;
+}
+
+
+
+
Allows you to execute code before and after processing a element as well if an error occurs processing that element.
+Useful to setup additional resources and add additional information to the object processing. You can also provide
+some logic to treat a failed object processing.
+
+
+
The Writer Listener:
+
+
+
+
@Named()
+public class MyItemWriteListener extends AbstractItemWriteListener {
+
+ public MyItemWriteListener();
+
+ @Override()
+ public void beforeWrite(List items) throws Exception;
+
+ @Override()
+ public void afterWrite(List items) throws Exception;
+
+ @Override()
+ public void onWriteError(List items, Exception ex) throws Exception;
+}
+
+
+
+
Allows you to execute code before and after writing a element as well if an error occurs writing that element.
+Useful to setup additional resources and add additional information to the object writing. You can also provide
+some logic to treat a failed object write.
+
+
+
The listeners element can be used at the step level or the job level to define which listeners to run for each
+batch processing event.
In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test
+expected behaviour we need to query the Metric object available in the step execution and
+also verify if the listeners were executed correctly via a CountDownLatch wait.
+
+
+
The batch process itself will read and process 10 elements from numbers 1 to 10, but only write the odd
+elements.
+
+
+
+
+
Each listener will decrement the total value of the CountDownLatch, until all the predicted events are
+executed. The number of predicted events is 60:
+
+
+
+
MyJobListener executes 2 times, 1 for MyJobListener#beforeJob and 1 more for MyJobListener#afterJob.
+
+
+
MyStepListener executes 2 times, 1 for MyStepListener#beforeStep and 1 more for MyStepListener#afterStep.
+
+
+
MyChunkListener executes 8 times, 4 for MyChunkListener#beforeChunk and 4 more
+for MyChunkListener#afterChunk. Chunk size is set to 3 and the total elements is 10, so 10/3 = 3 and 1 more
+for the last element, means 4 for each chunk listener event.
+
+
+
MyItemReader executes 22 times, 10 elements in total plus an empty read, so MyItemReadListener#beforeRead
+executes 11 times and MyItemReadListener#afterRead the other 11 times.
+
+
+
MyItemProcessorListener executes 20 times, 10 elements read in total,
+so MyItemProcessorLister#beforeProcess executes 10 times
+and MyItemProcessorLister#afterProcess the other 10 times.
+
+
+
MyItemWriterListener executed 6 times, 3 times for MyItemWriterListener#beforeWrite and another 3 times
+for MyItemWriterListener#afterWrite. This one is a bit more tricky, since not every element needs to be
+written. Looking at MyItemProcessor, only even records are going to be written. We also need to take into
+account the elements read per chunk, so: Chunk[1] read and process [1,2,3] and wrote [2,6], Chunk[2] read and
+process [4,5,6] and wrote [10], Chunk[3] read and process [7,8,9] and wrote [14,18], Chunk[4] read and process
+[10] and did not wrote anything, so only 3 writes for the full processing.
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
Jun 19, 2014: Documentation clarifications and typos by radcortez
May 27, 2014: Added documentation to batch-listeners project by Roberto Cortez
Dec 31, 2013: Code style issues by Roberto Cortez
Dec 31, 2013: Removed servlets and jsp's by Roberto Cortez
Dec 04, 2013: Changed asserts for countdownlatch by Roberto Cortez
Dec 04, 2013: Refactored batch tests to use countdownlatch instead of boolean static variables to monitor execution by Roberto Cortez
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/batch-listeners/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/batch-batchlet-simple/index.html b/sample/batch-batchlet-simple/index.html
new file mode 100644
index 0000000..6c63bc1
--- /dev/null
+++ b/sample/batch-batchlet-simple/index.html
@@ -0,0 +1,98 @@
+JavaEE Sample::Batch::Batchlet Simple
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/batchlet-simple/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
Batchlet is the simplest processing style available in the Batch specification. It’s a task oriented step where the
+task is invoked once, executes, and returns an exit status.
+
+
+
A Batchlet need to implement Batchlet interface or in alternative extend
+AbstractBatchlet that already provides empty implementations for all methods.
+
+
+
+
@Named()
+public class MyBatchlet extends AbstractBatchlet {
+
+ public MyBatchlet();
+
+ @Override()
+ public String process();
+}
+
+
+
+
We are mostly interested in overriding AbstractBatchlet#process to provide the behaviour that we
+want to achieve with the Batchlet itself. Common cases include: copy files to process with a chunk oriented step,
+startup and cleanup, or validations to your processing workflow.
+
+
+
To run your Batchlet, just add it to the job xml file (myJob.xml).
In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test
+expected behaviour we just need to check the Batch Status in the JobExecution object. We
+should get a COMPLETED.
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
Jun 19, 2014: Documentation clarifications and typos by radcortez
Jun 05, 2014: Add include of myjbos.xml file in doc by Aslak Knutsen
May 29, 2014: Added documentation to batchlet-simple project by Roberto Cortez
Dec 31, 2013: Code style issues by Roberto Cortez
Dec 31, 2013: Removed servlets and jsp's by Roberto Cortez
Nov 21, 2013: Removing some redundant elements by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/batchlet-simple/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/batch-chunk-checkpoint/index.html b/sample/batch-chunk-checkpoint/index.html
new file mode 100644
index 0000000..3e8d371
--- /dev/null
+++ b/sample/batch-chunk-checkpoint/index.html
@@ -0,0 +1,141 @@
+JavaEE Sample::Batch::Batch Chunk Checkpoint
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/chunk-checkpoint/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
The Batch specification provides a Chunk Oriented processing style. This style is defined by enclosing into a
+transaction a set of reads, process and write operations via ItemReader,
+ItemProcessor and ItemWriter. Items are read one at a time, processed
+and aggregated. The transaction is then committed when the defined checkpoint-policy is triggered.
+
+
+
The checkpoint-policy can be defined as item or custom. The item policy means the chunk is checkpointed after
+a specified number of items are processed. The custom policy means the chunk is checkpointed according to a
+checkpoint algorithm implementation. To use the custom policy you also need to define a checkpoint-algorithm
+element.
A very simple job is defined in the myJob.xml file. Just a single step with a reader, a processor and a writer. For
+this sample, a custom checkpoint policy is going to be used. The custom policy needs to implement
+CheckpointAlgorithm or in alternative extend
+AbstractCheckpointAlgorithm that already provides empty implementations for all methods.
+
+
+
+
@Named()
+public class MyCheckpointAlgorithm extends AbstractCheckpointAlgorithm {
+
+ public MyCheckpointAlgorithm();
+ public static CountDownLatch checkpointCountDownLatch;
+
+ @Override()
+ public boolean isReadyToCheckpoint() throws Exception;
+}
+
+
+
+
Note that the behaviour of this custom checkpoint algorithm could also be achieved by using the item policy and
+defining the item-count element at the chunk level.
+
+
We’re just going to deploy the application as a web archive. Note the inclusion of the following files:
+
+
+
+
/META-INF/batch-jobs/myJob.xml
+
+
+
+
The myJob.xml file is needed for running the batch definition.
In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test
+expected behaviour we need to query the Metric object available in the step execution.
+
+
+
The batch process itself will read and process 10 elements from numbers 1 to 10, but only write the odd
+elements. Commits are executed after 5 elements are read by the custom checkpoint algorithm.
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
Jun 19, 2014: Documentation clarifications and typos by radcortez
Jun 18, 2014: Fixed documentation of chunk-checkpoint project by radcortez
Jun 18, 2014: Added documentation to chunk-checkpoint project by radcortez
Dec 31, 2013: Code style issues by Roberto Cortez
Dec 31, 2013: Removed servlets and jsp's by Roberto Cortez
Dec 04, 2013: Changed asserts for countdownlatch by Roberto Cortez
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/chunk-checkpoint/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/batch-chunk-csv-database/index.html b/sample/batch-chunk-csv-database/index.html
new file mode 100644
index 0000000..483e18a
--- /dev/null
+++ b/sample/batch-chunk-csv-database/index.html
@@ -0,0 +1,208 @@
+JavaEE Sample::Batch::Batch Chunk CSV Database
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/chunk-csv-database/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=BatchCSVDatabaseTest
Chunk Processing - Read, Process, Write to a Database
The Batch specification provides a Chunk Oriented processing style. This style is defined by enclosing into a
+transaction a set of reads, process and write operations via ItemReader,
+ItemProcessor and ItemWriter. Items are read one at a time, processed
+and aggregated. The transaction is then committed when the defined checkpoint-policy is triggered.
In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test
+expected behaviour we need to query the Metric object available in the step execution.
+
+
+
The batch process itself will read and write 7 elements of type Person. Commits are executed after 3 elements
+are read.
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
Oct 29, 2014: Fixed #269. npe loading the csv file from the glassfish embedded regular classloader. changed to use the thread context classloader by Roberto Cortez
Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
Jun 19, 2014: Documentation clarifications and typos by radcortez
Jun 18, 2014: Added documentation to chunk-csv-database project by radcortez
Dec 31, 2013: Code style issues by Roberto Cortez
Dec 31, 2013: Removed servlets and jsp's by Roberto Cortez
Dec 24, 2013: Changed person entity id generation to be manually assigned by Roberto Cortez
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/chunk-csv-database/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/batch-chunk-exception/index.html b/sample/batch-chunk-exception/index.html
new file mode 100644
index 0000000..7a6f578
--- /dev/null
+++ b/sample/batch-chunk-exception/index.html
@@ -0,0 +1,232 @@
+JavaEE Sample::Batch::Batch Chunk Exception
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/chunk-exception/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
Exceptions are a natural part of Batch Processing, and the batch itself should be prepared to deal with
+exceptions during processing.
+
+
+
Batch Processing deals with two kinds of exceptions: skippable and retryable. Skippable Exceptions are used to skip
+elements during reading, processing and writing and continue to the next element. Retryable Exceptions on the other
+hand when thrown will try to retry the chunk on which the exception occurred.
+
+
+
When the same exception is specified as both retryable and skippable, retryable takes precedence over skippable
+during regular processing of the chunk. While the chunk is retrying, skippable takes precedence over retryable since
+the exception is already being retried.
+
+
+
The Reader:
+
+
+
+
@Named()
+public class MyItemReader extends AbstractItemReader {
+
+ public MyItemReader();
+ private StringTokenizer tokens;
+ private MyInputRecord lastElement;
+ private boolean alreadyFailed;
+
+ @Override()
+ public void open(Serializable checkpoint);
+
+ @Override()
+ public Object readItem();
+
+ @Override()
+ public Serializable checkpointInfo() throws Exception;
+}
+
+
+
+
Just reads elements from a list and simulate a retry exception.
+
+
+
The Processor:
+
+
+
+
@Named()
+public class MyItemProcessor implements ItemProcessor {
+
+ public MyItemProcessor();
+
+ @Override()
+ public Object processItem(Object t);
+}
+
+
+
+
Process and simulate a skip exception.
+
+
+
The Writer:
+
+
+
+
@Named()
+public class MyItemWriter extends AbstractItemWriter {
+
+ public MyItemWriter();
+ private static int retries;
+
+ @Override()
+ public void writeItems(List list);
+}
+
+
+
+
The writer will retry an exception and then skip it.
+
+
+
The batch specification also allows you to provide listeners for skipping and retrying for every operation. Have a
+look into the following classes:
+
+
+
+
+
MySkipReadListener
+
+
+
MySkipProcessorListener
+
+
+
MySkipWriteListener
+
+
+
MyRetryReadListener
+
+
+
MyRetryProcessorListener
+
+
+
MyRetryWriteListener
+
+
+
+
+
Events can be caught via extending the following classes, for the appropriate batch lifecycle event:
A very simple job is defined in the myJob.xml file. Just a single step with a reader, a processor and a writer. For
+this sample we are going to process a few records and mix some exceptions during read, processing and write of the
+chunk. Batch exception handling is achieved by defining the elements skippable-exception-classes and
+retryable-exception-classes into the chunk. Both elements should indicate the full qualified name of the
+exceptions that we are trying to catch. The listeners element can be used at the step level to define which
+listeners to run for each batch processing event.
+
+
We’re just going to deploy the application as a web archive. Note the inclusion of the following files:
+
+
+
+
/META-INF/batch-jobs/myJob.xml
+
+
+
+
The myJob.xml file is needed for running the batch definition.
In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test
+expected behaviour we need to query the Metric object available in the step execution.
+
+
+
@Test
+public void testBatchChunkException() throws Exception {
+ JobOperator jobOperator = BatchRuntime.getJobOperator();
+ Long executionId = jobOperator.start("myJob", new Properties());
+ JobExecution jobExecution = jobOperator.getJobExecution(executionId);
+
+ jobExecution = BatchTestHelper.keepTestAlive(jobExecution);
+
+ List<StepExecution> stepExecutions = jobOperator.getStepExecutions(executionId);
+ for (StepExecution stepExecution : stepExecutions) {
+ if (stepExecution.getStepName().equals("myStep")) {
+ Map<Metric.MetricType, Long> metricsMap = BatchTestHelper.getMetricsMap(stepExecution.getMetrics());
+
+ assertEquals(1L, metricsMap.get(Metric.MetricType.PROCESS_SKIP_COUNT).longValue());
+ // There are a few differences between Glassfish and Wildfly. Needs investigation.
+ //assertEquals(1L, metricsMap.get(Metric.MetricType.WRITE_SKIP_COUNT).longValue());
+ assertEquals(1L, ChunkExceptionRecorder.retryReadExecutions);
+ }
+ }
+
+ assertTrue(ChunkExceptionRecorder.chunkExceptionsCountDownLatch.await(0, TimeUnit.SECONDS));
+ assertEquals(BatchStatus.COMPLETED, jobExecution.getBatchStatus());
+}
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
Jun 19, 2014: Documentation clarifications and typos by radcortez
May 27, 2014: Fixed a few javadocs typos by Roberto Cortez
May 08, 2014: Fixed chunk exception wildfly test by Roberto Cortez
Apr 04, 2014: Fixed chunk exception test by Roberto Cortez
Dec 31, 2013: Code style issues by Roberto Cortez
Dec 31, 2013: Removed servlets and jsp's by Roberto Cortez
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/chunk-exception/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/batch-chunk-mapper/index.html b/sample/batch-chunk-mapper/index.html
new file mode 100644
index 0000000..cfbfaed
--- /dev/null
+++ b/sample/batch-chunk-mapper/index.html
@@ -0,0 +1,188 @@
+JavaEE Sample::Batch::Batch Chunk Partition Mapper
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/chunk-mapper/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=BatchChunkMapperTest
Chunk Processing - Read, Process, Write in multiple Threads
The Batch specification provides a Chunk Oriented processing style. This style is defined by enclosing into a
+transaction a set of reads, process and write operations via ItemReader,
+ItemProcessor and ItemWriter. Items are read one at a time, processed
+and aggregated. The transaction is then committed when the defined checkpoint-policy is triggered.
+
+
+
Many batch processing problems can be solved with single threaded, single process jobs, but the Batch specification
+allows for steps to be executed as a partitioned step, meaning that the step can be parallelized across multiple
+threads. This is useful if you have some kind of bottleneck or if you can considerable boost your batch processing
+performance by splitting the work to be done.
+
+
+
You can define the number of partitions and the number of threads using a custom mapper. The custom mapper needs to
+implement PartitionMapper and create a new PartitionPlan to
+define the partitions behaviour. Each partition is required to receive a set of unique parameters that instruct it
+into which data it should operate.
+
+
+
Since each thread runs a separate copy of the step, chunking and checkpointing occur independently on each thread for
+chunk type steps.
A job is defined in the myJob.xml file. Just a single step with a reader, a processor and a writer. This step also
+defines that the step should be executed into a partition with a custom mapper:
+
+
+
+
@Named()
+public class MyMapper implements PartitionMapper {
+
+ public MyMapper();
+
+ @Override()
+ public PartitionPlan mapPartitions() throws Exception;
+}
+
+
+
+
The mapper defines 2 partitions and 2 threads. Properties for each partition define the data that is going to be
+read. For the first partition we start on 1 and end on 10. For the second partition we start on 11 and end on 20. The
+MyItemReader will generate the data based on these properties.
+
+
+
+
@Named()
+public class MyItemReader extends AbstractItemReader {
+
+ public MyItemReader();
+ public static int totalReaders;
+ private int readerId;
+ private StringTokenizer tokens;
+ @Inject()
+ @BatchProperty(name = "start")
+ private String startProp;
+ @Inject()
+ @BatchProperty(name = "end")
+ private String endProp;
+ @Inject()
+ private JobContext context;
+
+ @Override()
+ public void open(Serializable e);
+
+ @Override()
+ public MyInputRecord readItem();
+}
+
+
+
We’re just going to deploy the application as a web archive. Note the inclusion of the following files:
+
+
+
+
/META-INF/batch-jobs/myJob.xml
+
+
+
+
The myJob.xml file is needed for running the batch definition.
In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test
+expected behaviour we need to query the Metric object available in the step execution.
+
+
+
The batch process itself will read and process 20 elements from numbers 1 to 20, but only write the odd
+elements. Elements from 1 to 10 will be processed in one partition and elements from 11 to 20 in another
+partition. Commits are executed after 3 elements are read by partition.
+
+
+
@Test
+public void testBatchChunkMapper() throws Exception {
+ JobOperator jobOperator = BatchRuntime.getJobOperator();
+ Long executionId = jobOperator.start("myJob", new Properties());
+ JobExecution jobExecution = jobOperator.getJobExecution(executionId);
+
+ jobExecution = BatchTestHelper.keepTestAlive(jobExecution);
+
+ List<StepExecution> stepExecutions = jobOperator.getStepExecutions(executionId);
+ for (StepExecution stepExecution : stepExecutions) {
+ if (stepExecution.getStepName().equals("myStep")) {
+ Map<Metric.MetricType, Long> metricsMap = BatchTestHelper.getMetricsMap(stepExecution.getMetrics());
+
+ (1)
+ assertEquals(20L, metricsMap.get(Metric.MetricType.READ_COUNT).longValue());
+ (2)
+ assertEquals(10L, metricsMap.get(Metric.MetricType.WRITE_COUNT).longValue());
+ // Number of elements by the item count value on myJob.xml, plus an additional transaction for the
+ // remaining elements by each partition.
+ long commitCount = (10L / 3 + (10 % 3 > 0 ? 1 : 0)) * 2;
+ (3)
+ assertEquals(commitCount, metricsMap.get(Metric.MetricType.COMMIT_COUNT).longValue());
+ }
+ }
+
+ (4)
+ assertEquals(2L, MyItemReader.totalReaders);
+ (5)
+ assertEquals(BatchStatus.COMPLETED, jobExecution.getBatchStatus());
+}
+
+
+
+
+
+
The read count should be 20 elements. Check MyItemReader.
+
+
+
The write count should be 10. Only half of the elements read are processed to be written.
+
+
+
The commit count should be 8. Checkpoint is on every 3rd read, 4 commits for read elements and 2 partitions.
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
Jun 19, 2014: Documentation clarifications and typos by radcortez
Jun 18, 2014: Added documentation to chunk-mapper project by radcortez
Dec 31, 2013: Code style issues by Roberto Cortez
Dec 31, 2013: Removed servlets and jsp's by Roberto Cortez
Dec 28, 2013: Added test for chunk-mapper project by Roberto Cortez
Oct 18, 2013: Returning correct records, fixing https://github.com/arun-gupta/javaee7-samples/issues/47 by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/chunk-mapper/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/batch-chunk-optional-processor/index.html b/sample/batch-chunk-optional-processor/index.html
new file mode 100644
index 0000000..bc554dc
--- /dev/null
+++ b/sample/batch-chunk-optional-processor/index.html
@@ -0,0 +1,110 @@
+JavaEE Sample::Batch::Batch Chunk Optional Processor
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/chunk-optional-processor/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
The Batch specification provides a Chunk Oriented processing style. This style is defined by enclosing into a
+transaction a set of reads, process and write operations via ItemReader,
+ItemProcessor and ItemWriter. Items are read one at a time, processed
+and aggregated. The transaction is then committed when the defined checkpoint-policy is triggered.
In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test
+expected behaviour we need to query the Metric object available in the step execution.
+
+
+
The batch process itself will read 10 elements from numbers 1 to 10, and write the same elements. Commits are
+executed after 3 elements are read.
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
Jun 19, 2014: Documentation clarifications and typos by radcortez
Jun 18, 2014: Fixed documentation of chunk-optional-processor project by radcortez
Jun 18, 2014: Added documentation to chunk-optional-processor project by radcortez
Dec 31, 2013: Code style issues by Roberto Cortez
Dec 31, 2013: Removed servlets and jsp's by Roberto Cortez
Dec 30, 2013: Added test for chunk-optional-processor project by Roberto Cortez
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/chunk-optional-processor/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/batch-chunk-partition/index.html b/sample/batch-chunk-partition/index.html
new file mode 100644
index 0000000..39c74b9
--- /dev/null
+++ b/sample/batch-chunk-partition/index.html
@@ -0,0 +1,172 @@
+JavaEE Sample::Batch::Batch Chunk Partition
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/chunk-partition/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=BatchChunkPartitionTest
Chunk Processing - Read, Process, Write in multiple Threads
The Batch specification provides a Chunk Oriented processing style. This style is defined by enclosing into a
+transaction a set of reads, process and write operations via ItemReader,
+ItemProcessor and ItemWriter. Items are read one at a time, processed
+and aggregated. The transaction is then committed when the defined checkpoint-policy is triggered.
+
+
+
Many batch processing problems can be solved with single threaded, single process jobs, but the Batch specification
+allows for steps to be executed as a partitioned step, meaning that the step can be parallelized across multiple
+threads. This is useful if you have some kind of bottleneck or if you can considerable boost your batch processing
+performance by splitting the work to be done.
+
+
+
You can define the number of partitions and the number of threads by using the element partition in the step
+definition. Each partition is required to receive a set of unique parameters that instruct it into which data it
+should operate.
+
+
+
Since each thread runs a separate copy of the step, chunking and checkpointing occur independently on each thread for
+chunk type steps.
A job is defined in the myJob.xml file. Just a single step with a reader, a processor and a writer. This step also
+defines that the step should be executed in two separate partitions: "1" and "2". Properties for each partition
+define the data that is going to be read. For partition "1" we start on 1 and end on 10. For partition "2" we start
+on 11 and end on 20. The MyItemReader will generate the data based on these properties.
+
+
+
+
@Named()
+public class MyItemReader extends AbstractItemReader {
+
+ public MyItemReader();
+ public static int totalReaders;
+ private int readerId;
+ private StringTokenizer tokens;
+ @Inject()
+ @BatchProperty(name = "start")
+ private String startProp;
+ @Inject()
+ @BatchProperty(name = "end")
+ private String endProp;
+
+ @Override()
+ public void open(Serializable e);
+
+ @Override()
+ public MyInputRecord readItem();
+}
+
+
+
We’re just going to deploy the application as a web archive. Note the inclusion of the following files:
+
+
+
+
/META-INF/batch-jobs/myJob.xml
+
+
+
+
The myJob.xml file is needed for running the batch definition.
In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test
+expected behaviour we need to query the Metric object available in the step execution.
+
+
+
The batch process itself will read and process 20 elements from numbers 1 to 20, but only write the odd
+elements. Elements from 1 to 10 will be processed in one partition and elements from 11 to 20 in another
+partition. Commits are executed after 3 elements are read by partition.
+
+
+
@Test
+public void testBatchChunkPartition() throws Exception {
+ JobOperator jobOperator = BatchRuntime.getJobOperator();
+ Long executionId = jobOperator.start("myJob", new Properties());
+ JobExecution jobExecution = jobOperator.getJobExecution(executionId);
+
+ jobExecution = BatchTestHelper.keepTestAlive(jobExecution);
+
+ List<StepExecution> stepExecutions = jobOperator.getStepExecutions(executionId);
+ for (StepExecution stepExecution : stepExecutions) {
+ if (stepExecution.getStepName().equals("myStep")) {
+ Map<Metric.MetricType, Long> metricsMap = BatchTestHelper.getMetricsMap(stepExecution.getMetrics());
+
+ (1)
+ assertEquals(20L, metricsMap.get(Metric.MetricType.READ_COUNT).longValue());
+ (2)
+ assertEquals(10L, metricsMap.get(Metric.MetricType.WRITE_COUNT).longValue());
+ // Number of elements by the item count value on myJob.xml, plus an additional transaction for the
+ // remaining elements by each partition.
+ long commitCount = (10L / 3 + (10 % 3 > 0 ? 1 : 0)) * 2;
+ (3)
+ assertEquals(commitCount, metricsMap.get(Metric.MetricType.COMMIT_COUNT).longValue());
+ }
+ }
+
+ (4)
+ assertEquals(BatchStatus.COMPLETED, jobExecution.getBatchStatus());
+}
+
+
+
+
+
+
The read count should be 20 elements. Check MyItemReader.
+
+
+
The write count should be 10. Only half of the elements read are processed to be written.
+
+
+
The commit count should be 8. Checkpoint is on every 3rd read, 4 commits for read elements and 2 partitions.
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
Jun 19, 2014: Documentation clarifications and typos by radcortez
Jun 18, 2014: Added documentation to chunk-partition project by radcortez
Dec 31, 2013: Code style issues by Roberto Cortez
Dec 31, 2013: Removed servlets and jsp's by Roberto Cortez
Dec 30, 2013: Added test for chunk-partition project by Roberto Cortez
Oct 18, 2013: Returning correct records, fixing https://github.com/arun-gupta/javaee7-samples/issues/47 by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/chunk-partition/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/batch-chunk-simple-nobeans/index.html b/sample/batch-chunk-simple-nobeans/index.html
new file mode 100644
index 0000000..ab4becd
--- /dev/null
+++ b/sample/batch-chunk-simple-nobeans/index.html
@@ -0,0 +1,111 @@
+JavaEE Sample::Batch::Batch Chunk Simple No Beans
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/chunk-simple-nobeans/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
The Batch specification provides a Chunk Oriented processing style. This style is defined by enclosing into a
+transaction a set of reads, process and write operations via ItemReader,
+ItemProcessor and ItemWriter. Items are read one at a time, processed
+and aggregated. The transaction is then committed when the defined checkpoint-policy is triggered.
A very simple job is defined in the myJob.xml file. Just a single step with a reader, a processor and a writer.
+
+
We’re just going to deploy the application as a web archive. Note the inclusion of the following files:
+
+
+
+
/META-INF/batch-jobs/myJob.xml
+
+
+
+
The myJob.xml file is needed for running the batch definition. This sample is also missing the beans.xml for
+CDI discovery, since for Java EE 7 this file is now optional, but you need to annotated batch dependent beans
+with Dependent.
In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test
+expected behaviour we need to query the Metric object available in the step execution.
+
+
+
The batch process itself will read and process 10 elements from numbers 1 to 10, but only write the odd
+elements. Commits are executed after 3 elements are read.
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
Jun 19, 2014: Documentation clarifications and typos by radcortez
Jun 18, 2014: Added documentation to chunk-simple-nobeans project by radcortez
Dec 31, 2013: Code style issues by Roberto Cortez
Dec 31, 2013: Removed servlets and jsp's by Roberto Cortez
Dec 30, 2013: Added test for chunk-simple-nobeans project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/chunk-simple-nobeans/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/batch-chunk-simple/index.html b/sample/batch-chunk-simple/index.html
new file mode 100644
index 0000000..0c6d641
--- /dev/null
+++ b/sample/batch-chunk-simple/index.html
@@ -0,0 +1,110 @@
+JavaEE Sample::Batch::Batch Chunk Simple
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/chunk-simple/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
The Batch specification provides a Chunk Oriented processing style. This style is defined by enclosing into a
+transaction a set of reads, process and write operations via ItemReader,
+ItemProcessor and ItemWriter. Items are read one at a time, processed
+and aggregated. The transaction is then committed when the defined checkpoint-policy is triggered.
In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test
+expected behaviour we need to query the Metric object available in the step execution.
+
+
+
The batch process itself will read and process 10 elements from numbers 1 to 10, but only write the odd
+elements. Commits are executed after 3 elements are read.
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
Jun 19, 2014: Documentation clarifications and typos by radcortez
Jun 18, 2014: Fixed documentation of chunk-simple project by radcortez
Jun 18, 2014: Added documentation to chunk-simple project by radcortez
Dec 31, 2013: Code style issues by Roberto Cortez
Dec 31, 2013: Removed servlets and jsp's by Roberto Cortez
Nov 21, 2013: Moved batch-utils project one level up and renamed it to utils by Roberto Cortez
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/chunk-simple/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/batch-decision/index.html b/sample/batch-decision/index.html
new file mode 100644
index 0000000..8723129
--- /dev/null
+++ b/sample/batch-decision/index.html
@@ -0,0 +1,117 @@
+JavaEE Sample::Batch::Batch Decision
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/decision/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
The Batch specification allows you to implement process workflow using a Job Specification Language (JSL). In this
+sample, by using the decision element, it’s possible to configure a job that follows different paths of execution
+based on your own criteria by implementing a Decider
+
+
+
The Decider just needs to return a meaningful value, to use in the myJob.xml file to be able to
+reference the next step that must be executed.
Three Steps and one Decider are configured in the file myJob.xml. We start by executing one step1 and
+hand over the control to the Decider, which will execute step2, since the Decider is always returning the value
+foobar which forwards the execution to step2.
+
+
We’re just going to deploy the application as a web archive. Note the inclusion of the following files:
+
+
+
+
/META-INF/batch-jobs/myJob.xml
+
+
+
+
The myJob.xml file is needed for running the batch definition.
In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test
+expected behaviour we need to query JobOperator#getStepExecutions and the
+Metric object available in the step execution.
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
Jun 19, 2014: Documentation clarifications and typos by radcortez
Jun 12, 2014: Fix callout numbering in batchdecisiontest by Aslak Knutsen
Jun 12, 2014: Added documentation to decision project by Roberto Cortez
Dec 31, 2013: Removed servlets and jsp's by Roberto Cortez
Dec 30, 2013: Added test for decision project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/decision/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/batch-flow/index.html b/sample/batch-flow/index.html
new file mode 100644
index 0000000..a847204
--- /dev/null
+++ b/sample/batch-flow/index.html
@@ -0,0 +1,115 @@
+JavaEE Sample::Batch::Batch Flow
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/flow/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
The Batch specification allows you to implement process workflow using a Job Specification Language (JSL). In this
+sample, by using the flow element, we define a sequence of elements that execute together as a unit. When the
+flow is finished the flow transitions to the next execution element. The execution elements of a flow cannot
+transition to elements outside the flow.
In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test
+expected behaviour we need to query JobOperator#getStepExecutions and the
+Metric object available in the step execution.
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
Jun 19, 2014: Documentation clarifications and typos by radcortez
Jun 12, 2014: Added documentation to flow project by Roberto Cortez
Dec 31, 2013: Code style issues by Roberto Cortez
Dec 31, 2013: Added test for flow project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 17, 2013: Forgot to include some files - improving output messages, adding copyrights and @author by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/flow/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/batch-multiple-steps/index.html b/sample/batch-multiple-steps/index.html
new file mode 100644
index 0000000..8827af5
--- /dev/null
+++ b/sample/batch-multiple-steps/index.html
@@ -0,0 +1,108 @@
+JavaEE Sample::Batch::Batch Multiple Steps
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/multiple-steps/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
The Batch specification allows you to implement process workflow using a Job Specification Language (JSL). In this
+sample, by using the step element, it’s possible to configure a job that runs multiple steps.
+
+
+
One Chunk oriented Step and a Batchlet are configured in the file myJob.xml. They both execute in order of
+declaration. First the Chunk oriented Step and finally the Batchlet Step.
In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test
+expected behaviour we need to query JobOperator#getStepExecutions and the
+Metric object available in the step execution.
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
Jun 19, 2014: Documentation clarifications and typos by radcortez
May 30, 2014: Added documentation to multiple-steps project by Roberto Cortez
Dec 31, 2013: Code style issues by Roberto Cortez
Dec 31, 2013: Added test for multiple-steps project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 17, 2013: Forgot to include some files - improving output messages, adding copyrights and @author by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/multiple-steps/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/batch-scheduling/index.html b/sample/batch-scheduling/index.html
new file mode 100644
index 0000000..9668098
--- /dev/null
+++ b/sample/batch-scheduling/index.html
@@ -0,0 +1,208 @@
+JavaEE Sample::Batch::Batch Schedule
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/scheduling/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=ManagedScheduledBatchTestmvn test -Dtest=TimerScheduleBatchTest
The Batch specification does not offer anything to schedule jobs. However, the Java EE plataform offer a few ways
+that allow you to schedule Batch jobs.
+
+
+
Adding a Trigger to a ManagedScheduledExecutorService
+is possible to trigger an execution of the batch job by specifying the next execution date of the job.
+
+
+
+
@Stateless()
+@Local(MyManagedScheduledBatch.class)
+public class MyManagedScheduledBatchBean implements MyManagedScheduledBatch {
+
+ public MyManagedScheduledBatchBean();
+ @Resource()
+ private ManagedScheduledExecutorService executor;
+
+ @Override()
+ public void runJob();
+
+ public void runJob2();
+
+ protected MyJob createJob();
+}
+
+
+
We’re just going to deploy the application as a web archive. Note the inclusion of the following files:
+
+
+
+
/META-INF/batch-jobs/myJob.xml
+
+
+
+
The myJob.xml file is needed for running the batch definition. We are also adding an alternative bean to
+override the created batch instance do we can track it’s status and the modified batch instance.
The batch job is scheduled to execute each 15 seconds. We expect to run the batch instance exactly 3 times as
+defined in the CountDownLatch object. To validate the test expected behaviour we just need to check the
+Batch Status in the JobExecution object. We should get a
+COMPLETED for every execution.
The Batch specification does not offer anything to schedule jobs. However, the Java EE plataform offer a few ways
+that allow you to schedule Batch jobs.
+
+
+
Annotating a method bean with Schedule, it’s possible to schedule an execution of a batch job by the
+specified cron expression in the Schedule annotation.
+
+
+
+
+
+
Warning
+
+
+AbstractTimerBatch not found
+
+
+
+
+
+
+
@Startup()
+@Singleton()
+public class MyTimerScheduleBean extends AbstractTimerBatch {
+
+ public MyTimerScheduleBean();
+}
+
+
+
We’re just going to deploy the application as a web archive. Note the inclusion of the following files:
+
+
+
+
/META-INF/batch-jobs/myJob.xml
+
+
+
+
The myJob.xml file is needed for running the batch definition. We are also adding an alternative bean to
+override the batch schedule timeout and track the execution calls,
The batch job is scheduled to execute each 15 seconds. We expect to run the batch instance exactly 3 times as
+defined in the CountDownLatch object. To validate the test expected behaviour we just need to check the
+Batch Status in the JobExecution object. We should get a
+COMPLETED for every execution.
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 09, 2014: Added tests to scheduling project by Roberto Cortez
Jul 08, 2014: Adding a new sample to schedule batch jobs by arun-gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/scheduling/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/batch-split/index.html b/sample/batch-split/index.html
new file mode 100644
index 0000000..981decf
--- /dev/null
+++ b/sample/batch-split/index.html
@@ -0,0 +1,119 @@
+JavaEE Sample::Batch::Batch Split
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/split/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
The Batch specification allows you to implement process workflow using a Job Specification Language (JSL). In this
+sample, by using the split element, it’s possible to configure a job that runs parallel flows. A split can only
+contain flow elements. These flow elements can be used to implement separate executions to be processed by the
+job.
+
+
+
Three simple Batchlet’s are configured in the file myJob.xml. MyBatchlet1 and MyBatchlet2 are setted up to
+execute in parallel by using the split and flow elements. MyBatchlet3 is only going to execute after
+MyBatchlet1 and MyBatchlet2 are both done with their job.
In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test
+expected behaviour we need to query JobOperator#getStepExecutions.
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
Jun 19, 2014: Documentation clarifications and typos by radcortez
May 30, 2014: Added documentation to split project by Roberto Cortez
Dec 31, 2013: Fixed test. assert steps order by Roberto Cortez
Dec 31, 2013: Added test for split project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 17, 2013: Improving output messages, adding copyrights and @author by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/batch/split/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/cdi-alternatives-priority/index.html b/sample/cdi-alternatives-priority/index.html
new file mode 100644
index 0000000..582227d
--- /dev/null
+++ b/sample/cdi-alternatives-priority/index.html
@@ -0,0 +1,78 @@
+JavaEE Sample::CDI::Alternatives priority
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/alternatives-priority/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=MixedGreetingTestmvn test -Dtest=GreetingTestmvn test -Dtest=ProducerMethodGreetingTest
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
+
+
@Test
+public void should_bean_be_priority() throws Exception {
+ // because it has the highest priority from Priority annotated alternatives
+ assertThat(bean, instanceOf(PriorityGreeting.class));
+}
+
+
ProducerMethodGreetingTest
Missing a description for the story. Add some javadoc to the TestClass. Show me how!
Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
+
+
@Test
+public void should_bean_be_simple() throws Exception {
+ // because it has the highest priority from Priority annotated alternatives
+ assertThat(bean, instanceOf(SimpleGreeting.class));
+}
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
Dec 30, 2013: Added cdi/alternatives-priority, 3 tests available by Radim Hanus
Dec 30, 2013: Added cdi/alternatives-priority, 3 tests available by Radim Hanus
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/alternatives-priority/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/cdi-alternatives/index.html b/sample/cdi-alternatives/index.html
new file mode 100644
index 0000000..0953bc6
--- /dev/null
+++ b/sample/cdi-alternatives/index.html
@@ -0,0 +1,37 @@
+JavaEE Sample::CDI::Alternatives
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/alternatives/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
+
+
@Test
+public void should_bean_be_fancy() throws Exception {
+ // because it is declared as the alternative in beans.xml
+ assertThat(bean, instanceOf(FancyGreeting.class));
+}
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
Dec 01, 2013: Adding arquillian tests to cdi/alternatives example by Alexis Hassler
Oct 18, 2013: Improved the output message by Arun Gupta
Oct 18, 2013: Removing @fancy qualifier and fixing the sample. thanks jj for helping me debug by Arun Gupta
Oct 08, 2013: Starting work on alternatives sample by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/alternatives/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/cdi-bean-discovery-all/index.html b/sample/cdi-bean-discovery-all/index.html
new file mode 100644
index 0000000..097c247
--- /dev/null
+++ b/sample/cdi-bean-discovery-all/index.html
@@ -0,0 +1,30 @@
+JavaEE Sample::CDI::Bean discovery all
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/bean-discovery-all/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
Nov 13, 2013: Added arquillian test for the cdi/bean-discovery-all example by Alexis Hassler
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 28, 2013: Slightly more indicative headers by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/bean-discovery-all/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/cdi-bean-discovery-annotated/index.html b/sample/cdi-bean-discovery-annotated/index.html
new file mode 100644
index 0000000..7032153
--- /dev/null
+++ b/sample/cdi-bean-discovery-annotated/index.html
@@ -0,0 +1,37 @@
+JavaEE Sample::CDI::Bean discovery annotated
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/bean-discovery-annotated/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
Dec 02, 2013: Adding arquillian tests to cdi/bean-discovery-none example by Alexis Hassler
Dec 01, 2013: Adding arquillian tests to cdi/bean-discovery-annotated example by Alexis Hassler
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 28, 2013: More explanatory headers by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/bean-discovery-annotated/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/cdi-bean-discovery-none/index.html b/sample/cdi-bean-discovery-none/index.html
new file mode 100644
index 0000000..f7f39c0
--- /dev/null
+++ b/sample/cdi-bean-discovery-none/index.html
@@ -0,0 +1,31 @@
+JavaEE Sample::CDI::Bean discovery none
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/bean-discovery-none/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
+
+
@Test
+public void should_bean_be_injected() throws Exception {
+ // Cannot try to inject the bean because it would fail at deployment time (in WildFly 8)
+ Set<Bean<?>> beans = beanManager.getBeans(Greeting.class);
+ assertThat(beans, is(empty()));
+}
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
Dec 02, 2013: Adding arquillian tests to cdi/bean-discovery-none example by Alexis Hassler
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 28, 2013: More explanatory headers by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/bean-discovery-none/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/cdi-beanmanager/index.html b/sample/cdi-beanmanager/index.html
new file mode 100644
index 0000000..9ea04df
--- /dev/null
+++ b/sample/cdi-beanmanager/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::CDI::Beanmanager
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/beanmanager/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 28, 2013: Splitting the sample in three different ways to acquire beanmanager by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/beanmanager/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/cdi-beansxml-noversion/index.html b/sample/cdi-beansxml-noversion/index.html
new file mode 100644
index 0000000..b74b4f4
--- /dev/null
+++ b/sample/cdi-beansxml-noversion/index.html
@@ -0,0 +1,32 @@
+JavaEE Sample::CDI::Beansxml noversion
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/beansxml-noversion/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
+
+
@Test
+public void should_bean_be_injected() throws Exception {
+ assertThat(annotatedBean, is(notNullValue()));
+
+ // notAnnotatedBean is injected because CDI acts as version 1.0 if version is not explicit
+ assertThat(notAnnotatedBean, is(notNullValue()));
+}
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
Dec 03, 2013: Adding arquillian tests to cdi/beansxml-noversion example by Alexis Hassler
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 28, 2013: Better explanatory headers by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/beansxml-noversion/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/cdi-built-in/index.html b/sample/cdi-built-in/index.html
new file mode 100644
index 0000000..4efdbba
--- /dev/null
+++ b/sample/cdi-built-in/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::CDI::Built in
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/built-in/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 11, 2013: Adding netbeans configuration file by Arun Gupta
Aug 28, 2013: Better explanatory headers by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/built-in/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/cdi-decorators/index.html b/sample/cdi-decorators/index.html
new file mode 100644
index 0000000..ae0beb9
--- /dev/null
+++ b/sample/cdi-decorators/index.html
@@ -0,0 +1,29 @@
+JavaEE Sample::CDI::Decorators
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/decorators/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 03, 2013: Arquillian test for cdi/decorators by nikom
Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
Oct 27, 2013: Changing the greeting part from decorator to be bold by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 12, 2013: Using cdi 1.1 "all" style beans.xml by Arun Gupta
Sep 12, 2013: Better headings by Arun Gupta
Aug 28, 2013: Slightly more indicative titles by Arun Gupta
Aug 28, 2013: Made the decorator slightly more meaningful by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/decorators/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/cdi-events/index.html b/sample/cdi-events/index.html
new file mode 100644
index 0000000..bbdabb7
--- /dev/null
+++ b/sample/cdi-events/index.html
@@ -0,0 +1,40 @@
+JavaEE Sample::CDI::Events
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/events/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
Jan 05, 2014: Added simple event/observer test by Radim Hanus
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/events/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/cdi-exclude-filter/index.html b/sample/cdi-exclude-filter/index.html
new file mode 100644
index 0000000..c1e619e
--- /dev/null
+++ b/sample/cdi-exclude-filter/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::CDI::Exclude filter
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/exclude-filter/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 28, 2013: More explanatory headers by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/exclude-filter/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/cdi-extension/index.html b/sample/cdi-extension/index.html
new file mode 100644
index 0000000..c65ce00
--- /dev/null
+++ b/sample/cdi-extension/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::CDI::Extension
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/extension/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 11, 2013: Updating the extension implementation to show better message by Arun Gupta
Sep 11, 2013: Improving the message by Arun Gupta
Sep 11, 2013: Starting work on cdi extension sample by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/extension/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/cdi-interceptors-priority/index.html b/sample/cdi-interceptors-priority/index.html
new file mode 100644
index 0000000..5b57d5d
--- /dev/null
+++ b/sample/cdi-interceptors-priority/index.html
@@ -0,0 +1,36 @@
+JavaEE Sample::CDI::Interceptors priority
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/interceptors-priority/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
Note that beans.xml doesn’t define any interceptor. Interceptors declared using interceptor bindings
+are enabled for the entire application and ordered using the Priority annotation.
+
Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
Jan 04, 2014: Fixed pom references to interceptors-priority by Radim Hanus
Jan 03, 2014: Fixed module name to interceptors-priority, removed oracle copyright by Radim Hanus
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/interceptors-priority/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/cdi-interceptors/index.html b/sample/cdi-interceptors/index.html
new file mode 100644
index 0000000..d9b04dc
--- /dev/null
+++ b/sample/cdi-interceptors/index.html
@@ -0,0 +1,33 @@
+JavaEE Sample::CDI::Interceptors
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/interceptors/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
Jan 02, 2014: Converted cdi/interceptors sample to junit&arquillian style by Radim Hanus
Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 17, 2013: Cleaning up output messages by Arun Gupta
Aug 28, 2013: Better explanatory headers by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/interceptors/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/cdi-nobeans-el-injection-flowscoped/index.html b/sample/cdi-nobeans-el-injection-flowscoped/index.html
new file mode 100644
index 0000000..42e6ce5
--- /dev/null
+++ b/sample/cdi-nobeans-el-injection-flowscoped/index.html
@@ -0,0 +1,34 @@
+JavaEE Sample::CDI::Nobeans el injection flowscoped
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/nobeans-el-injection-flowscoped/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 13, 2013: Using htmlunit instead of httpunit by arun-gupta
Dec 12, 2013: Cleaning up imports by arun-gupta
Dec 12, 2013: Added a new test for @flowscoped bean and el injection by arun-gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/nobeans-el-injection-flowscoped/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/cdi-nobeans-el-injection/index.html b/sample/cdi-nobeans-el-injection/index.html
new file mode 100644
index 0000000..23a9e62
--- /dev/null
+++ b/sample/cdi-nobeans-el-injection/index.html
@@ -0,0 +1,33 @@
+JavaEE Sample::CDI::Nobeans el injection
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/nobeans-el-injection/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 11, 2013: Adding a new sample/test to check for el injection without beans.xml by arun-gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/nobeans-el-injection/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/cdi-nobeans-xml/index.html b/sample/cdi-nobeans-xml/index.html
new file mode 100644
index 0000000..e46e012
--- /dev/null
+++ b/sample/cdi-nobeans-xml/index.html
@@ -0,0 +1,28 @@
+JavaEE Sample::CDI::Nobeans xml
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/nobeans-xml/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
Nov 13, 2013: Added arquillian test for the cdi/nobeans-xml example by Alexis Hassler
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 28, 2013: Better explanatory headers by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/nobeans-xml/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/cdi-pkg-level/index.html b/sample/cdi-pkg-level/index.html
new file mode 100644
index 0000000..cbd859d
--- /dev/null
+++ b/sample/cdi-pkg-level/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::CDI::Pkg level
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/pkg-level/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 12, 2013: Using cdi 1.1 "all" style beans.xml by Arun Gupta
Sep 12, 2013: Better headings by Arun Gupta
Aug 28, 2013: Slightly more indicative titles by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/pkg-level/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/cdi-scopes/index.html b/sample/cdi-scopes/index.html
new file mode 100644
index 0000000..ede2781
--- /dev/null
+++ b/sample/cdi-scopes/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::CDI::scopes
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/scopes/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jul 03, 2014: Fixed scope of mysingletonscopedbean to really be @singelton by Arend.von.Reinersdorff
Apr 06, 2014: Added correct scope annotation by abhirockzz
Apr 06, 2014: Added correct scope annotation by abhirockzz
Sep 20, 2013: Starting work on a new sample to show cdi scopes by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/scopes/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/cdi-vetoed/index.html b/sample/cdi-vetoed/index.html
new file mode 100644
index 0000000..5c84562
--- /dev/null
+++ b/sample/cdi-vetoed/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::CDI::Vetoed
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/vetoed/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 28, 2013: Slightly more indicative titles by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/cdi/vetoed/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/concurrency-dynamicproxy/index.html b/sample/concurrency-dynamicproxy/index.html
new file mode 100644
index 0000000..d6b7550
--- /dev/null
+++ b/sample/concurrency-dynamicproxy/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::Concurrency::Dynamicproxy
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/concurrency/dynamicproxy/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 28, 2013: Using more meaningful titles by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/concurrency/dynamicproxy/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/concurrency-managedexecutor/index.html b/sample/concurrency-managedexecutor/index.html
new file mode 100644
index 0000000..2a53509
--- /dev/null
+++ b/sample/concurrency-managedexecutor/index.html
@@ -0,0 +1,223 @@
+JavaEE Sample::Concurrency::Managedexecutor
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/concurrency/managedexecutor/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=ExecutorJNDITestmvn test -Dtest=ExecutorInjectTest
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
Nov 28, 2013: Inject mytaskwithtransaction to use managed tx by Aslak Knutsen
Nov 28, 2013: Using countdownlatch for more accurate test result calculation and adding some more tests by arun-gupta
Nov 27, 2013: Fixed the test by arun-gupta
Nov 27, 2013: Use servlet 3.0 protocol for concurrent tests by Aslak Knutsen
Nov 27, 2013: Missed a file by arun-gupta
Nov 27, 2013: Adding new unit tests, arquillian-enabling them by arun-gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/concurrency/managedexecutor/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/concurrency-managedscheduledexecutor/index.html b/sample/concurrency-managedscheduledexecutor/index.html
new file mode 100644
index 0000000..df8cc70
--- /dev/null
+++ b/sample/concurrency-managedscheduledexecutor/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::Concurrency::managedscheduledexecutor
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/concurrency/managedscheduledexecutor/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Mar 25, 2014: Simple implementation of mytrigger by Alexander Heusingfeld
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 15, 2013: Changing to scheduleatfixedrate by Arun Gupta
Sep 14, 2013: Changing schedule to managedscheduledexecutor, also changed the servlet names to be more intuitive by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/concurrency/managedscheduledexecutor/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/concurrency-managedthreadfactory/index.html b/sample/concurrency-managedthreadfactory/index.html
new file mode 100644
index 0000000..d40a05c
--- /dev/null
+++ b/sample/concurrency-managedthreadfactory/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::Concurrency::managedthreadfactory
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/concurrency/managedthreadfactory/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed default header by Roberto Cortez
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Nov 08, 2013: Commenting the test for now until jndi lookup is figured out correctly by Arun Gupta
Nov 07, 2013: Refactored the package name to match the project name by Arun Gupta
Nov 07, 2013: Changed manageablethread to managedthreadfactory - better/intuitive name for the module by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/concurrency/managedthreadfactory/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/ejb-async-ejb/index.html b/sample/ejb-async-ejb/index.html
new file mode 100644
index 0000000..210cd32
--- /dev/null
+++ b/sample/ejb-async-ejb/index.html
@@ -0,0 +1,89 @@
+JavaEE Sample::EJB::Async ejb
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/ejb/async-ejb/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=AsyncClassBeanTestmvn test -Dtest=AsyncMethodBeanTest
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed default header by Roberto Cortez
Dec 07, 2013: Wrong class name by kubamarchwicki
Dec 07, 2013: #75 asynchronous ejb test by kubamarchwicki
Nov 09, 2013: Adding class-level and method-level annotations by Arun Gupta
Nov 09, 2013: Adding @asynchronous on method - works on both wildfly and glassfish by Arun Gupta
Nov 09, 2013: New sample for asynchronous ejb - need to add different use cases by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/ejb/async-ejb/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/ejb-embeddable/index.html b/sample/ejb-embeddable/index.html
new file mode 100644
index 0000000..ea2f431
--- /dev/null
+++ b/sample/ejb-embeddable/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::EJB::Embeddable
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/ejb/embeddable/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Nov 08, 2013: Cleaning up the test and commented as support for this api is optional by Arun Gupta
Oct 31, 2013: Enabled the test by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/ejb/embeddable/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/ejb-lifecycle/index.html b/sample/ejb-lifecycle/index.html
new file mode 100644
index 0000000..e0573c7
--- /dev/null
+++ b/sample/ejb-lifecycle/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::EJB::Lifecycle
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/ejb/lifecycle/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 30, 2014: Remove extra lifecycle callback param by Andrew Guibert
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 29, 2013: Better messages by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/ejb/lifecycle/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/ejb-singleton/index.html b/sample/ejb-singleton/index.html
new file mode 100644
index 0000000..c8363b4
--- /dev/null
+++ b/sample/ejb-singleton/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::EJB::Singleton
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/ejb/singleton/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Feb 08, 2014: Fix package name :) by OndraZizka
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 29, 2013: Cleaner output messages by Arun Gupta
Aug 29, 2013: New sample to show singleton session bean - both container-managed and application-managed concurrency by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/ejb/singleton/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/ejb-stateful/index.html b/sample/ejb-stateful/index.html
new file mode 100644
index 0000000..e2f4a8c
--- /dev/null
+++ b/sample/ejb-stateful/index.html
@@ -0,0 +1,233 @@
+JavaEE Sample::EJB::Stateful
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/ejb/stateful/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=CartBeanWithInterfaceTestmvn test -Dtest=CartBeanStatefulnessTestmvn test -Dtest=ReentrantCallTestmvn test -Dtest=CartBeanTest
A stateful session object has a unique identity that is assigned by
+the container at the time the object is created. A client of the stateful
+session bean business interface can determine if two business interface
+or no-interface view references refer to the same session object
+by use of the equals method
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
+
+
@Test
+public void doReentrantCall() {
+ // initialMethod() will internally call another method on itself.
+ // This should not throw an exception. See e.g. https://issues.apache.org/jira/browse/OPENEJB-1099
+ reentrantStatefulBean.initialMethod();
+}
+
+
CartBeanTest
Missing a description for the story. Add some javadoc to the TestClass. Show me how!
Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 06, 2014: Fixed formatting by arjan tijms
Oct 06, 2014: Test that stateful session bean is capable of calling a method on itself by arjan tijms
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 09, 2013: Favouring injection over initialcontext for #75 ejb stateless and statefull tests by kubamarchwicki
Dec 08, 2013: Test new stateful bean on every ctx lookup by kubamarchwicki
Dec 08, 2013: Removing obsolete servlets and index.jsp files by kubamarchwicki
Dec 02, 2013: Tests for ejb/stateless & ejb/stateful by Rafał Roppel
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 05, 2013: Removing redundant files by Arun Gupta
Aug 29, 2013: Adding copyright by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/ejb/stateful/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/ejb-stateless/index.html b/sample/ejb-stateless/index.html
new file mode 100644
index 0000000..a9abbd3
--- /dev/null
+++ b/sample/ejb-stateless/index.html
@@ -0,0 +1,127 @@
+JavaEE Sample::EJB::Stateless
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/ejb/stateless/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=AccountSessionStatelessnessTestmvn test -Dtest=AccountSessionBeanWithInterfaceTestmvn test -Dtest=AccountSessionBeanTest
All business object references of the same interface type for the same
+stateless session bean have the same object identity, which is assigned
+by the container. All references to the no-interface view of the same
+stateless session bean have the same object identity.
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Mar 26, 2014: Fixing #205. removing spec not compliant assertions by kubamarchwicki
Mar 25, 2014: Suggestion howto fix #205 by Alexander Heusingfeld
Dec 09, 2013: Favouring injection over initialcontext for #75 ejb stateless and statefull tests by kubamarchwicki
Dec 08, 2013: Test same stateless bean on every ctx lookup by kubamarchwicki
Dec 08, 2013: Removing obsolete servlets and index.jsp files by kubamarchwicki
Dec 02, 2013: Tests for ejb/stateless & ejb/stateful by Rafał Roppel
Nov 08, 2013: Cocommenting the test for now until ejb injection is identified by Arun Gupta
Nov 08, 2013: Cocommenting the test for now until ejb injection is identified by Arun Gupta
Nov 07, 2013: Commenting arquillian dependencies till it is sorted out by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/ejb/stateless/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/ejb-timer/index.html b/sample/ejb-timer/index.html
new file mode 100644
index 0000000..50fdfe5
--- /dev/null
+++ b/sample/ejb-timer/index.html
@@ -0,0 +1,42 @@
+JavaEE Sample::EJB::Timer
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/ejb/timer/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 07, 2013: #75 wildfly ejb timer tests by kubamarchwicki
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/ejb/timer/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/el-standalone/index.html b/sample/el-standalone/index.html
new file mode 100644
index 0000000..0c0faa8
--- /dev/null
+++ b/sample/el-standalone/index.html
@@ -0,0 +1,36 @@
+JavaEE Sample::EL::Standalone
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/el/standalone/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
Nov 12, 2013: Dropped servlet and jsp by Alexis Hassler
Nov 12, 2013: Added arquillian test for the el/standalone example. and it's cool !!! by Alexis Hassler
Oct 27, 2013: Fixing a typo by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/el/standalone/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/index.html b/sample/index.html
new file mode 100644
index 0000000..884c7b2
--- /dev/null
+++ b/sample/index.html
@@ -0,0 +1,11 @@
+Showcase
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/interceptor/around-construct/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
Dec 31, 2013: Fixed class header by Radim Hanus
Dec 31, 2013: Added top-level directory interceptor and its first module around-construct to demonstrate using @aroundconstruct by Radim Hanus
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/interceptor/around-construct/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jacc-contexts/index.html b/sample/jacc-contexts/index.html
new file mode 100644
index 0000000..b0c9962
--- /dev/null
+++ b/sample/jacc-contexts/index.html
@@ -0,0 +1,145 @@
+JavaEE Sample::::Contexts
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jacc/contexts/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=SubjectFromPolicyContextTestmvn test -Dtest=RequestFromPolicyContextTest
This test demonstrates both how to obtain the {@link Subject} and then how to indirectly retrieve the roles from
+this Subject.
+<p>
+This will be done by calling a Servlet that retrieves the {@link Subject} of the authenticated user.
+Authentication happens via the {@link TestServerAuthModule} when the "doLogin" parameter is present in
+the request.
+<p>
+The Subject (a "bag of principals") typically contains the user name principal that can also be obtained via
+{@link HttpServletRequest#getUserPrincipal()} and may contain the roles this user has. But, it has never
+been standardized in Java EE which principal (attribute) of the Subject represents the user name and
+which ones represent the roles, so every container does it differently. On top of that JACC did not specify
+that the Subject should be returned and implementations not rarely return a Subject that contains only the
+user name principal instead of the real Subject with all principals.
+<p>
+Via a somewhat obscure workaround via JACC it’s possible to fetch the roles from the Subject
+in a standard way.
+See <a href="https://blogs.oracle.com/monzillo/entry/using_jacc_to_determine_a">Using JACC to determine a caller’s roles</a>
+<p>
+
Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
Tests that we are able to obtain a reference to the {@link Subject} from a Servlet and
+use JACC to get the roles the user from its principals.
+
+
+
@Test
+public void testCanObtainRolesFromSubjectInServlet() throws IOException, SAXException {
+
+ String response = getFromServerPath("subjectServlet?doLogin");
+
+ // The role that was assigned to the user in TestServerAuthModule
+ assertTrue(response.contains("User has role architect"));
+
+ // Servlet 13.3; Every authenticated user should have this role and isUserInRole should return true
+ // when tested.
+ assertTrue(response.contains("User has role **"));
+}
+
+
RequestFromPolicyContextTest
+
This tests demonstrates how code can obtain a reference to the {@link HttpServletRequest} from the JACC
+context.
+
Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
Tests that the {@link HttpServletRequest} reference that we obtained from JACC in a Servlet actually
+works by getting a request attribute and request parameter from it.
+
+
+
@Test
+public void testDataInServlet() throws IOException, SAXException {
+
+ String response = getFromServerPath("requestServlet?jacc_test=true");
+
+ assertTrue(
+ "Request scope attribute not present in request obtained from context in Servlet, but should have been",
+ response.contains("Attribute present in request from context.")
+ );
+
+ assertTrue(
+ "Request parameter not present in request obtained from context in Servlet, but should have been",
+ response.contains("Request parameter present in request from context.")
+ );
+}
+
+
+
Tests that the {@link HttpServletRequest} reference that we obtained from JACC in an EJB actually
+works by getting a request attribute and request parameter from it.
+
+
+
@Test
+public void testDataInEJB() throws IOException, SAXException {
+
+ String response = getFromServerPath("requestServlet?jacc_test=true");
+
+ assertTrue(
+ "Request scope attribute not present in request obtained from context in EJB, but should have been",
+ response.contains("Attribute present in request from context.")
+ );
+
+ assertTrue(
+ "Request parameter not present in request obtained from context in EJB, but should have been",
+ response.contains("Request parameter present in request from context.")
+ );
+}
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jan 31, 2014: A few jacc related; getting the request and subject from the policy by arjan tijms
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jacc/contexts/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaspic-async-authentication/index.html b/sample/jaspic-async-authentication/index.html
new file mode 100644
index 0000000..787cae9
--- /dev/null
+++ b/sample/jaspic-async-authentication/index.html
@@ -0,0 +1,32 @@
+JavaEE Sample::JASPIC::Async authentication
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaspic/async-authentication/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 25, 2014: Basic test for async requests and jaspic by arjan.tijms
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaspic/async-authentication/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaspic-basic-authentication/index.html b/sample/jaspic-basic-authentication/index.html
new file mode 100644
index 0000000..1b8d4ea
--- /dev/null
+++ b/sample/jaspic-basic-authentication/index.html
@@ -0,0 +1,230 @@
+JavaEE Sample::JASPIC::Basic authentication
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaspic/basic-authentication/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=BasicAuthenticationProtectedTestmvn test -Dtest=BasicAuthenticationPublicTestmvn test -Dtest=BasicAuthenticationStatelessTest
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
+
+
@Test
+public void testProtectedPageNotLoggedin() throws IOException, SAXException {
+
+ String response = getFromServerPath("protected/servlet");
+
+ // Not logged-in thus should not be accessible.
+ assertFalse(response.contains("This is a protected servlet"));
+}
+
+
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
+
+
@Test
+public void testProtectedPageLoggedin() throws IOException, SAXException {
+
+ String response = getFromServerPath("protected/servlet?doLogin=true");
+
+ // Now has to be logged-in so page is accessible
+ assertTrue(response.contains("This is a protected servlet"));
+}
+
+
BasicAuthenticationPublicTest
+
This tests that we can login from a public page (a page for which no security constraints have been set).
+
Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
+
+
@Test
+public void testPublicPageNotLoggedin() throws IOException, SAXException {
+
+ String response = getFromServerPath("public/servlet");
+
+ // Not logged-in
+ assertTrue(response.contains("web username: null"));
+ assertTrue(response.contains("web user has role \"architect\": false"));
+}
+
+
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
+
+
@Test
+public void testPublicPageLoggedin() throws IOException, SAXException {
+
+ // JASPIC has to be able to authenticate a user when accessing a public (non-protected) resource.
+
+ String response = getFromServerPath("public/servlet?doLogin");
+
+ // Now has to be logged-in
+ assertTrue(response.contains("web username: test"));
+ assertTrue(response.contains("web user has role \"architect\": true"));
+}
+
+
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
+
+
@Test
+public void testPublicPageNotRememberLogin() throws IOException, SAXException {
+
+
+ // -------------------- Request 1 ---------------------------
+
+ String response = getFromServerPath("public/servlet");
+
+ // Not logged-in
+ assertTrue(response.contains("web username: null"));
+ assertTrue(response.contains("web user has role \"architect\": false"));
+
+
+ // -------------------- Request 2 ---------------------------
+
+ response = getFromServerPath("public/servlet?doLogin");
+
+ // Now has to be logged-in
+ assertTrue(response.contains("web username: test"));
+ assertTrue(response.contains("web user has role \"architect\": true"));
+
+
+ // -------------------- Request 3 ---------------------------
+
+ response = getFromServerPath("public/servlet");
+
+ // Not logged-in
+ assertTrue(response.contains("web username: null"));
+ assertTrue(response.contains("web user has role \"architect\": false"));
+}
+
+
BasicAuthenticationStatelessTest
Missing a description for the story. Add some javadoc to the TestClass. Show me how!
Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
Tests that access to a protected page does not depend on the authenticated identity that was established in a previous
+request.
+
+
+
@Test
+public void testProtectedAccessIsStateless() throws IOException, SAXException {
+
+
+ // -------------------- Request 1 ---------------------------
+
+ // Accessing protected page without login
+ String response = getFromServerPath("protected/servlet");
+
+ // Not logged-in thus should not be accessible.
+ assertFalse(response.contains("This is a protected servlet"));
+
+
+ // -------------------- Request 2 ---------------------------
+
+ // JASPIC is stateless and login (re-authenticate) has to happen for every request
+ //
+ // If the following fails but "testProtectedPageLoggedin" has succeeded,
+ // the container has probably remembered the "unauthenticated identity", e.g. it has remembered that
+ // we're not authenticated and it will deny further attempts to authenticate. This may happen when
+ // the container does not correctly recognize the JASPIC protocol for "do nothing".
+
+ response = getFromServerPath("protected/servlet?doLogin");
+
+ // Now has to be logged-in so page is accessible
+ assertTrue("Could not access protected page, but should be able to. "
+ + "Did the container remember the previously set 'unauthenticated identity'?",
+ response.contains("This is a protected servlet"));
+
+
+ // -------------------- Request 3 ---------------------------
+
+ // JASPIC is stateless and login (re-authenticate) has to happen for every request
+ //
+ // In the following method we do a call without logging in after one where we did login.
+ // The container should not remember this login and has to deny access.
+ response = getFromServerPath("protected/servlet");
+
+ // Not logged-in thus should not be accessible.
+ assertFalse("Could access protected page, but should not be able to. "
+ + "Did the container remember the authenticated identity that was set in previous request?",
+ response.contains("This is a protected servlet"));
+}
+
+
+
Tests that access to a protected page does not depend on the authenticated identity that was established in a previous
+request, but use a different request order than the previous test.
+
+
+
@Test
+public void testProtectedAccessIsStateless2() throws IOException, SAXException {
+
+ // -------------------- Request 1 ---------------------------
+
+ // Start with doing a login
+ String response = getFromServerPath("protected/servlet?doLogin");
+
+
+ // -------------------- Request 2 ---------------------------
+
+ // JASPIC is stateless and login (re-authenticate) has to happen for every request
+ //
+ // In the following method we do a call without logging in after one where we did login.
+ // The container should not remember this login and has to deny access.
+
+ // Accessing protected page without login
+ response = getFromServerPath("protected/servlet");
+
+ // Not logged-in thus should not be accessible.
+ assertFalse("Could access protected page, but should not be able to. "
+ + "Did the container remember the authenticated identity that was set in previous request?",
+ response.contains("This is a protected servlet"));
+}
+
+
+
Tests independently from being able to access a protected resource if any details of a previously established
+authenticated identity are remembered
+
+
+
@Test
+public void testUserIdentityIsStateless() throws IOException, SAXException {
+
+
+ // -------------------- Request 1 ---------------------------
+
+ // Accessing protected page with login
+ String response = getFromServerPath("protected/servlet?doLogin");
+
+
+ // -------------------- Request 2 ---------------------------
+
+ // Accessing public page without login
+ response = getFromServerPath("public/servlet");
+
+ // No details should linger around
+ assertFalse("User principal was 'test', but it should be null here. "
+ + "The container seemed to have remembered it from the previous request.",
+ response.contains("web username: test"));
+ assertTrue("User principal was not null, but it should be null here. ",
+ response.contains("web username: null"));
+ assertTrue("The unauthenticated user has the role 'architect', which should not be the case. "
+ + "The container seemed to have remembered it from the previous request.",
+ response.contains("web user has role \"architect\": false"));
+}
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jan 11, 2014: Replaced httpunit by htmlunit, added convenience method for getting raw by arjan tijms
Jan 07, 2014: Add jboss-web.xml to web deployments by Stefan Guilhen
Dec 10, 2013: Port of jaspic tests from by arjan tijms
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaspic/basic-authentication/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaspic-common/index.html b/sample/jaspic-common/index.html
new file mode 100644
index 0000000..7da60ef
--- /dev/null
+++ b/sample/jaspic-common/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JASPIC::Common
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaspic/common/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jan 11, 2014: Replaced httpunit by htmlunit, added convenience method for getting raw by arjan tijms
Jan 07, 2014: Add jboss-web.xml to web deployments by Stefan Guilhen
Dec 10, 2013: Port of jaspic tests from by arjan tijms
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaspic/common/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaspic-ejb-propagation/index.html b/sample/jaspic-ejb-propagation/index.html
new file mode 100644
index 0000000..c18ecf0
--- /dev/null
+++ b/sample/jaspic-ejb-propagation/index.html
@@ -0,0 +1,87 @@
+JavaEE Sample::JASPIC::Ejb propagation
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaspic/ejb-propagation/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=ProtectedEJBPropagationTestmvn test -Dtest=PublicEJBPropagationTest
This tests that the established authenticated identity propagates correctly from the web layer to a "protected" EJB (an EJB
+with declarative role checking).
+
Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
+
+
@Test
+public void testProtectedServletWithLoginCallingEJB() throws IOException, SAXException {
+
+ String response = getFromServerPath("protected/servlet-protected-ejb?doLogin");
+
+ // Both the web (HttpServletRequest) and EJB (EJBContext) should see the same
+ // user name.
+ assertTrue(response.contains("web username: test"));
+ assertTrue("Web has user principal set, but EJB not.", response.contains("EJB username: test"));
+
+ // Both the web (HttpServletRequest) and EJB (EJBContext) should see that the
+ // user has the role "architect".
+ assertTrue(response.contains("web user has role \"architect\": true"));
+ assertTrue("Web user principal has role \"architect\", but one in EJB doesn't.",
+ response.contains("EJB user has role \"architect\": true"));
+}
+
+
+
A small variation on the testProtectedServletWithLoginCallingEJB that tests if for authentication that happened for
+public resources the security context also propagates to EJB.
+
+
+
@Test
+public void testPublicServletWithLoginCallingEJB() throws IOException, SAXException {
+
+ String response = getFromServerPath("public/servlet-protected-ejb?doLogin");
+
+ // Both the web (HttpServletRequest) and EJB (EJBContext) should see the same
+ // user name.
+ assertTrue(response.contains("web username: test"));
+ assertTrue("Web has user principal set, but EJB not.", response.contains("EJB username: test"));
+
+ // Both the web (HttpServletRequest) and EJB (EJBContext) should see that the
+ // user has the role "architect".
+ assertTrue(response.contains("web user has role \"architect\": true"));
+ assertTrue("Web user principal has role \"architect\", but one in EJB doesn't.",
+ response.contains("EJB user has role \"architect\": true"));
+}
+
+
PublicEJBPropagationTest
+
This tests that the established authenticated identity propagates correctly from the web layer to a "public" EJB (an EJB
+without declarative role checking).
+
Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
+
+
@Test
+public void testProtectedServletWithLoginCallingEJB() throws IOException, SAXException {
+
+ String response = getFromServerPath("protected/servlet-public-ejb?doLogin");
+
+ // Both the web (HttpServletRequest) and EJB (EJBContext) should see the same
+ // user name.
+ assertTrue(response.contains("web username: test"));
+ assertTrue("Web has user principal set, but EJB not.", response.contains("EJB username: test"));
+}
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jan 11, 2014: Replaced httpunit by htmlunit, added convenience method for getting raw by arjan tijms
Jan 07, 2014: Add jboss-web.xml to web deployments by Stefan Guilhen
Dec 10, 2013: Port of jaspic tests from by arjan tijms
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaspic/ejb-propagation/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaspic-lifecycle/index.html b/sample/jaspic-lifecycle/index.html
new file mode 100644
index 0000000..ec55483
--- /dev/null
+++ b/sample/jaspic-lifecycle/index.html
@@ -0,0 +1,76 @@
+JavaEE Sample::JASPIC::Lifecycle
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaspic/lifecycle/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
This tests that the two main methods of a SAM, {@link ServerAuthModule#validateRequest} and
+{@link ServerAuthModule#secureResponse} are called at the right time, which is resp. before and after the resource (e.g. a
+Servlet) is invoked.
+
Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
Test that the main SAM methods are called and are called in the correct order.
+
+
+
The rule seems simple:
+<ul>
+<li>First call validateRequest() in the SAM.
+<li>Then invoke the requested resource (e.g. a Servlet or JSP page)
+<li>Finally call secureResponse() in the SAM
+</ul>
+
+
+
@Test
+public void testBasicSAMMethodsCalled() throws IOException, SAXException {
+
+ String response = getFromServerPath("protected/servlet");
+
+
+ // First test if individual methods are called
+ assertTrue("SAM method validateRequest not called, but should have been.",
+ response.contains("validateRequest invoked"));
+ assertTrue("Resource (Servlet) not invoked, but should have been.", response.contains("Resource invoked"));
+
+ // The previous two methods are rare to not be called, but secureResponse is more likely to fail. Seemingly it's hard
+ // to understand what this method should do exactly.
+ assertTrue("SAM method secureResponse not called, but should have been.",
+ response.contains("secureResponse invoked"));
+
+ // Finally the order should be correct. More than a few implementations call secureResponse before the resource is
+ // invoked.
+ assertTrue("SAM methods called in wrong order",
+ response.contains("validateRequest invoked\nResource invoked\nsecureResponse invoked\n"));
+}
+
+
+
Test that the SAM’s cleanSubject method is called following a call to {@link HttpServletRequest#logout()}.
+<p>
+Although occasionally a JASPIC 1.0 implementation indeed does this, it’s only mandated that this happens in JASPIC 1.1
+
+
+
@Test
+public void testLogout() throws IOException, SAXException {
+
+ // Note that we don't explicitly log-in; the test SAM uses for this test does that automatically before the resource
+ // (servlet)
+ // is invoked. Once we reach the Servlet we should be logged-in and can proceed to logout.
+ String response = getFromServerPath("protected/servlet?doLogout");
+
+ assertTrue("SAM method cleanSubject not called, but should have been.",
+ response.contains("cleanSubject invoked"));
+}
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jan 11, 2014: Replaced httpunit by htmlunit, added convenience method for getting raw by arjan tijms
Jan 07, 2014: Add jboss-web.xml to web deployments by Stefan Guilhen
Dec 10, 2013: Port of jaspic tests from by arjan tijms
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaspic/lifecycle/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaspic-register-session/index.html b/sample/jaspic-register-session/index.html
new file mode 100644
index 0000000..b27eaee
--- /dev/null
+++ b/sample/jaspic-register-session/index.html
@@ -0,0 +1,149 @@
+JavaEE Sample::JASPIC::Register session
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaspic/register-session/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
+
+
@Test
+public void testRemembersSession() throws IOException, SAXException {
+
+
+ // -------------------- Request 1 ---------------------------
+
+ // Accessing protected page without login
+ String response = getFromServerPath("protected/servlet");
+
+ // Not logged-in thus should not be accessible.
+ assertFalse(response.contains("This is a protected servlet"));
+
+
+ // -------------------- Request 2 ---------------------------
+
+ // We access the protected page again and now login
+
+ response = getFromServerPath("protected/servlet?doLogin");
+
+ // Now has to be logged-in so page is accessible
+ assertTrue("Could not access protected page, but should be able to. "
+ + "Did the container remember the previously set 'unauthenticated identity'?",
+ response.contains("This is a protected servlet"));
+
+
+ // -------------------- Request 3 ---------------------------
+
+ // JASPIC is normally stateless, but for this test the SAM uses the register session feature so now
+ // we should be logged-in when doing a call without explicitly logging in again.
+
+ response = getFromServerPath("protected/servlet?continueSession");
+
+ // Logged-in thus should be accessible.
+ assertTrue("Could not access protected page, but should be able to. "
+ + "Did the container not remember the authenticated identity via 'javax.servlet.http.registerSession'?",
+ response.contains("This is a protected servlet"));
+
+ // Both the user name and roles/groups have to be restored
+
+ // *** NOTE ***: The JASPIC 1.1 spec is NOT clear about remembering roles, but spec lead Ron Monzillo clarified that
+ // this should indeed be the case. The next JASPIC revision of the spec will have to mention this explicitly.
+ // Intuitively it should make sense though that the authenticated identity is fully restored and not partially,
+ // but again the spec should make this clear to avoid ambiguity.
+ assertTrue(response.contains("web username: test"));
+ assertTrue(response.contains("web user has role \"architect\": true"));
+
+
+ // -------------------- Request 4 ---------------------------
+
+ // The session should also be remembered for other resources, including public ones
+
+ response = getFromServerPath("public/servlet?continueSession");
+
+ // This test almost can't fail, but include for clarity
+ assertTrue(response.contains("This is a public servlet"));
+
+ // When accessing the public page, the username and roles should be restored and be available
+ // just as on protected pages
+ assertTrue(response.contains("web username: test"));
+ assertTrue(response.contains("web user has role \"architect\": true"));
+}
+
+
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
+
+
@Test
+public void testJoinSessionIsOptional() throws IOException, SAXException {
+
+
+ // -------------------- Request 1 ---------------------------
+
+ // We access a protected page and login
+ //
+
+ String response = getFromServerPath("protected/servlet?doLogin");
+
+ // Now has to be logged-in so page is accessible
+ assertTrue("Could not access protected page, but should be able to. "
+ + "Did the container remember the previously set 'unauthenticated identity'?",
+ response.contains("This is a protected servlet"));
+
+
+ // -------------------- Request 2 ---------------------------
+
+ // JASPIC is normally stateless, but for this test the SAM uses the register session feature so now
+ // we should be logged-in when doing a call without explicitly logging in again.
+
+ response = getFromServerPath("protected/servlet?continueSession");
+
+ // Logged-in thus should be accessible.
+ assertTrue("Could not access protected page, but should be able to. "
+ + "Did the container not remember the authenticated identity via 'javax.servlet.http.registerSession'?",
+ response.contains("This is a protected servlet"));
+
+ // Both the user name and roles/groups have to be restored
+
+ // *** NOTE ***: The JASPIC 1.1 spec is NOT clear about remembering roles, but spec lead Ron Monzillo clarified that
+ // this should indeed be the case. The next JASPIC revision of the spec will have to mention this explicitly.
+ // Intuitively it should make sense though that the authenticated identity is fully restored and not partially,
+ // but again the spec should make this clear to avoid ambiguity.
+ assertTrue(response.contains("web username: test"));
+ assertTrue(response.contains("web user has role \"architect\": true"));
+
+
+ // -------------------- Request 3 ---------------------------
+
+ // Although the container remembers the authentication session, the SAM needs to OPT-IN to it.
+ // If the SAM instead "does nothing", we should not have access to the protected resource anymore
+ // even within the same HTTP session.
+
+ response = getFromServerPath("protected/servlet");
+ assertFalse(response.contains("This is a protected servlet"));
+
+
+ // -------------------- Request 4 ---------------------------
+
+ // Access to a public page is unaffected by joining or not joining the session, but if we do not join the
+ // session we shouldn't see the user's name and roles.
+
+ // THIS NOW FAILS ON GLASSFISH 4.0. CHECKED WITH RON MONZILLO THAT THIS IS INDEED AN ERROR AND FILED A BUG
+
+ response = getFromServerPath("public/servlet");
+
+ assertTrue(response.contains("This is a public servlet"));
+ assertFalse(response.contains("web username: test"));
+ assertFalse(response.contains("web user has role \"architect\": true"));
+}
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jan 11, 2014: Replaced httpunit by htmlunit, added convenience method for getting raw by arjan tijms
Jan 07, 2014: Add jboss-web.xml to web deployments by Stefan Guilhen
Dec 14, 2013: Re-enabled test by arjan tijms
Dec 14, 2013: Added test for the javax.servlet.http.registersession feature and by arjan tijms
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaspic/register-session/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaspic-wrapping/index.html b/sample/jaspic-wrapping/index.html
new file mode 100644
index 0000000..432a117
--- /dev/null
+++ b/sample/jaspic-wrapping/index.html
@@ -0,0 +1,47 @@
+JavaEE Sample::JASPIC::Wrapping
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaspic/wrapping/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
+
+
@Test
+public void testRequestWrapping() throws IOException, SAXException {
+
+ String response = getFromServerPath("protected/servlet");
+
+ // The SAM wrapped a request so that it always contains the request attribute "isWrapped" with value true.
+ assertTrue("Request wrapped by SAM did not arrive in Servlet.",
+ response.contains("request isWrapped: true"));
+}
+
+
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
+
+
@Test
+public void testResponseWrapping() throws IOException, SAXException {
+
+ String response = getFromServerPath("protected/servlet");
+
+ // The SAM wrapped a response so that it always contains the header "isWrapped" with value true.
+ assertTrue("Response wrapped by SAM did not arrive in Servlet.",
+ response.contains("response isWrapped: true"));
+}
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jan 11, 2014: Replaced httpunit by htmlunit, added convenience method for getting raw by arjan tijms
Jan 07, 2014: Add jboss-web.xml to web deployments by Stefan Guilhen
Dec 10, 2013: Port of jaspic tests from by arjan tijms
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaspic/wrapping/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/javamail-definition/index.html b/sample/javamail-definition/index.html
new file mode 100644
index 0000000..bf60213
--- /dev/null
+++ b/sample/javamail-definition/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JavaMail::Definition
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/javamail/definition/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 13, 2013: Fixing the property names, although commented by Arun Gupta
Sep 13, 2013: Using transport.sendmessage instead of transport.send did the trick. thanks bill! by Arun Gupta
Sep 13, 2013: Cleaning up the code and putting on backburner until the issues are fixed by Arun Gupta
Sep 13, 2013: Cleaning up the code and reading correct attributes from .javamail by Arun Gupta
Sep 13, 2013: Changing the format of .javamail by Arun Gupta
Sep 12, 2013: Intermittent commit for debugging purpose by Arun Gupta
Sep 12, 2013: Using a credentials class to read the username, password, and to field. also adding timestamp in email subject by Arun Gupta
Sep 12, 2013: Naming the servlets appropriately by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/javamail/definition/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-angularjs/index.html b/sample/jaxrs-angularjs/index.html
new file mode 100644
index 0000000..4e219fc
--- /dev/null
+++ b/sample/jaxrs-angularjs/index.html
@@ -0,0 +1,120 @@
+JavaEE Sample::JAXRS::Angularjs
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/angularjs/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
Aug 12, 2014: Enforcing weld to scan only those archives which have beans.xml in it. otherwise any other 3rd party library which is using jsr-330 annotations will cause the deployment in cdi 1.1 environment (java ee 7) to fail. for example guava used in angularjs tests. related issue: #245 by Bartosz Majsak
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 03, 2013: #10 angular js consuming rest services by bernard
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/angularjs/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-async-client/index.html b/sample/jaxrs-async-client/index.html
new file mode 100644
index 0000000..e40e138
--- /dev/null
+++ b/sample/jaxrs-async-client/index.html
@@ -0,0 +1,171 @@
+JavaEE Sample::JAXRS::Async Client
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/async-client/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=MyResourceTest
Invoke a JAX-RS service via an asynchronous client
For JAX-RS to expose our service we need to provide an implementation of
+the JAX-RSApplication class to define our root path.
+
+
+
+
@ApplicationPath("webresources")
+public class MyApplication extends Application {
+
+ public MyApplication();
+}
+
+
+
Since JAX-RS webservices are, well, web related and require a
+web context, they are required to be deployed within a web archive.
+By default, JAX-RS will perform autodiscovery of our services.
+That means there is no need to add a web.xml in this scenario.
+
+
+
Based on the definition of our @Deployment method, we will be
+creating and deploying the following archive structure.
Now we are free to invoke our deployed service by using the JAX-RS
+client library.
+
+
+
The asynchronous client library comes with multiple option on how
+to invoke the methods. First let’s look at using the Future option
+with access to the complete Response.
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Sep 10, 2014: Fix typo and remove not very helpful ' ;) by Max Rydahl Andersen
Jul 15, 2014: Removed default header by Roberto Cortez
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jan 13, 2014: Fix typo in jax-rs::async-client description by Aslak Knutsen
Jan 10, 2014: Add description to jax-rs:async-client sample by Aslak Knutsen
Dec 03, 2013: Change to use client.target(uri) to be compatible with jax-rs 1.0 by Aslak Knutsen
Nov 12, 2013: Convert jax-rs samples to arquillian: async client by Aslak Knutsen
Nov 08, 2013: Initializing the client before each test by Arun Gupta
Nov 07, 2013: Converting servlet into tests by Arun Gupta
Oct 27, 2013: Removing redundant dependencies by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/async-client/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-async-server/index.html b/sample/jaxrs-async-server/index.html
new file mode 100644
index 0000000..fde2fe3
--- /dev/null
+++ b/sample/jaxrs-async-server/index.html
@@ -0,0 +1,31 @@
+JavaEE Sample::JAXRS::Async server
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/async-server/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed default header by Roberto Cortez
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 03, 2013: Change to use client.target(uri) to be compatible with jax-rs 1.0 by Aslak Knutsen
Nov 12, 2013: Convert jax-rs samples to arquillian: async server by Aslak Knutsen
Nov 07, 2013: Cleaning up test by Arun Gupta
Nov 07, 2013: Adding tests by Arun Gupta
Nov 07, 2013: Fixed servlet title by Arun Gupta
Nov 07, 2013: Using jndi lookup for managed thread factory by Arun Gupta
Nov 07, 2013: Removing redundant attributes on @webservlet by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/async-server/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-beanparam/index.html b/sample/jaxrs-beanparam/index.html
new file mode 100644
index 0000000..ef30eda
--- /dev/null
+++ b/sample/jaxrs-beanparam/index.html
@@ -0,0 +1,30 @@
+JavaEE Sample::JAXRS::Beanparam
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/beanparam/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
May 26, 2014: Adding jax-rs @beanparam example by Xavier Coulon
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/beanparam/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-beanvalidation/index.html b/sample/jaxrs-beanvalidation/index.html
new file mode 100644
index 0000000..89916f2
--- /dev/null
+++ b/sample/jaxrs-beanvalidation/index.html
@@ -0,0 +1,98 @@
+JavaEE Sample::JAXRS::Beanvalidation
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/beanvalidation/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed default header by Roberto Cortez
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jul 10, 2014: Adding new tests for jaxrs/bean validation by arun-gupta
Dec 03, 2013: Change to use client.target(uri) to be compatible with jax-rs 1.0 by Aslak Knutsen
Nov 12, 2013: Convert jax-rs samples to arquillian: beanvalidation by Aslak Knutsen
Nov 07, 2013: Adding tests by Arun Gupta
Nov 07, 2013: Removing redundant attributes on @webservlet by Arun Gupta
Oct 27, 2013: Removing redundant dependencies by Arun Gupta
Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/beanvalidation/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-client-negotiation/index.html b/sample/jaxrs-client-negotiation/index.html
new file mode 100644
index 0000000..0b4a586
--- /dev/null
+++ b/sample/jaxrs-client-negotiation/index.html
@@ -0,0 +1,38 @@
+JavaEE Sample::JAXRS::Client negotiation
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/client-negotiation/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed default header by Roberto Cortez
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 03, 2013: Change to use client.target(uri) to be compatible with jax-rs 1.0 by Aslak Knutsen
Nov 12, 2013: Convert jax-rs samples to arquillian: client negotiation by Aslak Knutsen
Nov 07, 2013: Adding xmlassert and jsonassert for comparing xml and json by Arun Gupta
Nov 07, 2013: Adding tests by Arun Gupta
Nov 07, 2013: Removed glassfish-specific dependencies by Arun Gupta
Nov 07, 2013: Fixing a name by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 03, 2013: Adding a new sample to show client-side content negotiation by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/client-negotiation/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-db-access/index.html b/sample/jaxrs-db-access/index.html
new file mode 100644
index 0000000..4716c2c
--- /dev/null
+++ b/sample/jaxrs-db-access/index.html
@@ -0,0 +1,44 @@
+JavaEE Sample::JAXRS::Db access
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/db-access/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Apr 04, 2014: Adding a new test to show databse access from a jax-rs resource by arun-gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/db-access/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-dynamicfilter/index.html b/sample/jaxrs-dynamicfilter/index.html
new file mode 100644
index 0000000..e9b2413
--- /dev/null
+++ b/sample/jaxrs-dynamicfilter/index.html
@@ -0,0 +1,41 @@
+JavaEE Sample::JAXRS::Dynamicfilter
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/dynamicfilter/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed default header by Roberto Cortez
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 03, 2013: Change to use client.target(uri) to be compatible with jax-rs 1.0 by Aslak Knutsen
Nov 21, 2013: Removing @provider as the filter is dynamically registered by Arun Gupta
Nov 21, 2013: Removing @serverlogged so that serverloggingfilter is picked up automatically by Arun Gupta
Nov 21, 2013: Cleaning up the test - still failing with wildfly beta2 snapshot, needs further investigation by Arun Gupta
Nov 12, 2013: Convert jax-rs samples to arquillian: dynamic filter by Aslak Knutsen
Nov 07, 2013: Adding test by Arun Gupta
Oct 27, 2013: Remoremoving redundant dependencies by Arun Gupta
Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/dynamicfilter/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-fileupload/index.html b/sample/jaxrs-fileupload/index.html
new file mode 100644
index 0000000..b598b80
--- /dev/null
+++ b/sample/jaxrs-fileupload/index.html
@@ -0,0 +1,63 @@
+JavaEE Sample::JAXRS::Fileupload
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/fileupload/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
May 28, 2014: Jax-rs fileupload sample project by Xavier Coulon
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/fileupload/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-filter-interceptor/index.html b/sample/jaxrs-filter-interceptor/index.html
new file mode 100644
index 0000000..48100f9
--- /dev/null
+++ b/sample/jaxrs-filter-interceptor/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JAXRS::Filter interceptor
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/filter-interceptor/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
Oct 27, 2013: Making the output statement consistent with server filter by Arun Gupta
Oct 27, 2013: Removing redundant dependencies by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/filter-interceptor/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-filter/index.html b/sample/jaxrs-filter/index.html
new file mode 100644
index 0000000..bfb564b
--- /dev/null
+++ b/sample/jaxrs-filter/index.html
@@ -0,0 +1,45 @@
+JavaEE Sample::JAXRS::Filter
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/filter/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
@Test
+public void testGetFruit() {
+ String result = target.request().get(String.class);
+ assertEquals("Likely that the headers set in the filter were not available in endpoint",
+ "apple",
+ result);
+}
+
+
+
Test of getFruit2 method, of class MyResource.
+
+
+
@Test
+public void testPostFruit() {
+ String result = target.request().post(Entity.text("apple"), String.class);
+ assertEquals("Likely that the headers set in the filter were not available in endpoint",
+ "apple",
+ result);
+}
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed default header by Roberto Cortez
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 03, 2013: Change to use client.target(uri) to be compatible with jax-rs 1.0 by Aslak Knutsen
Nov 12, 2013: Convert jax-rs samples to arquillian: filter by Aslak Knutsen
Nov 07, 2013: Removing jsp/servlet, adding tests by Arun Gupta
Oct 27, 2013: Making the output statement consistent with server filter by Arun Gupta
Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
Oct 27, 2013: Removing redundant dependencies by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/filter/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-interceptor/index.html b/sample/jaxrs-interceptor/index.html
new file mode 100644
index 0000000..0e4b005
--- /dev/null
+++ b/sample/jaxrs-interceptor/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JAXRS::Interceptor
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/interceptor/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Oct 27, 2013: Removing redundant dependencies by Arun Gupta
Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/interceptor/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-invocation-async/index.html b/sample/jaxrs-invocation-async/index.html
new file mode 100644
index 0000000..06a3f43
--- /dev/null
+++ b/sample/jaxrs-invocation-async/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JAXRS::Invocation async
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/invocation-async/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Nov 08, 2013: Removing glassfish-specific dependencies by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/invocation-async/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-invocation/index.html b/sample/jaxrs-invocation/index.html
new file mode 100644
index 0000000..4be2cd4
--- /dev/null
+++ b/sample/jaxrs-invocation/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JAXRS::Invocation
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/invocation/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Oct 27, 2013: Removing redundant dependencies by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/invocation/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-jaxrs-client/index.html b/sample/jaxrs-jaxrs-client/index.html
new file mode 100644
index 0000000..c0ec3ae
--- /dev/null
+++ b/sample/jaxrs-jaxrs-client/index.html
@@ -0,0 +1,137 @@
+JavaEE Sample::JAXRS::Jaxrs client
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/jaxrs-client/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 11, 2014: Fixed and improved tests for jaxrs client and singleton due to tomee failures by Roberto Cortez
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Apr 04, 2014: Removing redundant copyright by arun-gupta
Dec 03, 2013: Change to use client.target(uri) to be compatible with jax-rs 1.0 by Aslak Knutsen
Nov 21, 2013: Formatting changes by Arun Gupta
Nov 12, 2013: Convert jax-rs samples to arquillian: jax-rs client by Aslak Knutsen
Nov 08, 2013: Moved resteasy jaxb module to parent pom.xml by Arun Gupta
Nov 08, 2013: Fix test failures by Petr Sakař
Nov 08, 2013: Remove compile warnings by Petr Sakař
Nov 08, 2013: Bugfix - concurrentmodificationexception in personsessionbean deleteperson by Petr Sakař
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/jaxrs-client/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-jaxrs-endpoint/index.html b/sample/jaxrs-jaxrs-endpoint/index.html
new file mode 100644
index 0000000..c6a5e97
--- /dev/null
+++ b/sample/jaxrs-jaxrs-endpoint/index.html
@@ -0,0 +1,86 @@
+JavaEE Sample::JAXRS::Jaxrs endpoint
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/jaxrs-endpoint/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
Jul 15, 2014: Removed default header by Roberto Cortez
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
Dec 03, 2013: Change to use client.target(uri) to be compatible with jax-rs 1.0 by Aslak Knutsen
Nov 12, 2013: Convert jax-rs samples to arquillian: jax-rs endpoint by Aslak Knutsen
Nov 12, 2013: Add wildfly managed/remote and glassfish embedded arquillian profiles by Aslak Knutsen
Nov 08, 2013: Removing redundant test by Arun Gupta
Nov 07, 2013: Resteasy dependency moved to parent pom in a specific profile by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/jaxrs-endpoint/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-jaxrs-security-declarative/index.html b/sample/jaxrs-jaxrs-security-declarative/index.html
new file mode 100644
index 0000000..720a7b1
--- /dev/null
+++ b/sample/jaxrs-jaxrs-security-declarative/index.html
@@ -0,0 +1,108 @@
+JavaEE Sample::JAXRS::Jaxrs security declarative
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/jaxrs-security-declarative/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 12, 2013: Adding a new sample/test for jax-rs basic authentication security by arun-gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/jaxrs-security-declarative/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-jsonp/index.html b/sample/jaxrs-jsonp/index.html
new file mode 100644
index 0000000..a5005d4
--- /dev/null
+++ b/sample/jaxrs-jsonp/index.html
@@ -0,0 +1,68 @@
+JavaEE Sample::JAXRS::Jsonp
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/jsonp/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jul 11, 2014: Convert to tests for json-p usage with jax-rs by arun-gupta
Dec 03, 2013: Change to use client.target(uri) to be compatible with jax-rs 1.0 by Aslak Knutsen
Nov 22, 2013: Adding a new arquillian-ready test, still failing with org.glassfish.json.jsonproviderimpl not found by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/jsonp/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-link/index.html b/sample/jaxrs-link/index.html
new file mode 100644
index 0000000..cf00aeb
--- /dev/null
+++ b/sample/jaxrs-link/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JAXRS::Link
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/link/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jul 11, 2014: Cleaning up some source code by arun-gupta
Oct 23, 2013: Make it compiled in glassfish 4 and wildfly 8 beta1 by Jeff Zhang
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/link/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-mapping-exceptions/index.html b/sample/jaxrs-mapping-exceptions/index.html
new file mode 100644
index 0000000..de03aad
--- /dev/null
+++ b/sample/jaxrs-mapping-exceptions/index.html
@@ -0,0 +1,49 @@
+JavaEE Sample::JAXRS::Mapping exceptions
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/mapping-exceptions/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed default header by Roberto Cortez
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 03, 2013: Change to use client.target(uri) to be compatible with jax-rs 1.0 by Aslak Knutsen
Nov 12, 2013: Convert jax-rs samples to arquillian: mapping exception by Aslak Knutsen
Nov 08, 2013: Removing web pages and converting to unit tests by Arun Gupta
Nov 08, 2013: Returning just the order id by Arun Gupta
Nov 08, 2013: Removing glassfish specific dependency by Arun Gupta
Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/mapping-exceptions/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-paramconverter/index.html b/sample/jaxrs-paramconverter/index.html
new file mode 100644
index 0000000..e11cf4a
--- /dev/null
+++ b/sample/jaxrs-paramconverter/index.html
@@ -0,0 +1,45 @@
+JavaEE Sample::JAXRS::Paramconverter
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/paramconverter/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
May 28, 2014: Jax-rs paramconverterprovider sample project by Xavier Coulon
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/paramconverter/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-readerwriter-injection/index.html b/sample/jaxrs-readerwriter-injection/index.html
new file mode 100644
index 0000000..7a116fe
--- /dev/null
+++ b/sample/jaxrs-readerwriter-injection/index.html
@@ -0,0 +1,51 @@
+JavaEE Sample::JAXRS::Readerwriter injection
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/readerwriter-injection/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed default header by Roberto Cortez
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 03, 2013: Remove messagebodyreader from client by Aslak Knutsen
Nov 22, 2013: Adding arquillian tests and dropping redundant files by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 10, 2013: Moving readerwriter-pu to readerwriter-injection by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/readerwriter-injection/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-readerwriter-json/index.html b/sample/jaxrs-readerwriter-json/index.html
new file mode 100644
index 0000000..d47ad17
--- /dev/null
+++ b/sample/jaxrs-readerwriter-json/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JAXRS::Readerwriter json
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/readerwriter-json/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
Sep 20, 2013: Adding @produces by Arun Gupta
Sep 20, 2013: Removing redundant attributes from @webservlet by Arun Gupta
Sep 20, 2013: Removing redundant imports by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/readerwriter-json/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-readerwriter/index.html b/sample/jaxrs-readerwriter/index.html
new file mode 100644
index 0000000..025fe73
--- /dev/null
+++ b/sample/jaxrs-readerwriter/index.html
@@ -0,0 +1,54 @@
+JavaEE Sample::JAXRS::Readerwriter
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/readerwriter/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed default header by Roberto Cortez
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 03, 2013: Remove messagebodyreader from the client by Aslak Knutsen
Nov 22, 2013: And removing redundant files by Arun Gupta
Nov 22, 2013: Adding new arquillian tests by Arun Gupta
Oct 27, 2013: Removing redundant statements by Arun Gupta
Sep 20, 2013: Better formatting of output messages by Arun Gupta
Sep 20, 2013: Adding better output messages by Arun Gupta
Sep 20, 2013: Removing redundant attributes from @webservlet by Arun Gupta
Sep 20, 2013: Adding a final qualifier by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/readerwriter/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-request-binding/index.html b/sample/jaxrs-request-binding/index.html
new file mode 100644
index 0000000..2ccf958
--- /dev/null
+++ b/sample/jaxrs-request-binding/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JAXRS::Request binding
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/request-binding/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/request-binding/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-resource-validation/index.html b/sample/jaxrs-resource-validation/index.html
new file mode 100644
index 0000000..e5d2e3b
--- /dev/null
+++ b/sample/jaxrs-resource-validation/index.html
@@ -0,0 +1,111 @@
+JavaEE Sample::JAXRS::Resource validation
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/resource-validation/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 03, 2013: Added test cases for null lastname, null firstname, email domain name by dagguh
Dec 03, 2013: Removed resteasy vendor lock by dagguh
Dec 02, 2013: Reduced duplication in test code by dagguh
Dec 02, 2013: Test case for successful name valdiation by dagguh
Dec 02, 2013: Trying to shrinkwrap the used messagebodywriter by dagguh
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 27, 2013: Added different types of validation with jax-rs (field, property, @valid) by Arun Gupta
Aug 27, 2013: Removing a redundant import by Arun Gupta
Aug 27, 2013: Iterating over both the targets by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/resource-validation/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-server-negotiation/index.html b/sample/jaxrs-server-negotiation/index.html
new file mode 100644
index 0000000..85538af
--- /dev/null
+++ b/sample/jaxrs-server-negotiation/index.html
@@ -0,0 +1,50 @@
+JavaEE Sample::JAXRS::Server negotiation
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/server-negotiation/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed default header by Roberto Cortez
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 03, 2013: Change to use client.target(uri) to be compatible with jax-rs 1.0 by Aslak Knutsen
Nov 12, 2013: Convert jax-rs samples to arquillian: server negotiation by Aslak Knutsen
Nov 08, 2013: Removing web pages/servlet and converting to unit tests by Arun Gupta
Nov 08, 2013: Fixing a name by Arun Gupta
Oct 02, 2013: Explicitly specifying application/* media type by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 04, 2013: Adding a logging statement by Arun Gupta
Aug 27, 2013: Fixing a log statement by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/server-negotiation/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxrs-singleton/index.html b/sample/jaxrs-singleton/index.html
new file mode 100644
index 0000000..21c82f9
--- /dev/null
+++ b/sample/jaxrs-singleton/index.html
@@ -0,0 +1,130 @@
+JavaEE Sample::JAXRS::singleton
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/singleton/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=ApplicationSingletonResourceTestmvn test -Dtest=AnnotatedSingletonResourceTest
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 11, 2014: Fixed and improved tests for jaxrs client and singleton due to tomee failures by Roberto Cortez
Jul 15, 2014: Removed default header by Roberto Cortez
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 03, 2013: Change to use client.target(uri) to be compatible with jax-rs 1.0 by Aslak Knutsen
Dec 03, 2013: Change to use client.target(string) to avoid jax-rs 1 vs 2 conflict by Aslak Knutsen
Nov 22, 2013: Fixing the application packaging for annotated and application case by Arun Gupta
Nov 22, 2013: Adding an interim version of meged singleton tests - annotated and application by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxrs/singleton/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxws-jaxws-client/index.html b/sample/jaxws-jaxws-client/index.html
new file mode 100644
index 0000000..98c9107
--- /dev/null
+++ b/sample/jaxws-jaxws-client/index.html
@@ -0,0 +1,63 @@
+JavaEE Sample::jaxws::Jaxws client
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxws/jaxws-client/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=EBookStoreClientSampleTest
Specifications in use:
EBookStoreClientSampleTest
Missing a description for the story. Add some javadoc to the TestClass. Show me how!
+
Method for creating and deploying the war file from jaxws-endpoint project,
+which contains the web service to be tested.
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Feb 10, 2014: Removed unnecessary files in jax-ws projects by Fermin Gallego
Feb 07, 2014: Added jax-ws client example by Fermin Gallego
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxws/jaxws-client/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jaxws-jaxws-endpoint/index.html b/sample/jaxws-jaxws-endpoint/index.html
new file mode 100644
index 0000000..c054539
--- /dev/null
+++ b/sample/jaxws-jaxws-endpoint/index.html
@@ -0,0 +1,80 @@
+JavaEE Sample::jaxws::Jaxws endpoint
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxws/jaxws-endpoint/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 01, 2014: Added tests for jndi-context project by Roberto Cortez
Nov 02, 2014: Issue #253 - fix to make jaxws-endpoint compile against jdk 8 by Nico Schlebusch
Feb 10, 2014: Removed unnecessary files in jax-ws projects by Fermin Gallego
Feb 06, 2014: Jax-ws endpoint example by Fermin Gallego
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jaxws/jaxws-endpoint/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jca-connector-simple-connector/index.html b/sample/jca-connector-simple-connector/index.html
new file mode 100644
index 0000000..5952ea8
--- /dev/null
+++ b/sample/jca-connector-simple-connector/index.html
@@ -0,0 +1,15 @@
+JavaEE Sample::JCA::connector
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jca/connector-simple/connector/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed default header by Roberto Cortez
Oct 23, 2013: Make it compiled in glassfish 4 and wildfly 8 beta1 by Jeff Zhang
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jca/connector-simple/connector/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jms-jms-batch/index.html b/sample/jms-jms-batch/index.html
new file mode 100644
index 0000000..5f27383
--- /dev/null
+++ b/sample/jms-jms-batch/index.html
@@ -0,0 +1,196 @@
+JavaEE Sample::JMS::Batch JMS processing
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jms/jms-batch/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
The job itself computes sum and count of random numbers that are send on the topic.
+Note that at time of sending there is no active consumer listening on the topic.
In this test case we verify that the subscription is really created upon deployment
+and thus messages are waiting for the job even before the first run of it.
+
+
+
The subscription is not deleted even after the application is undeployed, because
+the physical topic and its subscription in the message broker still exist,
+even after the application scoped managed objects are deleted.
+
+
+
Following method is used to generate the payload:
+
+
+
+
private int sendMessages(int count) {
+ int sum = 0;
+ Random r = new Random();
+ try (JMSContext jms = factory.createContext(Session.AUTO_ACKNOWLEDGE)) {
+ JMSProducer producer = jms.createProducer();
+ for (int i=0; i< count; i++) {
+ int payload = r.nextInt();
+ producer.send(topic, payload);
+ sum += payload;
+ }
+ }
+ return sum;
+}
+
+
+
+
So we send 10 random numbers, and verify that summing integers works exactly the
+same way on both ends. Or that the job really picked up all the numbers submitted
+for the computation.
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
Feb 02, 2014: Fix include expression in test case by Aslak Knutsen
Jan 17, 2014: Jms batch sample by pdudits
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jms/jms-batch/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jms-jms-xa/index.html b/sample/jms-jms-xa/index.html
new file mode 100644
index 0000000..ee8c41f
--- /dev/null
+++ b/sample/jms-jms-xa/index.html
@@ -0,0 +1,107 @@
+JavaEE Sample::JMS::Jms xa
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jms/jms-xa/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=UserManagerNonXATestmvn test -Dtest=AbstractUserManagerTestmvn test -Dtest=UserManagerXATest
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
+
+
@Test
+public void emailAlreadyRegisteredNonXA() throws Exception
+{
+ deliveryStats.reset();
+ assertEquals(0L, deliveryStats.getDeliveredMessagesCount());
+ try {
+ /**
+ * This email is already in DB so we should get exception trying to register it.
+ */
+ userManager.register("jack@itcrowd.pl");
+ } catch (Exception e) {
+ logger.info("Got expected exception " + e);
+ }
+ try {
+ ReceptionSynchronizer.waitFor(JMSMailman.class, "onMessage");
+ } catch (AssertionError error) {
+ logger.info("Got expected error " + error);
+ logger.info("We're just making sure that we have waited long enough to let the message get to MDB");
+ }
+ assertEquals("Message should be delivered despite transaction rollback", 1L, deliveryStats.getDeliveredMessagesCount());
+}
+
+
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
+
+
@Test
+public void happyPathNonXA() throws Exception
+{
+ deliveryStats.reset();
+ assertEquals(0L, deliveryStats.getDeliveredMessagesCount());
+ userManager.register("bernard@itcrowd.pl");
+ try {
+ ReceptionSynchronizer.waitFor(JMSMailman.class, "onMessage");
+ } catch (AssertionError error) {
+ logger.info("Got expected error " + error);
+ logger.info("We're just making sure that we have waited long enough to let the message get to MDB");
+ }
+ assertEquals(1L, deliveryStats.getDeliveredMessagesCount());
+}
+
+
AbstractUserManagerTest
Missing a description for the story. Add some javadoc to the TestClass. Show me how!
UserManagerXATest
Missing a description for the story. Add some javadoc to the TestClass. Show me how!
Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
+
+
@Test
+public void emailAlreadyRegisteredXA() throws Exception
+{
+ deliveryStats.reset();
+ assertEquals(0L, deliveryStats.getDeliveredMessagesCount());
+ try {
+ /**
+ * This email is already in DB so we should get exception trying to register it.
+ */
+ userManager.register("jack@itcrowd.pl");
+ } catch (Exception e) {
+ logger.info("Got expected exception " + e);
+ }
+ try {
+ ReceptionSynchronizer.waitFor(JMSMailman.class, "onMessage");
+ fail("Method should not have been invoked");
+ } catch (AssertionError error) {
+ logger.info("Got expected error " + error);
+ logger.info("Message should not have been delivered due to transaction rollback");
+ }
+ assertEquals("Message should not be delivered due to transaction rollback", 0L, deliveryStats.getDeliveredMessagesCount());
+}
+
+
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
Sep 30, 2014: #254 added examples w/ new jms apis by John D. Ament
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 04, 2013: #139 arquillian test for jms xa by bernard
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jms/jms-xa/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jms-send-receive/index.html b/sample/jms-send-receive/index.html
new file mode 100644
index 0000000..f21d860
--- /dev/null
+++ b/sample/jms-send-receive/index.html
@@ -0,0 +1,115 @@
+JavaEE Sample::JMS::Send receive
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jms/send-receive/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=SyncTestmvn test -Dtest=AsyncTestmvn test -Dtest=ReceptionSynchronizerTest
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
Jan 11, 2014: Transaction-aware receptionsynchronizer by pdudits
Jan 11, 2014: Make jms tests pass in managed wildfly by pdudits
Dec 05, 2013: Adding a new test to send/receive multiple messages by arun-gupta
Dec 05, 2013: Adding a convenient method to receive all messages (not used any where for now) by arun-gupta
Nov 21, 2013: Refactoring some code to be more intuitive - all 5 tests work on wildfly beta2 snapshot and glassfish 4 by Arun Gupta
Nov 15, 2013: Removed copyright by Patrik Dudits
Nov 14, 2013: Documented jms samples by Patrik Dudits
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jms/send-receive/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jms-temp-destination/index.html b/sample/jms-temp-destination/index.html
new file mode 100644
index 0000000..1487906
--- /dev/null
+++ b/sample/jms-temp-destination/index.html
@@ -0,0 +1,134 @@
+JavaEE Sample::JMS::Temporary destinations
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jms/temp-destination/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
Temporary queues are JMS queues that exist for the lifetime of single JMS connection.
+Also the reception of the messages is exclusive to the connection, therefore no
+reasonable use case exist for temporary topic within Java EE container, as connection
+is exclusive to single component.
+
+
+
Temporary queues are usually used as reply channels for request / response communication
+over JMS.
+
+
In this test we created a server component RequestResponseOverJMS, that
+listens on a Queue and passes the response to the destination specified in
+JMSReplyTo header of the message.
JmsClient is a client to this server, and has to be non transactional,
+otherwise the request would be first sent upon commit, i. e. after the
+business method finishes. That would be too late. We need to send the message
+immediately, and wait for the response to arrive.
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
Jan 12, 2014: Fix tempqueuetest for glassfish by pdudits
Jan 12, 2014: Improving documentation for tempqueuetest by pdudits
Jan 11, 2014: Issue #80: test for temporary queue by pdudits
Sep 12, 2013: Using cdi 1.1 "all" style beans.xml by Arun Gupta
Aug 29, 2013: Adding a message that this sample is not working right now by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jms/temp-destination/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-criteria/index.html b/sample/jpa-criteria/index.html
new file mode 100644
index 0000000..5199162
--- /dev/null
+++ b/sample/jpa-criteria/index.html
@@ -0,0 +1,200 @@
+JavaEE Sample::JPA::JPA Criteria API
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/criteria/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
In this sample we’re going to query a simple JPA Entity, using the JPA Criteria API and perform a select,
+update and delete operations.
+
+
+
The following JPA Entity, represents a Movie which has a name and a comma separated list of actors:
+
+
+
+
@Entity()
+@Table(name = "MOVIE_CRITERIA")
+@XmlRootElement()
+@NamedQueries({@NamedQuery(name = "Movie.findAll", query = "SELECT m FROM Movie m"), @NamedQuery(name = "Movie.findById", query = "SELECT m FROM Movie m WHERE m.id = :id"), @NamedQuery(name = "Movie.findByName", query = "SELECT m FROM Movie m WHERE m.name = :name"), @NamedQuery(name = "Movie.findByActors", query = "SELECT m FROM Movie m WHERE m.actors = :actors")})
+public class Movie implements Serializable {
+ private static final long serialVersionUID = 1L;
+ @Id()
+ @NotNull()
+ private Integer id;
+ @NotNull()
+ @Size(min = 1, max = 50)
+ private String name;
+ @NotNull()
+ @Size(min = 1, max = 200)
+ private String actors;
+
+ public Movie();
+
+ public Movie(Integer id);
+
+ public Movie(Integer id, String name, String actors);
+
+ public Integer getId();
+
+ public void setId(Integer id);
+
+ public String getName();
+
+ public void setName(String name);
+
+ public String getActors();
+
+ public void setActors(String actors);
+
+ @Override()
+ public boolean equals(Object o);
+
+ @Override()
+ public int hashCode();
+
+ @Override()
+ public String toString();
+}
+
+
+
+
The select, update and delete operations are exposed using a simple stateless ejb.
The persistence.xml file is needed of course for the persistence unit definition. A datasource is not
+needed, since we can now use the new default datasource available in JEE7. We’re also using the new
+javax.persistence.schema-generation.* propertires to create, populate and drop the database.
In the test, we’re just going to invoke the different operations in sequence keeping in mind that each
+invocation might be dependent of the previous invoked operation.
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jan 13, 2014: Added javadoc for jpa criteria project by Roberto Cortez
Jan 11, 2014: Added test for jpa criteria project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 29, 2013: Better output messages by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/criteria/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-datasourcedefinition-annotation-pu/index.html b/sample/jpa-datasourcedefinition-annotation-pu/index.html
new file mode 100644
index 0000000..c61b12c
--- /dev/null
+++ b/sample/jpa-datasourcedefinition-annotation-pu/index.html
@@ -0,0 +1,46 @@
+JavaEE Sample::JPA::Datasourcedefinition annotation pu
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/datasourcedefinition-annotation-pu/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=DataSourceDefinitionAnnotationPuTest
This tests that a data source defined via an annotation in {@link DataSourceDefinitionConfig} can be used by JPA.
+<p>
+The actual JPA code being run is not specifically relevant; any kind of JPA operation that
+uses the data source is okay here.
+
Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jan 28, 2014: Somewhat nasty hack/workaround to get ds work with jpa on wildfly 8 by arjan tijms
Jan 08, 2014: Added tests for using an @datasourcedefinition data source with jpa by arjan tijms
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/datasourcedefinition-annotation-pu/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-datasourcedefinition-applicationxml-pu/index.html b/sample/jpa-datasourcedefinition-applicationxml-pu/index.html
new file mode 100644
index 0000000..5541275
--- /dev/null
+++ b/sample/jpa-datasourcedefinition-applicationxml-pu/index.html
@@ -0,0 +1,126 @@
+JavaEE Sample::JPA::Datasourcedefinition applicationxml pu
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/datasourcedefinition-applicationxml-pu/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=DataSourceDefinitionApplicationXMLPuWebTestmvn test -Dtest=DataSourceDefinitionApplicationXMLPuEJBTest
This tests that a data source defined via the data-source element in an EAR’s application.xml can be used by JPA.
+<p>
+In this test the persistence unit is defined inside a web module (.war)
+
+
+
<p>
+The actual JPA code being run is not specifically relevant; any kind of JPA operation that
+uses the data source is okay here.
+
Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
+
+
@Deployment
+public static Archive<?> deploy() {
+ return
+ // EAR archive
+ create(EnterpriseArchive.class, "test.ear")
+
+ // Data-source is defined here
+ .setApplicationXML("application-web.xml")
+
+ // JDBC driver for data source
+ .addAsLibraries(Maven.resolver()
+ .loadPomFromFile("pom.xml")
+ .resolve("com.h2database:h2")
+ .withoutTransitivity()
+ .asSingleFile())
+
+ // WAR module
+ .addAsModule(
+ create(WebArchive.class, "test.war")
+
+ // Persistence unit is defined here, references data source
+ .addAsResource("META-INF/persistence.xml")
+
+ // Service class that uses persistence unit
+ .addPackages(true, DataSourceDefinitionApplicationXMLPuWebTest.class.getPackage())
+ );
+}
+
+
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
This tests that a data source defined via the data-source element in an EAR’s application.xml can be used by JPA.
+<p>
+In this test the persistence unit is defined inside an EJB module (.jar)
+
+
+
<p>
+The actual JPA code being run is not specifically relevant; any kind of JPA operation that
+uses the data source is okay here.
+
Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
+
+
@Deployment
+public static Archive<?> deploy() {
+ return
+ // EAR archive
+ create(EnterpriseArchive.class, "test.ear")
+
+ // Data-source is defined here
+ .setApplicationXML("application-ejb.xml")
+
+ // JDBC driver for data source
+ .addAsLibraries(Maven.resolver()
+ .loadPomFromFile("pom.xml")
+ .resolve("com.h2database:h2")
+ .withoutTransitivity()
+ .asSingleFile())
+
+ // EJB module
+ .addAsModule(
+ create(JavaArchive.class, "test.jar")
+
+ // Persistence unit is defined here, references data source
+ .addAsResource("META-INF/persistence.xml")
+
+ // Service class that uses persistence unit
+ .addClasses(TestEntity.class, TestService.class)
+ )
+
+ // Web module
+ // This is needed to prevent Arquillian generating an illegal application.xml
+ .addAsModule(
+ create(WebArchive.class, "test.war")
+ // This class containing the test
+ .addClass(DataSourceDefinitionApplicationXMLPuEJBTest.class)
+
+ );
+}
+
+
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jun 10, 2014: Workaround for arquillian creating an illegal application.xml by arjantijms
Jun 10, 2014: Test that data-source can be defined in application.xml and used in by arjan tijms
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/datasourcedefinition-applicationxml-pu/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-datasourcedefinition-webxml-pu/index.html b/sample/jpa-datasourcedefinition-webxml-pu/index.html
new file mode 100644
index 0000000..cb4887f
--- /dev/null
+++ b/sample/jpa-datasourcedefinition-webxml-pu/index.html
@@ -0,0 +1,47 @@
+JavaEE Sample::JPA::Datasourcedefinition webxml pu
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/datasourcedefinition-webxml-pu/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
This tests that a data source defined in web.xml can be used by JPA.
+<p>
+The actual JPA code being run is not specifically relevant; any kind of JPA operation that
+uses the data source is okay here.
+
Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jan 28, 2014: Somewhat nasty hack/workaround to get ds work with jpa on wildfly 8 by arjan tijms
Jan 08, 2014: Added tests for using an @datasourcedefinition data source with jpa by arjan tijms
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/datasourcedefinition-webxml-pu/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-datasourcedefinition/index.html b/sample/jpa-datasourcedefinition/index.html
new file mode 100644
index 0000000..2d8d357
--- /dev/null
+++ b/sample/jpa-datasourcedefinition/index.html
@@ -0,0 +1,34 @@
+JavaEE Sample::JPA::Datasourcedefinition
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/datasourcedefinition/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
Dec 12, 2013: Issue #148 : creating a new datasourcedefinition example, with an arquillian test by Alexis Hassler
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/datasourcedefinition/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-default-datasource/index.html b/sample/jpa-default-datasource/index.html
new file mode 100644
index 0000000..4377bd5
--- /dev/null
+++ b/sample/jpa-default-datasource/index.html
@@ -0,0 +1,42 @@
+JavaEE Sample::JPA::Default datasource
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/default-datasource/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 10, 2014: Adding a new test for default datasource by arun-gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/default-datasource/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-dynamic-named-query/index.html b/sample/jpa-dynamic-named-query/index.html
new file mode 100644
index 0000000..2ebc48c
--- /dev/null
+++ b/sample/jpa-dynamic-named-query/index.html
@@ -0,0 +1,46 @@
+JavaEE Sample::JPA::Dynamic named query
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/dynamic-named-query/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
+
+
@Test
+public void testDynamicNamedCriteriaQueries() throws IOException, SAXException {
+
+ // Nothing inserted yet, data base should not contain any entities
+ // (this tests that a simple query without parameters works as named query created by Criteria)
+ assertTrue(testService.getAll().size() == 0);
+
+ // Insert one entity
+ TestEntity testEntity = new TestEntity();
+ testEntity.setValue("myValue");
+ testService.save(testEntity);
+
+ // The total amount of entities should be 1
+ assertTrue(testService.getAll().size() == 1);
+
+ // The entity with "myValue" should be found
+ // (this tests that a query with a parameter works as named query created by Criteria)
+ assertTrue(testService.getByValue("myValue").size() == 1);
+}
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 22, 2013: Standalone servlet and index.jsp no longer needed for new tests. forgot by arjan tijms
Dec 22, 2013: Added jpa test for the new 2.1 feature of dynamically adding named by arjan tijms
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/dynamic-named-query/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-entitygraph/index.html b/sample/jpa-entitygraph/index.html
new file mode 100644
index 0000000..c7ce5e6
--- /dev/null
+++ b/sample/jpa-entitygraph/index.html
@@ -0,0 +1,198 @@
+JavaEE Sample::JPA::Entitygraph
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/entitygraph/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
In this sample we’re going to query a JPA Entity and control property loading by providing Hints using the new
+JPA Entity Graph API.
+<p/>
+Entity Graphs are used in the specification of fetch plans for query or find operations.
+
Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 08, 2014: Added tests for entitygraph project by Roberto Cortez
Nov 18, 2014: Added programmatic example by Roberto Cortez
Nov 12, 2014: Added sample for entity graph by Roberto Cortez
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/entitygraph/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-extended-pc/index.html b/sample/jpa-extended-pc/index.html
new file mode 100644
index 0000000..755cecb
--- /dev/null
+++ b/sample/jpa-extended-pc/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JPA::Extended pc
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/extended-pc/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Feb 03, 2014: Removing licence information by kubamarchwicki
Feb 02, 2014: Simplification. no need for @sesssionscope bean. inject @stateful to arq test by kubamarchwicki
Feb 02, 2014: Jpa extended persistence context test by kubamarchwicki
Nov 09, 2013: Adding extended persistence context sample, need further investigation by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/extended-pc/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-jndi-context/index.html b/sample/jpa-jndi-context/index.html
new file mode 100644
index 0000000..0630fad
--- /dev/null
+++ b/sample/jpa-jndi-context/index.html
@@ -0,0 +1,47 @@
+JavaEE Sample::JPA::Jndi context
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/jndi-context/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 01, 2014: Added tests for jndi-context project by Roberto Cortez
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Oct 30, 2013: Using the typical employee class and other *.sql scripts to generate/load database tables. entitymanager is still not getting resolved correctly and needs further debugging by Arun Gupta
Oct 30, 2013: Removing redundant imports by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/jndi-context/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-jpa-converter/index.html b/sample/jpa-jpa-converter/index.html
new file mode 100644
index 0000000..5ba92ef
--- /dev/null
+++ b/sample/jpa-jpa-converter/index.html
@@ -0,0 +1,46 @@
+JavaEE Sample::JPA::Jpa converter
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/jpa-converter/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
Jul 15, 2014: Removed default header by Roberto Cortez
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
May 03, 2014: Introduced arquillian-based example for jpa 2.1 custom converter feature by Bartosz Majsak
Nov 09, 2013: Sample is now working by Arun Gupta
Nov 09, 2013: Temporal attributes cannot be used with @convert and so changing to creditcard based upon antonio's slide deck by Arun Gupta
Nov 09, 2013: Starting a new sample for @converter and @convert by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/jpa-converter/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-listeners-injection/index.html b/sample/jpa-listeners-injection/index.html
new file mode 100644
index 0000000..9e8465e
--- /dev/null
+++ b/sample/jpa-listeners-injection/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JPA::JPA Listeners Injection
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/listeners-injection/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Feb 03, 2014: Removing licence information by kubamarchwicki
Feb 01, 2014: Jpa listener injection test by kubamarchwicki
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/listeners-injection/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-listeners/index.html b/sample/jpa-listeners/index.html
new file mode 100644
index 0000000..c055c7c
--- /dev/null
+++ b/sample/jpa-listeners/index.html
@@ -0,0 +1,205 @@
+JavaEE Sample::JPA::JPA Listeners
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/listeners/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=JpaListenersTest
Invocation examples of all the available Entity Listeners
In this sample we’re going to query a simple JPA Entity, using the JPA EntityManager and perform a findAll,
+persist, merge, and remove operations. By calling these operations we want to demonstrate the behaviour of Entity
+Listener Methods: @PostLoad, @PrePersist, @PostPersist, @PreUpdate, @PostUpdate, @PreRemove,
+@PostRemove defined on MovieListener:
+
+
+
+
public class MovieListener {
+
+ public MovieListener();
+ public static CountDownLatch entityListenersCountDownLatch;
+ public static boolean postLoadInvoked;
+ public static boolean prePersistInvoked;
+ public static boolean postPersistInvoked;
+ public static boolean preUpdateInvoked;
+ public static boolean postUpdateInvoked;
+ public static boolean preRemoveInvoked;
+ public static boolean postRemoveInvoked;
+
+ @PostLoad()
+ public void newMovieLoad(Movie movie);
+
+ @PrePersist()
+ public void newMovieAlertBefore(Movie movie);
+
+ @PostPersist()
+ public void newMovieAlertAfter(Movie movie);
+
+ @PreUpdate()
+ public void updateMovieAlertBefore(Movie movie);
+
+ @PostUpdate()
+ public void updateMovieAlertAfter(Movie movie);
+
+ @PreRemove()
+ public void deleteMovieAlertBefore(Movie movie);
+
+ @PostRemove()
+ public void deleteMovieAlertAfter(Movie movie);
+}
+
+
+
+
The following JPA Entity, represents a Movie which has a name and a comma separated list of actors:
+
+
+
+
@Entity()
+@Table(name = "MOVIE_LISTENER")
+@XmlRootElement()
+@NamedQueries({@NamedQuery(name = "Movie.findAll", query = "SELECT m FROM Movie m"), @NamedQuery(name = "Movie.findById", query = "SELECT m FROM Movie m WHERE m.id = :id"), @NamedQuery(name = "Movie.findByName", query = "SELECT m FROM Movie m WHERE m.name = :name"), @NamedQuery(name = "Movie.findByActors", query = "SELECT m FROM Movie m WHERE m.actors = :actors")})
+@EntityListeners(MovieListener.class)
+public class Movie implements Serializable {
+ private static final long serialVersionUID = 1L;
+ @Id()
+ @NotNull()
+ private Integer id;
+ @NotNull()
+ @Size(min = 1, max = 50)
+ private String name;
+ @NotNull()
+ @Size(min = 1, max = 200)
+ private String actors;
+
+ public Movie();
+
+ public Movie(Integer id);
+
+ public Movie(Integer id, String name, String actors);
+
+ public Integer getId();
+
+ public void setId(Integer id);
+
+ public String getName();
+
+ public void setName(String name);
+
+ public String getActors();
+
+ public void setActors(String actors);
+
+ @Override()
+ public boolean equals(Object o);
+
+ @Override()
+ public int hashCode();
+
+ @Override()
+ public String toString();
+}
+
+
+
We’re just going to deploy the application as a web archive. Note the inclusion of the following files:
The persistence.xml file is needed of course for the persistence unit definition. A datasource is not
+needed, since we can now use the new default datasource available in JEE7. We’re also using the new
+javax.persistence.schema-generation.* propertires to create, populate and drop the database.
In the test, we’re just going to invoke the different operations in sequence keeping in mind that each
+invocation might be dependent of the previous invoked operation.
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jan 21, 2014: Updated javadoc by Roberto Cortez
Jan 16, 2014: Added test for jpa listeners project by Roberto Cortez
Nov 09, 2013: Removing try-with-resources to allow any errors to show up on servletoutputstream by Arun Gupta
Oct 30, 2013: Fixing the namespace and version by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org by Arun Gupta
Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org by Arun Gupta
Sep 12, 2013: Better output message by Arun Gupta
Sep 12, 2013: Using cdi 1.1 "all" style beans.xml by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/listeners/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-locking-optimistic/index.html b/sample/jpa-locking-optimistic/index.html
new file mode 100644
index 0000000..95462dd
--- /dev/null
+++ b/sample/jpa-locking-optimistic/index.html
@@ -0,0 +1,127 @@
+JavaEE Sample::JPA::Locking optimistic
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/locking-optimistic/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 05, 2014: Added tests for locking-optimistic project by Roberto Cortez
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Oct 30, 2013: Removing load.sql as data needs to be persisted using entitymanager.persist instead of insert into. this allows the version column to be updated for optimistic locking to work. eclipselink was lenient about it but hibernate caught it by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/locking-optimistic/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-locking-pessimistic/index.html b/sample/jpa-locking-pessimistic/index.html
new file mode 100644
index 0000000..2be7def
--- /dev/null
+++ b/sample/jpa-locking-pessimistic/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JPA::Locking pessimistic
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/locking-pessimistic/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/locking-pessimistic/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-multiple-pu/index.html b/sample/jpa-multiple-pu/index.html
new file mode 100644
index 0000000..7394ded
--- /dev/null
+++ b/sample/jpa-multiple-pu/index.html
@@ -0,0 +1,38 @@
+JavaEE Sample::JPA::Multiple pu
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/multiple-pu/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 04, 2014: Added tests for multiple-pu project by Roberto Cortez
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Oct 24, 2013: Fixing the namespace by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 12, 2013: Using cdi 1.1 "all" style beans.xml by Arun Gupta
Sep 12, 2013: Better output message by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/multiple-pu/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-native-sql-resultset-mapping/index.html b/sample/jpa-native-sql-resultset-mapping/index.html
new file mode 100644
index 0000000..e89ae01
--- /dev/null
+++ b/sample/jpa-native-sql-resultset-mapping/index.html
@@ -0,0 +1,97 @@
+JavaEE Sample::JPA::JPA Native SQL ResultSet Mapping
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/native-sql-resultset-mapping/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=JpaNativeSqlResultSetMappingTest
Using the EntityManager API to perform native SQL queries and map the result with @SqlResultSetMapping
+ annotation
+
In this sample we’re going to query a simple JPA Entity, using the JPA EntityManager Native Query, perform
+a select operation and map the query result using @SqlResultSetMapping.
+
+
+
+
@Entity()
+@Table(name = "EMPLOYEE_NATIVE_SQL_RESULTSET_MAPPING")
+@SqlResultSetMapping(name = "myMapping", entities = {@EntityResult(entityClass = Employee.class, fields = {@FieldResult(name = "identifier", column = "id"), @FieldResult(name = "simpleName", column = "name")})})
+public class Employee implements Serializable {
+
+ public Employee();
+ private static final long serialVersionUID = 1L;
+ @Id()
+ private int identifier;
+ @Column(length = 50)
+ private String simpleName;
+
+ public int getIdentifier();
+
+ public void setIdentifier(int identifier);
+
+ public String getSimpleName();
+
+ public void setSimpleName(String simpleName);
+}
+
+
+
+
The select operation is very simple. We just need to call the API method createNativeQuery on the EntityManager
+and use the mapping defined on Employee by the @SqlResultSetMapping annotation.
The persistence.xml file is needed of course for the persistence unit definition. A datasource is not
+needed, since we can now use the new default datasource available in JEE7. We’re also using the new
+javax.persistence.schema-generation.* propertires to create, populate and drop the database.
In the test, we’re just going to invoke the only available operation in the EmployeeBean and assert a few
+details to confirm that the native query was successfully executed.
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Feb 02, 2014: Fix include expression in test case by Aslak Knutsen
Jan 28, 2014: Added name and description to pom files by Roberto Cortez
Jan 28, 2014: Added test for native-sql-resultset-mapping project by Roberto Cortez
Nov 06, 2013: Update employeebean.java by fotofinder
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/native-sql-resultset-mapping/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-native-sql/index.html b/sample/jpa-native-sql/index.html
new file mode 100644
index 0000000..e60414c
--- /dev/null
+++ b/sample/jpa-native-sql/index.html
@@ -0,0 +1,93 @@
+JavaEE Sample::JPA::JPA Native SQL
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/native-sql/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=JpaNativeSqlTest
Using the EntityManager API to perform native SQL queries
The persistence.xml file is needed of course for the persistence unit definition. A datasource is not
+needed, since we can now use the new default datasource available in JEE7. We’re also using the new
+javax.persistence.schema-generation.* propertires to create, populate and drop the database.
In the test, we’re just going to invoke the only available operation in the EmployeeBean and assert a few
+details to confirm that the native query was successfully executed.
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Feb 02, 2014: Fix include expression in test case by Aslak Knutsen
Jan 28, 2014: Added name and description to pom files by Roberto Cortez
Jan 28, 2014: Added test for native-sql project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/native-sql/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-ordercolumn/index.html b/sample/jpa-ordercolumn/index.html
new file mode 100644
index 0000000..d16ea68
--- /dev/null
+++ b/sample/jpa-ordercolumn/index.html
@@ -0,0 +1,465 @@
+JavaEE Sample::JPA::Ordercolumn
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/ordercolumn/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=OrderColumnBiJoinTestmvn test -Dtest=OrderColumnBiMappedByTestmvn test -Dtest=OrderColumnUniTest
This tests and demonstrates the {@link OrderColumn} annotation when used together with a
+bi-directional parent-child mapping, where the child holds a foreign key to the parent.
+
+
+
<p>
+This is a variation on the normal oneToMany mapping using two {@link JoinColumn} annotations
+instead of using the <code>mappedBy</code> attribute.
+
+
+
<p>
+In this mapping the position each child has in the parent’s list is stored in the
+child table and fully managed by JPA. This means that this position index does
+not explicitly show up in the object model.
+
+
+
<p>
+Example SQL DDL (h2 syntax)
+<pre>
+create table Parent (
+id bigint generated by default as identity,
+
+
+
primary key (id)
+);
+
+
+
create table Child (
+id bigint generated by default as identity,
+parent_id bigint,
+children_ORDER integer,
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
+
+
@Test
+public void saveInOneGo() {
+ Parent parent = new Parent();
+
+ Child child1 = new Child();
+ child1.setParent(parent);
+
+ Child child2 = new Child();
+ child2.setParent(parent);
+
+ parent.getChildren().add(child1);
+ parent.getChildren().add(child2);
+
+ parent = indexColumnTesterService.save(parent);
+
+ // Reload parent fresh from data source again
+ Parent savedParent = indexColumnTesterService.getParentById(parent.getId());
+
+ assertEquals("2 children added to parent and saved, but after re-loading number of chilren different",
+ 2, savedParent.getChildren().size()
+ );
+}
+
+
+
Saves a parent instance first, then adds two children instances and saves again.
+
+
+
<p>
+Example sequence of insert/update statements that may be generated to accomplish this:
+<pre>
+insert into Parent (id) values (null)
+insert into Child (id) values (null)
+insert into Child (id) values (null)
+
+
+
update Child set parent_id = 1, children_ORDER = 0 where id = 1
+update Child set parent_id = 1, children_ORDER = 1 where id = 2
+</pre>
+
+
+
@Test
+public void saveParentSeparatelyFirst() {
+
+ Parent parent = indexColumnTesterService.save(new Parent());
+
+ Child child1 = new Child();
+ child1.setParent(parent);
+
+ Child child2 = new Child();
+ child2.setParent(parent);
+
+ parent.getChildren().add(child1);
+ parent.getChildren().add(child2);
+
+ parent = indexColumnTesterService.save(parent);
+
+ Parent savedParent = indexColumnTesterService.getParentById(parent.getId());
+
+ assertEquals("2 children added to parent and saved, but after re-loading number of chilren different",
+ 2, savedParent.getChildren().size()
+ );
+
+}
+
+
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
+
+
@Test
+public void saveParentWithOneChildFirst() {
+
+ Parent parent = new Parent();
+ Child child1 = new Child();
+ child1.setParent(parent);
+ parent.getChildren().add(child1);
+
+ // Save parent with 1 child in one go
+ parent = indexColumnTesterService.save(parent);
+
+ Child child2 = new Child();
+ child2.setParent(parent);
+ parent.getChildren().add(child2);
+
+ // Save parent again with second child
+ parent = indexColumnTesterService.save(parent);
+
+ Parent savedParent = indexColumnTesterService.getParentById(parent.getId());
+
+ assertEquals("2 children added to parent and saved, but after re-loading number of chilren different",
+ 2, savedParent.getChildren().size()
+ );
+}
+
+
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
+
+
@Test
+public void saveParentWithChildrenThenDeleteOned() {
+
+ Parent parent = new Parent();
+
+ Child child1 = new Child();
+ child1.setParent(parent);
+ parent.getChildren().add(child1);
+
+ Child child2 = new Child();
+ child2.setParent(parent);
+ parent.getChildren().add(child2);
+
+ Child child3 = new Child();
+ child3.setParent(parent);
+ parent.getChildren().add(child3);
+
+ // Save parent with 3 children
+ parent = indexColumnTesterService.save(parent);
+
+ Parent savedParent = indexColumnTesterService.getParentById(parent.getId());
+
+ assertEquals("3 children added to parent and saved, but after re-loading number of chilren different",
+ 3, savedParent.getChildren().size()
+ );
+
+ // Removing child at position 1 and saving again
+ savedParent.getChildren().remove(1);
+
+ savedParent = indexColumnTesterService.save(savedParent);
+ savedParent = indexColumnTesterService.getParentById(savedParent.getId());
+
+ assertEquals("2 children added to parent and saved, but after re-loading number of chilren different",
+ 2, savedParent.getChildren().size()
+ );
+
+}
+
+
OrderColumnBiMappedByTest
+
This tests and demonstrates the {@link OrderColumn} annotation when used together with a
+bi-directional parent-child mapping, where the child holds a foreign key to the parent.
+
+
+
<p>
+This is the normal oneToMany mapping using the <code>mappedBy</code> attribute.
+Even though this is the most straightforward mapping, because of a mis-interpretation
+in the JPA spec it was believed for years that this mapping did not have to be
+supported (see https://hibernate.atlassian.net/browse/HHH-5732 among others)
+
+
+
<p>
+In this mapping the position each child has in the parent’s list is stored in the
+child table and fully managed by JPA. This means that this position index does
+not explicitly show up in the object model.
+
+
+
<p>
+Example SQL DDL (h2 syntax)
+<pre>
+create table Parent (
+id bigint generated by default as identity,
+
+
+
primary key (id)
+);
+
+
+
create table Child (
+id bigint generated by default as identity,
+parent_id bigint,
+children_ORDER integer,
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
+
+
@Test
+public void saveInOneGo() {
+
+ Parent parent = new Parent();
+
+ Child child1 = new Child();
+ child1.setParent(parent);
+
+ Child child2 = new Child();
+ child2.setParent(parent);
+
+ parent.getChildren().add(child1);
+ parent.getChildren().add(child2);
+
+ parent = indexColumnTesterService.save(parent);
+
+ Parent savedParent = indexColumnTesterService.getParentById(parent.getId());
+
+ assertEquals("2 children added to parent and saved, but after re-loading number of chilren different",
+ 2, savedParent.getChildren().size()
+ );
+}
+
+
+
Saves a parent instance first, then adds two children instances and saves again.
+
+
+
<p>
+Example sequence of insert/update statements that may be generated to accomplish this:
+<pre>
+insert into Parent (id) values (null)
+insert into Child (id, parent_id) values (null, 1)
+insert into Child (id, parent_id) values (null, 1)
+
+
+
update Child set children_ORDER = 0 where id = 1
+update Child set children_ORDER = 1 where id = 2
+</pre>
+
+
+
@Test
+public void saveParentSeparatelyFirst() {
+
+ Parent parent = indexColumnTesterService.save(new Parent());
+
+ Child child1 = new Child();
+ child1.setParent(parent);
+
+ Child child2 = new Child();
+ child2.setParent(parent);
+
+ parent.getChildren().add(child1);
+ parent.getChildren().add(child2);
+
+ parent = indexColumnTesterService.save(parent);
+
+ Parent savedParent = indexColumnTesterService.getParentById(parent.getId());
+
+ assertEquals("2 children added to parent and saved, but after re-loading number of chilren different",
+ 2, savedParent.getChildren().size()
+ );
+
+}
+
+
OrderColumnUniTest
+
This tests and demonstrates the {@link OrderColumn} annotation when used together with a
+uni-directional parent-child mapping, where the child table holds a foreign key to the parent.
+
+
+
<p>
+In this mapping the position each child has in the parent’s list is stored in the
+child table and fully managed by JPA. This means that this position index does
+not explicitly show up in the object model.
+
+
+
<p>
+Example SQL DDL (h2 syntax)
+<pre>
+create table Parent (
+id bigint generated by default as identity,
+
+
+
primary key (id)
+);
+
+
+
create table Child (
+id bigint generated by default as identity,
+children_id bigint,
+children_ORDER integer,
Saves a parent instance with 2 children in its children collection in one operation.
+
+
+
<p>
+Example sequence of insert/update statements that may be generated to accomplish this:
+<pre>
+insert into Parent (id) values (null)
+insert into Child (id) values (null)
+insert into Child (id) values (null)
+
+
+
update Child set children_id = 1, children_ORDER = 0 where id = 1
+update Child set children_id = 1, children_ORDER = 1 where id = 2
+</pre>
+
+
+
@Test
+public void saveInOneGo() {
+
+ Parent parent = new Parent();
+ Child child1 = new Child();
+ Child child2 = new Child();
+
+ parent.getChildren().add(child1);
+ parent.getChildren().add(child2);
+
+ parent = indexColumnTesterService.save(parent);
+
+ Parent savedParent = indexColumnTesterService.getParentById(parent.getId());
+
+ assertEquals("2 children added to parent and saved, but after re-loading number of chilren different",
+ 2, savedParent.getChildren().size()
+ );
+}
+
+
+
Saves a parent instance first, then adds two children instances and saves again.
+
+
+
<p>
+Example sequence of insert/update statements that may be generated to accomplish this:
+<pre>
+insert into Parent (id) values (null)
+insert into Child (id) values (null)
+insert into Child (id) values (null)
+
+
+
update Child set children_id = 1, children_ORDER = 0 where id = 1
+update Child set children_id = 1, children_ORDER = 1 where id = 2
+</pre>
+
+
+
@Test
+public void saveParentSeparatelyFirst() {
+
+ Parent parent = indexColumnTesterService.save(new Parent());
+
+ Child child1 = new Child();
+ Child child2 = new Child();
+
+ parent.getChildren().add(child1);
+ parent.getChildren().add(child2);
+
+ parent = indexColumnTesterService.save(parent);
+
+ Parent savedParent = indexColumnTesterService.getParentById(parent.getId());
+
+ assertEquals("2 children added to parent and saved, but after re-loading number of chilren different",
+ 2, savedParent.getChildren().size()
+ );
+
+}
+
+
+
Saves a parent with one child in its children collection first, then adds another child and saves again.
+
+
+
<p>
+Example sequence of insert/update statements that may be generated to accomplish this:
+<pre>
+insert into Parent (id) values (null)
+insert into Child (id) values (null)
+update Child set children_id = 1, children_ORDER = 0 where id = 1
+
+
+
insert into Child (id) values (null)
+update Child set children_id = 1, children_ORDER = 1 where id = 2
+</pre>
+
+
+
@Test
+public void saveParentWithOneChildFirst() {
+
+ Parent parent = new Parent();
+ Child child1 = new Child();
+ parent.getChildren().add(child1);
+
+ // Save parent with 1 child in one go
+ parent = indexColumnTesterService.save(parent);
+
+ Child child2 = new Child();
+ parent.getChildren().add(child2);
+
+ // Save parent again with second child
+ parent = indexColumnTesterService.save(parent);
+
+ Parent savedParent = indexColumnTesterService.getParentById(parent.getId());
+
+ assertEquals("2 children added to parent and saved, but after re-loading number of chilren different",
+ 2, savedParent.getChildren().size()
+ );
+
+}
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: Tests for the @ordercolumn annotation by arjan tijms
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/ordercolumn/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-pu-typesafe/index.html b/sample/jpa-pu-typesafe/index.html
new file mode 100644
index 0000000..be826a2
--- /dev/null
+++ b/sample/jpa-pu-typesafe/index.html
@@ -0,0 +1,47 @@
+JavaEE Sample::JPA::Pu typesafe
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/pu-typesafe/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 04, 2014: Added tests for pu-typesafe project by Roberto Cortez
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Oct 30, 2013: Fixed persistence.xml by adding by Arun Gupta
Oct 24, 2013: Fixing the namespace by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 05, 2013: Redundant file by Arun Gupta
Aug 29, 2013: Using only one pu, better titles by Arun Gupta
Aug 29, 2013: Using only one pu, no need to show two to demonstrate this feature by Arun Gupta
Aug 29, 2013: Using only one database by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/pu-typesafe/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-schema-gen-index/index.html b/sample/jpa-schema-gen-index/index.html
new file mode 100644
index 0000000..5d15727
--- /dev/null
+++ b/sample/jpa-schema-gen-index/index.html
@@ -0,0 +1,62 @@
+JavaEE Sample::JPA::Schema gen index
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/schema-gen-index/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 04, 2014: Added tests for schema-gen-index project by Roberto Cortez
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Nov 09, 2013: New sample to show @index usage by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/schema-gen-index/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-schema-gen-metadata/index.html b/sample/jpa-schema-gen-metadata/index.html
new file mode 100644
index 0000000..ddc4992
--- /dev/null
+++ b/sample/jpa-schema-gen-metadata/index.html
@@ -0,0 +1,42 @@
+JavaEE Sample::JPA::Schema gen metadata
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/schema-gen-metadata/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 07, 2013: Adding a test for table generation using jpa metadata by arun-gupta
Nov 09, 2013: Removing redundant attributes by Arun Gupta
Nov 09, 2013: Fixing the table name by Arun Gupta
Oct 30, 2013: Renaming schema-gen to schema-gen-metadata to be more meaningful by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/schema-gen-metadata/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-schema-gen-scripts-external/index.html b/sample/jpa-schema-gen-scripts-external/index.html
new file mode 100644
index 0000000..ad281f6
--- /dev/null
+++ b/sample/jpa-schema-gen-scripts-external/index.html
@@ -0,0 +1,41 @@
+JavaEE Sample::JPA::Schema gen scripts external
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/schema-gen-scripts-external/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 05, 2014: Added tests for schema-gen-scripts-external project by Roberto Cortez
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Oct 30, 2013: Adding more descriptive output statement by Arun Gupta
Oct 30, 2013: Changing the location to match local machine by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/schema-gen-scripts-external/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-schema-gen-scripts-generate/index.html b/sample/jpa-schema-gen-scripts-generate/index.html
new file mode 100644
index 0000000..2dd6885
--- /dev/null
+++ b/sample/jpa-schema-gen-scripts-generate/index.html
@@ -0,0 +1,56 @@
+JavaEE Sample::JPA::Schema gen scripts generate
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/schema-gen-scripts-generate/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 05, 2014: Added tests for schema-gen-scripts-generate project by Roberto Cortez
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/schema-gen-scripts-generate/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-schema-gen-scripts/index.html b/sample/jpa-schema-gen-scripts/index.html
new file mode 100644
index 0000000..30bf175
--- /dev/null
+++ b/sample/jpa-schema-gen-scripts/index.html
@@ -0,0 +1,44 @@
+JavaEE Sample::JPA::Schema gen scripts
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/schema-gen-scripts/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 05, 2013: Adding arquillian test by arun-gupta
Nov 09, 2013: Removing a redundant method by Arun Gupta
Nov 09, 2013: Removing try-with-resources to allow any errors to show up on servletoutputstream by Arun Gupta
Nov 09, 2013: Fixed a typo by Arun Gupta
Oct 30, 2013: Adding more descriptive output statement by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 29, 2013: Better output messages by Arun Gupta
Aug 29, 2013: Fixed the schema-generation.database.action property value by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/schema-gen-scripts/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-storedprocedure/index.html b/sample/jpa-storedprocedure/index.html
new file mode 100644
index 0000000..1765204
--- /dev/null
+++ b/sample/jpa-storedprocedure/index.html
@@ -0,0 +1,37 @@
+JavaEE Sample::JPA::Storedprocedure
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/storedprocedure/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 08, 2014: Added tests for storedprocedure project by Roberto Cortez
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 15, 2013: Adding netbeans confgiguration file by Arun Gupta
Sep 12, 2013: Adding a boilerplate testservlet, tbd: how to invoke storedprocedure by Arun Gupta
Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/storedprocedure/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jpa-unsynchronized-pc/index.html b/sample/jpa-unsynchronized-pc/index.html
new file mode 100644
index 0000000..f652b40
--- /dev/null
+++ b/sample/jpa-unsynchronized-pc/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JPA::Unsynchronized pc
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/unsynchronized-pc/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Nov 09, 2013: Better output statements by Arun Gupta
Nov 09, 2013: Adding a new sample to demonstrate unsynchronized pc by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jpa/unsynchronized-pc/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jsf-ajax/index.html b/sample/jsf-ajax/index.html
new file mode 100644
index 0000000..b1d35cf
--- /dev/null
+++ b/sample/jsf-ajax/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JSF::Ajax
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/ajax/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Oct 27, 2013: Adding prompts on what needs to be entered by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/ajax/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jsf-bean-validation/index.html b/sample/jsf-bean-validation/index.html
new file mode 100644
index 0000000..ab60177
--- /dev/null
+++ b/sample/jsf-bean-validation/index.html
@@ -0,0 +1,143 @@
+JavaEE Sample::JSF::Bean validation
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/bean-validation/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 20, 2013: Added new tests by arun-gupta
Oct 27, 2013: Adding prompts on what needs to be entered by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/bean-validation/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jsf-components/index.html b/sample/jsf-components/index.html
new file mode 100644
index 0000000..5940ea8
--- /dev/null
+++ b/sample/jsf-components/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JSF::Components
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/components/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/components/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jsf-composite-component/index.html b/sample/jsf-composite-component/index.html
new file mode 100644
index 0000000..a2a8236
--- /dev/null
+++ b/sample/jsf-composite-component/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JSF::Composite component
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/composite-component/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jan 31, 2014: Some minor jsf fixes by Tomas Remes
Nov 19, 2013: Minor changes to get rid out of red code in intellij idea by cheptsov
Oct 27, 2013: Added better titles by Arun Gupta
Oct 27, 2013: Fixed a composite component parameter name by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/composite-component/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jsf-contracts-library-impl/index.html b/sample/jsf-contracts-library-impl/index.html
new file mode 100644
index 0000000..f376cbe
--- /dev/null
+++ b/sample/jsf-contracts-library-impl/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JSF::Contracts library impl
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/contracts-library-impl/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/contracts-library-impl/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jsf-contracts-library/index.html b/sample/jsf-contracts-library/index.html
new file mode 100644
index 0000000..7c517c4
--- /dev/null
+++ b/sample/jsf-contracts-library/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JSF::Contracts library
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/contracts-library/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/contracts-library/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jsf-contracts/index.html b/sample/jsf-contracts/index.html
new file mode 100644
index 0000000..4dcdb8a
--- /dev/null
+++ b/sample/jsf-contracts/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JSF::Contracts
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/contracts/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Nov 19, 2013: Minor changes to get rid out of red code in intellij idea by cheptsov
Sep 12, 2013: Fixing a typo by Arun Gupta
Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema by Arun Gupta
Sep 12, 2013: Using cdi 1.1 "all" style beans.xml by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/contracts/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jsf-file-upload/index.html b/sample/jsf-file-upload/index.html
new file mode 100644
index 0000000..54f250c
--- /dev/null
+++ b/sample/jsf-file-upload/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JSF::File upload
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/file-upload/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Oct 27, 2013: Added more debugging statements by Arun Gupta
Oct 27, 2013: Fixing the action of a button by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema. also added copyright by Arun Gupta
Sep 12, 2013: Using cdi 1.1 "all" style beans.xml by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/file-upload/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jsf-flows-declarative/index.html b/sample/jsf-flows-declarative/index.html
new file mode 100644
index 0000000..5e7e1fa
--- /dev/null
+++ b/sample/jsf-flows-declarative/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JSF::Flows declarative
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/flows-declarative/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/flows-declarative/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jsf-flows-mixed/index.html b/sample/jsf-flows-mixed/index.html
new file mode 100644
index 0000000..578bab5
--- /dev/null
+++ b/sample/jsf-flows-mixed/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JSF::Flows mixed
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/flows-mixed/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Nov 19, 2013: Minor changes to get rid out of red code in intellij idea by cheptsov
Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema by Arun Gupta
Sep 12, 2013: Using cdi 1.1 "all" style beans.xml and fixing namespace from java.sun.com -> xmlns.jcp.org by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/flows-mixed/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jsf-flows-programmatic/index.html b/sample/jsf-flows-programmatic/index.html
new file mode 100644
index 0000000..973b5f1
--- /dev/null
+++ b/sample/jsf-flows-programmatic/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JSF::Flows programmatic
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/flows-programmatic/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/flows-programmatic/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jsf-flows-simple/index.html b/sample/jsf-flows-simple/index.html
new file mode 100644
index 0000000..afb4c94
--- /dev/null
+++ b/sample/jsf-flows-simple/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JSF::Flows simple
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/flows-simple/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema by Arun Gupta
Aug 30, 2013: Added netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/flows-simple/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jsf-http-get/index.html b/sample/jsf-http-get/index.html
new file mode 100644
index 0000000..8d80432
--- /dev/null
+++ b/sample/jsf-http-get/index.html
@@ -0,0 +1,72 @@
+JavaEE Sample::JSF::Http get
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/http-get/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 20, 2013: Added new tests by arun-gupta
Dec 20, 2013: Removing and by arun-gupta
Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 29, 2013: Reordered some elements for a logical order by Arun Gupta
Aug 29, 2013: Added a comment about method signatures by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/http-get/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jsf-passthrough/index.html b/sample/jsf-passthrough/index.html
new file mode 100644
index 0000000..3259c9b
--- /dev/null
+++ b/sample/jsf-passthrough/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JSF::Passthrough
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/passthrough/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Nov 08, 2013: Fixing typo by Arun Gupta
Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema. also added copyright by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/passthrough/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jsf-radio-buttons/index.html b/sample/jsf-radio-buttons/index.html
new file mode 100644
index 0000000..d2d1669
--- /dev/null
+++ b/sample/jsf-radio-buttons/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JSF::Radio buttons
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/radio-buttons/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 12, 2013: Removing metadata-complete by Arun Gupta
Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema. also added copyright by Arun Gupta
Sep 12, 2013: Using cdi 1.1 "all" style beans.xml by Arun Gupta
Sep 12, 2013: Fixed the package name by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/radio-buttons/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jsf-resource-handling/index.html b/sample/jsf-resource-handling/index.html
new file mode 100644
index 0000000..5959283
--- /dev/null
+++ b/sample/jsf-resource-handling/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JSF::Resource handling
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/resource-handling/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Nov 19, 2013: Minor changes to get rid out of red code in intellij idea by cheptsov
Oct 27, 2013: Changed the text from glassfish to wildfly by Arun Gupta
Oct 27, 2013: Replacing glassfish logo with wildfly by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 12, 2013: Removing metadata-complete and slight formatting by Arun Gupta
Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema. also added copyright by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/resource-handling/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jsf-server-extension/index.html b/sample/jsf-server-extension/index.html
new file mode 100644
index 0000000..b2fda5b
--- /dev/null
+++ b/sample/jsf-server-extension/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JSF::Server extension
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/server-extension/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Oct 27, 2013: Adding some debugging statements by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 28, 2013: Throwing appropriate converterexception by Arun Gupta
Aug 28, 2013: Throwing appropriate validatorexception by Arun Gupta
Aug 28, 2013: Adding better prompts by Arun Gupta
Aug 28, 2013: Fixed the attribute from "id" to "validatorid" by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/server-extension/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jsf-simple-facelet/index.html b/sample/jsf-simple-facelet/index.html
new file mode 100644
index 0000000..1c6b595
--- /dev/null
+++ b/sample/jsf-simple-facelet/index.html
@@ -0,0 +1,36 @@
+JavaEE Sample::JSF::Simple facelet
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/simple-facelet/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Mar 31, 2014: Jsf/simple-facelet - redundant licence header removed by Juraj Huska
Mar 31, 2014: Profiles for major browsers added by Juraj Huska
Mar 31, 2014: Graphene dependency moved higher to jsf/pom.xml by Juraj Huska
Mar 28, 2014: Tests for jsf/simple-facelet added by Juraj Huska
Oct 27, 2013: Changing glassfish to wildfly by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 12, 2013: Removing metadata-complete and slight formatting by Arun Gupta
Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema. also added copyright by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/simple-facelet/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jsf-viewscoped/index.html b/sample/jsf-viewscoped/index.html
new file mode 100644
index 0000000..4f150af
--- /dev/null
+++ b/sample/jsf-viewscoped/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::JSF::Viewscoped
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/viewscoped/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jan 31, 2014: Some minor jsf fixes by Tomas Remes
Oct 27, 2013: Made the bean serializable by Arun Gupta
Oct 27, 2013: Fixing next and refresh actions by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 12, 2013: Removing metadata-complete and slight formatting by Arun Gupta
Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema. also added copyright by Arun Gupta
Sep 12, 2013: Using cdi 1.1 "all" style beans.xml and fixing namespace from java.sun.com -> xmlns.jcp.org by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jsf/viewscoped/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/json-object-builder/index.html b/sample/json-object-builder/index.html
new file mode 100644
index 0000000..eb8d0bc
--- /dev/null
+++ b/sample/json-object-builder/index.html
@@ -0,0 +1,86 @@
+JavaEE Sample::JSON::Object builder
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/json/object-builder/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
Jul 15, 2014: Removed default header by Roberto Cortez
Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
Nov 12, 2013: Enabling one more test by Arun Gupta
Nov 12, 2013: Adding unit tests by Arun Gupta
Nov 12, 2013: Converting to unit tests by Arun Gupta
Nov 12, 2013: Removing redundant and by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 28, 2013: Improved the title by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/json/object-builder/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/json-object-reader/index.html b/sample/json-object-reader/index.html
new file mode 100644
index 0000000..f4462b6
--- /dev/null
+++ b/sample/json-object-reader/index.html
@@ -0,0 +1,195 @@
+JavaEE Sample::JSON::Object reader
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/json/object-reader/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=JsonReaderFromReaderTestmvn test -Dtest=JsonReaderFromStreamTest
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed default header by Roberto Cortez
Nov 12, 2013: Converting to unit tests by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 28, 2013: Fixed title by Arun Gupta
Aug 28, 2013: Cleaned up output by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/json/object-reader/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/json-streaming-generate/index.html b/sample/json-streaming-generate/index.html
new file mode 100644
index 0000000..43e2c48
--- /dev/null
+++ b/sample/json-streaming-generate/index.html
@@ -0,0 +1,98 @@
+JavaEE Sample::JSON::Streaming generate
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/json/streaming-generate/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed default header by Roberto Cortez
Nov 12, 2013: Converting to unit tests by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 28, 2013: Slightly more indicative title by Arun Gupta
Aug 28, 2013: Fixed titles by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/json/streaming-generate/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/json-streaming-parser/index.html b/sample/json-streaming-parser/index.html
new file mode 100644
index 0000000..8bed6d4
--- /dev/null
+++ b/sample/json-streaming-parser/index.html
@@ -0,0 +1,180 @@
+JavaEE Sample::JSON::Streaming parser
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/json/streaming-parser/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=JsonParserFromReaderTestmvn test -Dtest=JsonParserFromStreamTest
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed default header by Roberto Cortez
Nov 12, 2013: Converting into tests by Arun Gupta
Nov 12, 2013: Adding json streaming parser tests - from reader by Arun Gupta
Nov 12, 2013: Adding json streaming parser tests by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 28, 2013: Slightly more indicative titles by Arun Gupta
Aug 28, 2013: Slightly more indicative title by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/json/streaming-parser/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jta-transactional/index.html b/sample/jta-transactional/index.html
new file mode 100644
index 0000000..cb9c5ee
--- /dev/null
+++ b/sample/jta-transactional/index.html
@@ -0,0 +1,151 @@
+JavaEE Sample::JTA::Transactional
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jta/transactional/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=MyTransactionalTxTypeBeanTestmvn test -Dtest=MyTransactionalBeanWithUserTransactionTestmvn test -Dtest=MyTransactionalBeanTest
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
+
+
@Test
+public void should_withTransaction_have_only_one_instance_injected() {
+ bean.withTransaction();
+ assertThat("bean1 and bean2 should the same object", bean.id1, is(bean.id2));
+}
+
+
Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
Dec 01, 2013: Merging jta/transaction-scope and jta/transactional modules by Alexis Hassler
Nov 13, 2013: Added arquillian test for the jta/transaction-scope example by Alexis Hassler
Nov 13, 2013: Added arquillian test for the jta/transactional example by Alexis Hassler
Oct 27, 2013: Fixing a typo for better formatting by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 12, 2013: Using cdi 1.1 "all" style beans.xml by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jta/transactional/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jta-tx-exception/index.html b/sample/jta-tx-exception/index.html
new file mode 100644
index 0000000..e83f767
--- /dev/null
+++ b/sample/jta-tx-exception/index.html
@@ -0,0 +1,55 @@
+JavaEE Sample::JTA::Tx exception
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jta/tx-exception/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
Nov 12, 2013: Fix beans.xml issue by Alexis Hassler
Nov 12, 2013: Delete webapp/* files by Alexis Hassler
Nov 12, 2013: Added arquillian test for the jta/tx-exception example by Alexis Hassler
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 15, 2013: Changing to all style beans.xml by Arun Gupta
Aug 29, 2013: Shows transaction commit for checked exception and rollback for runtime exception by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jta/tx-exception/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/jta-user-transaction/index.html b/sample/jta-user-transaction/index.html
new file mode 100644
index 0000000..1bfa82b
--- /dev/null
+++ b/sample/jta-user-transaction/index.html
@@ -0,0 +1,39 @@
+JavaEE Sample::JTA::User transaction
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jta/user-transaction/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
Nov 22, 2013: Fixing the package name to match artifactid by Arun Gupta
Nov 12, 2013: Fix beans.xml issue by Alexis Hassler
Nov 12, 2013: Added arquillian test for the jta/tx-exception example by Alexis Hassler
Nov 12, 2013: Added arquillian test for the jta/user-transaction example by Alexis Hassler
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 15, 2013: Changing to all style beans.xml by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/jta/user-transaction/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/servlet-async-servlet/index.html b/sample/servlet-async-servlet/index.html
new file mode 100644
index 0000000..4b222af
--- /dev/null
+++ b/sample/servlet-async-servlet/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::Servlet::Async servlet
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/async-servlet/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Nov 10, 2014: Optimized async servlet sample by Alexander Heusingfeld
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 29, 2013: Better output messages by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/async-servlet/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/servlet-cookies/index.html b/sample/servlet-cookies/index.html
new file mode 100644
index 0000000..28b62c6
--- /dev/null
+++ b/sample/servlet-cookies/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::Servlet::Cookies
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/cookies/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jul 12, 2014: New test for programmatic registration of servlets by arun-gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 29, 2013: Aligned title/header by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/cookies/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/servlet-error-mapping/index.html b/sample/servlet-error-mapping/index.html
new file mode 100644
index 0000000..a1efbd4
--- /dev/null
+++ b/sample/servlet-error-mapping/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::Servlet::Error mapping
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/error-mapping/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 12, 2013: Removing metadata-complete by Arun Gupta
Sep 12, 2013: Slight formatting by Arun Gupta
Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema. also added copyright by Arun Gupta
Aug 29, 2013: Better output messages by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/error-mapping/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/servlet-event-listeners/index.html b/sample/servlet-event-listeners/index.html
new file mode 100644
index 0000000..c422f77
--- /dev/null
+++ b/sample/servlet-event-listeners/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::Servlet::Event listeners
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/event-listeners/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Nov 01, 2013: Removing try/resources so that the stream is not closed and error handling is reported correctly by Arun Gupta
Nov 01, 2013: Removing @weblistener by Arun Gupta
Nov 01, 2013: Adding more descriptive output statement by Arun Gupta
Oct 31, 2013: Removing redundant parentheses by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 29, 2013: Better output messages by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/event-listeners/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/servlet-file-upload/index.html b/sample/servlet-file-upload/index.html
new file mode 100644
index 0000000..b49d254
--- /dev/null
+++ b/sample/servlet-file-upload/index.html
@@ -0,0 +1,44 @@
+JavaEE Sample::Servlet::File upload
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/file-upload/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 11, 2013: Changing the project names to be more intuitive by arun-gupta
Nov 17, 2013: File upload test for arun-gupta/javaee7-samples#84 by kubamarchwicki
Oct 31, 2013: Adding debug statements by Arun Gupta
Oct 31, 2013: Adding better debug statements by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/file-upload/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/servlet-metadata-complete/index.html b/sample/servlet-metadata-complete/index.html
new file mode 100644
index 0000000..65ca3cc
--- /dev/null
+++ b/sample/servlet-metadata-complete/index.html
@@ -0,0 +1,40 @@
+JavaEE Sample::Servlet::Metadata complete
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/metadata-complete/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 14, 2013: Simplifying the servlet and adding a test for post by arun-gupta
Dec 13, 2013: Using htmlunit instead of httpunit by arun-gupta
Dec 11, 2013: Changing the project names to be more intuitive by arun-gupta
Nov 19, 2013: Fixing the test to work with arquillian by Arun Gupta
Nov 08, 2013: Starting work on unit test by Arun Gupta
Nov 04, 2013: Started work on a simple test case by Arun Gupta
Nov 04, 2013: Removing try/resources so that the stream is not closed and error handling is reported correctly by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 29, 2013: Better output messages by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/metadata-complete/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/servlet-nonblocking/index.html b/sample/servlet-nonblocking/index.html
new file mode 100644
index 0000000..acb0901
--- /dev/null
+++ b/sample/servlet-nonblocking/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::Servlet::Nonblocking
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/nonblocking/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 29, 2013: Better output messages by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/nonblocking/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/servlet-programmatic-registration/index.html b/sample/servlet-programmatic-registration/index.html
new file mode 100644
index 0000000..6a96f0a
--- /dev/null
+++ b/sample/servlet-programmatic-registration/index.html
@@ -0,0 +1,39 @@
+JavaEE Sample::Servlet::Programmatic registration
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/programmatic-registration/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 12, 2014: Cleaned up imports by arun-gupta
Jul 12, 2014: New test for programmatic registration of servlets by arun-gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/programmatic-registration/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/servlet-protocol-handler/index.html b/sample/servlet-protocol-handler/index.html
new file mode 100644
index 0000000..4325134
--- /dev/null
+++ b/sample/servlet-protocol-handler/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::Servlet::Protocol handler
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/protocol-handler/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/protocol-handler/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/servlet-resource-packaging/index.html b/sample/servlet-resource-packaging/index.html
new file mode 100644
index 0000000..8648535
--- /dev/null
+++ b/sample/servlet-resource-packaging/index.html
@@ -0,0 +1,37 @@
+JavaEE Sample::Servlet::Resource packaging
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/resource-packaging/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 04, 2013: Change to use client.target(uri) to be compatible with jax-rs 1.0 by Aslak Knutsen
Nov 16, 2013: Resource packaging arun-gupta/javaee7-samples#84 test by kubamarchwicki
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 30, 2013: Resources are now correctly packaged in web-inf/lib and read from the servlet. index.jsp is rendered differently based upon the styles.css from the jar file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/resource-packaging/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/servlet-security-basicauth-omission/index.html b/sample/servlet-security-basicauth-omission/index.html
new file mode 100644
index 0000000..6d03a11
--- /dev/null
+++ b/sample/servlet-security-basicauth-omission/index.html
@@ -0,0 +1,53 @@
+JavaEE Sample::Servlet::Security basicauth omission
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/security-basicauth-omission/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jul 12, 2014: New test for programmatic registration of servlets by arun-gupta
Dec 12, 2013: Adding a new sample/test for http-omission by arun-gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/security-basicauth-omission/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/servlet-security-basicauth/index.html b/sample/servlet-security-basicauth/index.html
new file mode 100644
index 0000000..f2685fa
--- /dev/null
+++ b/sample/servlet-security-basicauth/index.html
@@ -0,0 +1,73 @@
+JavaEE Sample::Servlet::security-basicauth
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/security-basicauth/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 14, 2013: Cleaned up tests, added post with correct/incorrect credentials by arun-gupta
Dec 14, 2013: Naming the method appropriately by arun-gupta
Dec 13, 2013: Removing a redundant variable by arun-gupta
Dec 13, 2013: Using htmlunit instead of httpunit by arun-gupta
Dec 12, 2013: Improved the test by arun-gupta
Dec 12, 2013: Cleaned up imports by arun-gupta
Dec 11, 2013: Changing the project names to be more intuitive by arun-gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/security-basicauth/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/servlet-security-deny-uncovered/index.html b/sample/servlet-security-deny-uncovered/index.html
new file mode 100644
index 0000000..b4c3b2e
--- /dev/null
+++ b/sample/servlet-security-deny-uncovered/index.html
@@ -0,0 +1,69 @@
+JavaEE Sample::Servlet::Security deny uncovered
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/security-deny-uncovered/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 12, 2014: New test for programmatic registration of servlets by arun-gupta
Dec 12, 2013: Adding a new sample/test to check for deny-uncovered-http element in web.xml by arun-gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/security-deny-uncovered/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/servlet-security-form-based/index.html b/sample/servlet-security-form-based/index.html
new file mode 100644
index 0000000..ec13068
--- /dev/null
+++ b/sample/servlet-security-form-based/index.html
@@ -0,0 +1,49 @@
+JavaEE Sample::Servlet::security-form-based
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/security-form-based/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=FormTest
Specifications in use:
FormTest
Missing a description for the story. Add some javadoc to the TestClass. Show me how!
Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 14, 2013: Fixed the test by arun-gupta
Dec 11, 2013: Changing the project names to be more intuitive by arun-gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/security-form-based/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/servlet-security-programmatic/index.html b/sample/servlet-security-programmatic/index.html
new file mode 100644
index 0000000..5355aee
--- /dev/null
+++ b/sample/servlet-security-programmatic/index.html
@@ -0,0 +1,57 @@
+JavaEE Sample::Servlet::security-programmatic
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/security-programmatic/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 12, 2014: New test for programmatic registration of servlets by arun-gupta
Dec 11, 2013: Changing the project names to be more intuitive by arun-gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/security-programmatic/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/servlet-servlet-filters/index.html b/sample/servlet-servlet-filters/index.html
new file mode 100644
index 0000000..b197d72
--- /dev/null
+++ b/sample/servlet-servlet-filters/index.html
@@ -0,0 +1,46 @@
+JavaEE Sample::Servlet::Servlet filters
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/servlet-filters/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 29, 2013: Standard junit test - exatly the same as spock specification by kubamarchwicki
Dec 29, 2013: Servlet filter test #84 by kubamarchwicki
Dec 13, 2013: Removing and by arun-gupta
Nov 17, 2013: File upload test for arun-gupta/javaee7-samples#84 by kubamarchwicki
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 30, 2013: Better output messages by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/servlet-filters/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/servlet-simple-servlet/index.html b/sample/servlet-simple-servlet/index.html
new file mode 100644
index 0000000..a918f79
--- /dev/null
+++ b/sample/servlet-simple-servlet/index.html
@@ -0,0 +1,39 @@
+JavaEE Sample::Servlet::Simple servlet
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/simple-servlet/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 03, 2014: Adding simple-servlet module by arun-gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/simple-servlet/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/servlet-web-fragment/index.html b/sample/servlet-web-fragment/index.html
new file mode 100644
index 0000000..4b9d2fb
--- /dev/null
+++ b/sample/servlet-web-fragment/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::Servlet::Web fragment
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/web-fragment/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Oct 31, 2013: Adding better debug statements by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 30, 2013: Better output messages by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/servlet/web-fragment/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/test-utils/index.html b/sample/test-utils/index.html
new file mode 100644
index 0000000..1838468
--- /dev/null
+++ b/sample/test-utils/index.html
@@ -0,0 +1,37 @@
+
undefined local variable or method `contributor' for #
+
Rendering file /home/aslak/dev/source/javaee/javaee-samples.github.io/sample/_sample.html.slim resulted in a failure.
\ No newline at end of file
diff --git a/sample/util/index.html b/sample/util/index.html
new file mode 100644
index 0000000..a555203
--- /dev/null
+++ b/sample/util/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::::
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/util/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
Nov 21, 2013: Moved batch-utils project one level up and renamed it to utils by Roberto Cortez
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/util/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/validation-custom-constraint/index.html b/sample/validation-custom-constraint/index.html
new file mode 100644
index 0000000..c2ed648
--- /dev/null
+++ b/sample/validation-custom-constraint/index.html
@@ -0,0 +1,42 @@
+JavaEE Sample::validation::Custom constraint
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/validation/custom-constraint/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Nov 26, 2013: Add bean validation validator and annotation to deployment by Aslak Knutsen
Nov 22, 2013: Removing redundant beans.xml from archive by Arun Gupta
Nov 22, 2013: Adding properties file and some interim debug statements by Arun Gupta
Nov 13, 2013: Custom constraint validators for arun-gupta/javaee7-samples#85 by kubamarchwicki
Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 28, 2013: Slightly more indicative titles and better display of results by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/validation/custom-constraint/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/validation-methods/index.html b/sample/validation-methods/index.html
new file mode 100644
index 0000000..59c819f
--- /dev/null
+++ b/sample/validation-methods/index.html
@@ -0,0 +1,153 @@
+JavaEE Sample::validation::Methods
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/validation/methods/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
mvn test -Dtest=ConstructorParametersConstraintsTestmvn test -Dtest=ConstructorParametersInjectionTestmvn test -Dtest=MethodParametersConstraintsTest
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Nov 26, 2013: Typo by kubamarchwicki
Nov 26, 2013: Constructor validation injection by kubamarchwicki
Nov 22, 2013: Fixing compilation errors by Arun Gupta
Nov 14, 2013: Constructor validation check with instance injection by kubamarchwicki
Nov 14, 2013: Constructor validation tests for arun-gupta/javaee7-samples#85 by kubamarchwicki
Nov 13, 2013: Method validation tests for arun-gupta/javaee7-samples#85 by kubamarchwicki
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 12, 2013: Using cdi 1.1 "all" style beans.xml by Arun Gupta
Aug 28, 2013: Slightly more intuitive titles by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/validation/methods/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-chat/index.html b/sample/websocket-chat/index.html
new file mode 100644
index 0000000..e90646a
--- /dev/null
+++ b/sample/websocket-chat/index.html
@@ -0,0 +1,44 @@
+JavaEE Sample::WebSocket::Chat
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/chat/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 18, 2014: Removing copyright and splitting host into hostname/port by arun-gupta
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 11, 2013: Adding a new test for websocket chat by arun-gupta
Dec 06, 2013: Sample is now working on wildfly by arun-gupta
Dec 06, 2013: Cleaning up javascript by arun-gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 28, 2013: Aligning the title with other projects by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/chat/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-encoder-client/index.html b/sample/websocket-encoder-client/index.html
new file mode 100644
index 0000000..3f5a662
--- /dev/null
+++ b/sample/websocket-encoder-client/index.html
@@ -0,0 +1,38 @@
+JavaEE Sample::WebSocket::Encoder client
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/encoder-client/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed default header by Roberto Cortez
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 03, 2013: Clean up websocket tests by Aslak Knutsen
Dec 01, 2013: Cleaning up some redundant outputs by arun-gupta
Nov 30, 2013: Naming the method more appropriately by arun-gupta
Nov 30, 2013: Adding a new test and removing redundant files by arun-gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 28, 2013: Adding more meaningful titles by Arun Gupta
Aug 28, 2013: Simplifying @serverendpoint by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/encoder-client/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-encoder-programmatic/index.html b/sample/websocket-encoder-programmatic/index.html
new file mode 100644
index 0000000..693376a
--- /dev/null
+++ b/sample/websocket-encoder-programmatic/index.html
@@ -0,0 +1,36 @@
+JavaEE Sample::WebSocket::Encoder programmatic
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/encoder-programmatic/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 03, 2013: Clean up websocket tests by Aslak Knutsen
Dec 01, 2013: Cleaning up some redundant outputs by arun-gupta
Nov 30, 2013: Adding a new test, still failing with handshake by arun-gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 28, 2013: Improving the title by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/encoder-programmatic/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-encoder/index.html b/sample/websocket-encoder/index.html
new file mode 100644
index 0000000..045671c
--- /dev/null
+++ b/sample/websocket-encoder/index.html
@@ -0,0 +1,48 @@
+JavaEE Sample::WebSocket::Encoder
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/encoder/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 03, 2013: Clean up websocket tests by Aslak Knutsen
Nov 30, 2013: Removing an empty line by arun-gupta
Nov 30, 2013: Adding new arquillian tests for encoder/decoder by arun-gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 15, 2013: Adding netbeans confgiguration file by Arun Gupta
Aug 28, 2013: Improving the title by Arun Gupta
Aug 28, 2013: Aligning the title with other projects and adding meaningful prompts by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/encoder/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-endpoint-async/index.html b/sample/websocket-endpoint-async/index.html
new file mode 100644
index 0000000..0bee9db
--- /dev/null
+++ b/sample/websocket-endpoint-async/index.html
@@ -0,0 +1,49 @@
+JavaEE Sample::WebSocket::Endpoint async
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/endpoint-async/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 04, 2013: Arquillian tests for async websocket endpoint. part of #86 by Jacek Jackowiak
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 29, 2013: Renaming the package by Arun Gupta
Aug 29, 2013: Adding ; to keep javascript valid by Arun Gupta
Aug 28, 2013: Using more meaningful titles, making method names more intuitive by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/endpoint-async/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-endpoint-config/index.html b/sample/websocket-endpoint-config/index.html
new file mode 100644
index 0000000..0a931da
--- /dev/null
+++ b/sample/websocket-endpoint-config/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::WebSocket::Endpoint config
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/endpoint-config/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 28, 2013: Meaningful titles by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/endpoint-config/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-endpoint-javatypes/index.html b/sample/websocket-endpoint-javatypes/index.html
new file mode 100644
index 0000000..b07de73
--- /dev/null
+++ b/sample/websocket-endpoint-javatypes/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::WebSocket::Endpoint javatypes
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/endpoint-javatypes/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 28, 2013: Added support for different primitive types by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/endpoint-javatypes/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-endpoint-programmatic-async/index.html b/sample/websocket-endpoint-programmatic-async/index.html
new file mode 100644
index 0000000..31b33d4
--- /dev/null
+++ b/sample/websocket-endpoint-programmatic-async/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::WebSocket::Endpoint programmatic async
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/endpoint-programmatic-async/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Nov 05, 2013: Adding better debug statements by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 15, 2013: Adding netbeans confgiguration file by Arun Gupta
Aug 28, 2013: Using more meaningful titles by Arun Gupta
Aug 28, 2013: Using more meaningful titles by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/endpoint-programmatic-async/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-endpoint-programmatic-config/index.html b/sample/websocket-endpoint-programmatic-config/index.html
new file mode 100644
index 0000000..6302b35
--- /dev/null
+++ b/sample/websocket-endpoint-programmatic-config/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::WebSocket::Endpoint programmatic config
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/endpoint-programmatic-config/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 28, 2013: Using more meaningful titles, making method names more intuitive by Arun Gupta
Aug 28, 2013: Fixed the artifactid by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/endpoint-programmatic-config/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-endpoint-programmatic-injection/index.html b/sample/websocket-endpoint-programmatic-injection/index.html
new file mode 100644
index 0000000..81f18a0
--- /dev/null
+++ b/sample/websocket-endpoint-programmatic-injection/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::WebSocket::Endpoint programmatic injection
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/endpoint-programmatic-injection/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 12, 2013: Using cdi 1.1 "all" style beans.xml by Arun Gupta
Aug 28, 2013: Using more meaningful titles, making method names more intuitive by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/endpoint-programmatic-injection/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-endpoint-programmatic/index.html b/sample/websocket-endpoint-programmatic/index.html
new file mode 100644
index 0000000..b3d0cfa
--- /dev/null
+++ b/sample/websocket-endpoint-programmatic/index.html
@@ -0,0 +1,58 @@
+JavaEE Sample::WebSocket::Endpoint programmatic
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/endpoint-programmatic/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 03, 2013: Clean up websocket tests by Aslak Knutsen
Dec 01, 2013: Fixing the tests by arun-gupta
Nov 30, 2013: Adding a new test, still failing with handshake by arun-gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 28, 2013: Meaningful titles and netbeans configuration files by Arun Gupta
Aug 28, 2013: Fixed the package name by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/endpoint-programmatic/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-endpoint-security/index.html b/sample/websocket-endpoint-security/index.html
new file mode 100644
index 0000000..b773e4b
--- /dev/null
+++ b/sample/websocket-endpoint-security/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::WebSocket::Endpoint security
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/endpoint-security/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 27, 2014: Fixing the url back by arun-gupta
Oct 27, 2014: Cleaning up source by arun-gupta
Oct 27, 2014: Removing app server specific file by arun-gupta
Oct 23, 2014: Removing redundant file by arun-gupta
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Nov 05, 2013: Adding better debug statements by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 15, 2013: Adding netbeans configuration file by Arun Gupta
Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema. also added copyright by Arun Gupta
Aug 28, 2013: Aligned package names by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/endpoint-security/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-endpoint-singleton/index.html b/sample/websocket-endpoint-singleton/index.html
new file mode 100644
index 0000000..a634648
--- /dev/null
+++ b/sample/websocket-endpoint-singleton/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::WebSocket::Endpoint singleton
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/endpoint-singleton/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 11, 2013: New sample to show singleton instance of websocket endpoint by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/endpoint-singleton/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-endpoint/index.html b/sample/websocket-endpoint/index.html
new file mode 100644
index 0000000..8c6bbed
--- /dev/null
+++ b/sample/websocket-endpoint/index.html
@@ -0,0 +1,74 @@
+JavaEE Sample::WebSocket::Endpoint
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/endpoint/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 03, 2013: Clean up websocket tests by Aslak Knutsen
Dec 01, 2013: Moving binary tests to endpoint by arun-gupta
Dec 01, 2013: Converting to arquillian-enabled tests by arun-gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 28, 2013: Improving the title by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/endpoint/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-httpsession/index.html b/sample/websocket-httpsession/index.html
new file mode 100644
index 0000000..b70e39f
--- /dev/null
+++ b/sample/websocket-httpsession/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::WebSocket::Httpsession
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/httpsession/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 28, 2013: Using more meaningful messages by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/httpsession/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-injection/index.html b/sample/websocket-injection/index.html
new file mode 100644
index 0000000..a69c4db
--- /dev/null
+++ b/sample/websocket-injection/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::WebSocket::Injection
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/injection/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Nov 05, 2013: Adding better debug statements by Arun Gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Sep 15, 2013: Adding netbeans confgiguration file by Arun Gupta
Aug 28, 2013: Better messages by Arun Gupta
Aug 28, 2013: Changing to "all" style by Arun Gupta
Aug 28, 2013: Simplifying annotation by Arun Gupta
Aug 28, 2013: Removing fields that cannot be injected here by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/injection/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-javase-client/index.html b/sample/websocket-javase-client/index.html
new file mode 100644
index 0000000..0488d19
--- /dev/null
+++ b/sample/websocket-javase-client/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::WebSocket::Javase client
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/javase-client/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Nov 06, 2013: Adding changes in the pom.xml by cirix
Aug 29, 2013: Adding netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/javase-client/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-messagesize/index.html b/sample/websocket-messagesize/index.html
new file mode 100644
index 0000000..fb0e29b
--- /dev/null
+++ b/sample/websocket-messagesize/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::WebSocket::Messagesize
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/messagesize/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 29, 2013: Better messages by Arun Gupta
Aug 29, 2013: Adding ; to keep javascript valid by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/messagesize/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-parameters/index.html b/sample/websocket-parameters/index.html
new file mode 100644
index 0000000..860af0a
--- /dev/null
+++ b/sample/websocket-parameters/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::WebSocket::Parameters
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/parameters/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 29, 2013: Better messages by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/parameters/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-properties/index.html b/sample/websocket-properties/index.html
new file mode 100644
index 0000000..04f1e91
--- /dev/null
+++ b/sample/websocket-properties/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::WebSocket::Properties
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/properties/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/properties/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-subprotocol/index.html b/sample/websocket-subprotocol/index.html
new file mode 100644
index 0000000..41592be
--- /dev/null
+++ b/sample/websocket-subprotocol/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::WebSocket::Subprotocol
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/subprotocol/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 29, 2013: Better messages and netbeans configuration file by Arun Gupta
Aug 29, 2013: Fixing the package name by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/subprotocol/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-websocket-client-config/index.html b/sample/websocket-websocket-client-config/index.html
new file mode 100644
index 0000000..da9e7cd
--- /dev/null
+++ b/sample/websocket-websocket-client-config/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::WebSocket::Websocket client config
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/websocket-client-config/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 29, 2013: Fixing package name by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/websocket-client-config/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-websocket-client-programmatic-config/index.html b/sample/websocket-websocket-client-programmatic-config/index.html
new file mode 100644
index 0000000..eb11c20
--- /dev/null
+++ b/sample/websocket-websocket-client-programmatic-config/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::WebSocket::Websocket client programmatic config
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/websocket-client-programmatic-config/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 29, 2013: Fixing package name by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/websocket-client-programmatic-config/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-websocket-client-programmatic-encoders/index.html b/sample/websocket-websocket-client-programmatic-encoders/index.html
new file mode 100644
index 0000000..07706e2
--- /dev/null
+++ b/sample/websocket-websocket-client-programmatic-encoders/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::WebSocket::Websocket client programmatic encoders
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/websocket-client-programmatic-encoders/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 29, 2013: Fixing package name by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/websocket-client-programmatic-encoders/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-websocket-client-programmatic/index.html b/sample/websocket-websocket-client-programmatic/index.html
new file mode 100644
index 0000000..0b8e896
--- /dev/null
+++ b/sample/websocket-websocket-client-programmatic/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::WebSocket::Websocket client programmatic
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/websocket-client-programmatic/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 29, 2013: Fixing package name by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/websocket-client-programmatic/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-websocket-client/index.html b/sample/websocket-websocket-client/index.html
new file mode 100644
index 0000000..2d6d659
--- /dev/null
+++ b/sample/websocket-websocket-client/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::WebSocket::Websocket client
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/websocket-client/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Dec 20, 2013: Cleaning up the code by arun-gupta
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 29, 2013: Better messages and netbeans configuration file by Arun Gupta
Aug 29, 2013: Fixing the package name by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/websocket-client/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-websocket-vs-rest-payload/index.html b/sample/websocket-websocket-vs-rest-payload/index.html
new file mode 100644
index 0000000..4116cfe
--- /dev/null
+++ b/sample/websocket-websocket-vs-rest-payload/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::WebSocket::Websocket vs rest payload
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/websocket-vs-rest-payload/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Feb 21, 2014: Adding a simple sample to compare rest and websocket payloads by arun-gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/websocket-vs-rest-payload/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-websocket-vs-rest/index.html b/sample/websocket-websocket-vs-rest/index.html
new file mode 100644
index 0000000..c0faa79
--- /dev/null
+++ b/sample/websocket-websocket-vs-rest/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::WebSocket::Websocket vs rest
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/websocket-vs-rest/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Nov 10, 2013: Clean for pull request by Maxime Gréau
Nov 10, 2013: On chrome/wildfly, rest client doesn't work. seems that xmlhttprequest by Maxime Gréau
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 29, 2013: Adding netbeans configuration file by Arun Gupta
Aug 29, 2013: Removing accidentally added jersey dependencies by Arun Gupta
Aug 29, 2013: Cleaning up code by Arun Gupta
Aug 29, 2013: Removing redundant code by Arun Gupta
Aug 29, 2013: Removing redundant imports by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/websocket-vs-rest/
Do the changes as you see fit and send a pull request!
Good Luck!
+
\ No newline at end of file
diff --git a/sample/websocket-whiteboard/index.html b/sample/websocket-whiteboard/index.html
new file mode 100644
index 0000000..5f7361b
--- /dev/null
+++ b/sample/websocket-whiteboard/index.html
@@ -0,0 +1,13 @@
+JavaEE Sample::WebSocket::Whiteboard
How to run the sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/whiteboard/
Now we are ready to start testing. You can run all the tests in this sample by executing:
mvn test
Or you can run individual tests by executing one of the following:
There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.
Help Improve
Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker
Recent Changelog
Oct 18, 2014: Removing copyright and splitting host into hostname/port by arun-gupta
Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
Jun 06, 2014: Cleaning up the loggers and using container-managed client sessions instead of user-managed by arun-gupta
Mar 27, 2014: Clean up whiteboard sample by Philippe Marschall
Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
Aug 28, 2013: Making set final by Arun Gupta
Aug 28, 2013: Cleaned up title by Arun Gupta
Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
How to help improve this sample The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
git clone git://github.com/javaee-samples/javaee7-samples.git cd javaee7-samples/websocket/whiteboard/
Do the changes as you see fit and send a pull request!