Schlagwörter » Java EE

Java EE Batch Framework - Step 10 Processing Multiple URLs

Processing Multiple URLs

Up to now, we have just been processing a single URL and not really taking advantage of the batch partition.  In the last step, we update the code to take advantage of the partition. noch 163 Wörter

MongoDB

Java EE Batch Framework - Step 9 Writing to MongoDB

Writing to MongoDB

1)      Add the MongoDBJava driver as a library to your project.

2)      Create a property file to place connection information.

3)      Create properties within the property file that define the server host name, ports, and authentication information to connect to the database. noch 91 Wörter

MongoDB

Java EE Batch Framework - Step 8 The Parser

The Parser

A parser is needed to take the HTML (doc) and turn it into the product object.  Creating an interface since we could have different parsers and not just one for the site.  noch 166 Wörter

MongoDB

Java EE Batch Framework - Step 7 Create the Entities

Create the Entities

Because we are crawling a site to get product data, it makes sense to create a product entity. Multiple products exist on one HTML page (doc) so a product container (products) will also be helpful. noch 76 Wörter

MongoDB

Java EE Batch Framework - Step 6 Running the Batch Job

Running the Batch Job

The Java EE batch framework requires a launching mechanism either in the form of a JSP/Servlet or  an EJB timer.  We will create a JSF page to launch the job. noch 222 Wörter

MongoDB

Java EE Batch Framework - Step 5 Partition Mapper

This section will cover the partition mapper.  The partition mapper will implement the functionality to operate the batch frame work in parallel.  It is an optional component, but for a site parser it will be helpful to setup for performance.   noch 319 Wörter

MongoDB