Skip to content

Commit

Permalink
JDF-416 Updated the tutorial for ShrinkWrap deployment updates
Browse files Browse the repository at this point in the history
Updated the tutorial to incrementally update the ShrinkWrap
deployment used in the test suite.
  • Loading branch information
VineetReynolds committed Nov 12, 2013
1 parent fab75fa commit 0f836ab
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 22 deletions.
Expand Up @@ -3,10 +3,9 @@
import org.jboss.jdf.example.ticketmonster.model.Booking;
import org.jboss.jdf.example.ticketmonster.model.search.PriceMinBridge;
import org.jboss.jdf.example.ticketmonster.rest.BaseEntityService;
import org.jboss.jdf.example.ticketmonster.rest.CartService;
import org.jboss.jdf.example.ticketmonster.rest.dto.VenueDTO;
import org.jboss.jdf.example.ticketmonster.rest.search.SearchService;
import org.jboss.jdf.example.ticketmonster.service.*;
import org.jboss.jdf.example.ticketmonster.service.SeatAllocationService;
import org.jboss.jdf.example.ticketmonster.util.MultivaluedHashMap;
import org.jboss.jdf.ticketmonster.test.TicketMonsterDeployment;
import org.jboss.shrinkwrap.api.spec.WebArchive;
Expand All @@ -20,20 +19,11 @@ public static WebArchive deployment() {
return TicketMonsterDeployment.deployment()
.addPackage(Booking.class.getPackage())
.addPackage(BaseEntityService.class.getPackage())
.addPackage(MultivaluedHashMap.class.getPackage())
.addPackage(SeatAllocationService.class.getPackage())
.addPackage(VenueDTO.class.getPackage())
.addPackage(SearchService.class.getPackage())
.addPackage(PriceMinBridge.class.getPackage())
.addPackage(MultivaluedHashMap.class.getPackage())
.addClass(CartStore.class)
.addClass(CartService.class)
.addClass(SectionAllocationKey.class)
.addClass(SeatAllocationService.class)
.addClass(AllocatedSeats.class)
.addClass(MediaPath.class)
.addClass(MediaManager.class)
.addClass(Bootstrap.class)
.addClass(BotService.class)
.addClass(Bot.class)
.addAsLibraries(Maven.resolver()
.loadPomFromFile("pom.xml")
.resolve("org.infinispan:infinispan-core").withTransitivity().asFile());
Expand Down
32 changes: 29 additions & 3 deletions tutorial/AdminHTML5.asciidoc
Expand Up @@ -436,11 +436,37 @@ We shall now proceed to modify the AngularJS views to use the new properties in
<td><a href="#/TicketPrices/edit/{{result.id}}">{{result.ticketCategory.description}}</a></td>
------------------------------------------------------------------------------------------

We can test these changes by running
== Updating the ShrinkWrap deployment for the test suite

We've added classes to the project that should be in the ShrinkWrap deployment used in the test suite. Let us update the ShrinkWrap deployment to reflect this.

.src/test/java/org/jboss/jdf/ticketmonster/test/rest/RESTDeployment.java
[source,java]
------------------------------------------------------------------------------------------
public class RESTDeployment {
public static WebArchive deployment() {
return TicketMonsterDeployment.deployment()
.addPackage(Booking.class.getPackage())
.addPackage(BaseEntityService.class.getPackage())
.addPackage(MultivaluedHashMap.class.getPackage())
.addPackage(SeatAllocationService.class.getPackage())
.addPackage(VenueDTO.class.getPackage());
}
}
------------------------------------------------------------------------------------------

We can test these changes by executing

----
mvn clean package jboss-as:deploy
mvn clean test -Parq-jbossas-managed
----

as usual.
or (against an already running JBoss EAP 6.1 instance)

----
mvn clean test -Parq-jbossas-remote
----

as usual.
7 changes: 2 additions & 5 deletions tutorial/BusinessLogic.asciidoc
Expand Up @@ -1169,11 +1169,8 @@ public class RESTDeployment {
return TicketMonsterDeployment.deployment()
.addPackage(Booking.class.getPackage())
.addPackage(BaseEntityService.class.getPackage())
.addPackage(MockMultivaluedMap.class.getPackage())
.addClass(SeatAllocationService.class)
.addClass(AllocatedSeats.class)
.addClass(MediaPath.class)
.addClass(MediaManager.class);
.addPackage(MultivaluedHashMap.class.getPackage())
.addPackage(SeatAllocationService.class.getPackage());
}
}
Expand Down
40 changes: 39 additions & 1 deletion tutorial/DataGrid.asciidoc
Expand Up @@ -1560,7 +1560,45 @@ Finally, we will need to update the booking confirmation page.

This is it!

== Conclusion
== Updating the ShrinkWrap deployment for the test suite

We've added JDG/Infinispan to the project that should be in the ShrinkWrap deployment used in the test suite. Let us update the ShrinkWrap deployment to reflect this.

.src/test/java/org/jboss/jdf/ticketmonster/test/rest/RESTDeployment.java
[source,java]
------------------------------------------------------------------------------------------
public class RESTDeployment {
public static WebArchive deployment() {
return TicketMonsterDeployment.deployment()
.addPackage(Booking.class.getPackage())
.addPackage(BaseEntityService.class.getPackage())
.addPackage(MultivaluedHashMap.class.getPackage())
.addPackage(SeatAllocationService.class.getPackage())
.addPackage(VenueDTO.class.getPackage())
.addAsLibraries(Maven.resolver()
.loadPomFromFile("pom.xml")
.resolve("org.infinispan:infinispan-core").withTransitivity().asFile());
}
}
------------------------------------------------------------------------------------------

We can test these changes by executing

----
mvn clean test -Parq-jbossas-managed
----

or (against an already running JBoss EAP 6.1 instance)

----
mvn clean test -Parq-jbossas-remote
----

as usual.


== Conclusion

You have successfully converted your application from one that relies exclusively on relational persistence to using a NoSQL (key-value) data store for a part of its data. You have identified the use cases where the switch is mostly likely to result in performance improvements, including the changes in application functionality that can benefit from this conversion. You have learned how to set up the infrastructure, distinguish between the different configuration options, and use the API.
41 changes: 41 additions & 0 deletions tutorial/HibernateSearch.asciidoc
Expand Up @@ -1627,6 +1627,47 @@ Let's finally add the necessary routes corresponding to the facet filtering and

With minimal work, we have added a powerful search engine with geolocalized queries and faceting improve further customer's navigation.

== Updating the ShrinkWrap deployment for the test suite

We've added classes to the project that should be in the ShrinkWrap deployment used in the test suite. Let us update the ShrinkWrap deployment to reflect this.

.src/test/java/org/jboss/jdf/ticketmonster/test/rest/RESTDeployment.java
[source,java]
------------------------------------------------------------------------------------------
public class RESTDeployment {
public static WebArchive deployment() {
return TicketMonsterDeployment.deployment()
.addPackage(Booking.class.getPackage())
.addPackage(BaseEntityService.class.getPackage())
.addPackage(MultivaluedHashMap.class.getPackage())
.addPackage(SeatAllocationService.class.getPackage())
.addPackage(VenueDTO.class.getPackage())
.addPackage(SearchService.class.getPackage())
.addPackage(PriceMinBridge.class.getPackage())
.addAsLibraries(Maven.resolver()
.loadPomFromFile("pom.xml")
.resolve("org.infinispan:infinispan-core").withTransitivity().asFile());
}
}
------------------------------------------------------------------------------------------

We can test these changes by executing

----
mvn clean test -Parq-jbossas-managed
----

or (against an already running JBoss EAP 6.1 instance)

----
mvn clean test -Parq-jbossas-remote
----

as usual.


== More resources

To learn more about search and Hibernate Search in particular, take a look at the link:http://search.hibernate.org[Hibernate Search] project and its documentation.

0 comments on commit 0f836ab

Please sign in to comment.