CRS#006 - Create & Deploy new ATG Module on local from scratch - Part II



After creation of the new, blank ATG module, we will create a custom component to test this module.

3. Create a new Component

We have already discussed the steps for creating a new module in ART#104 & ART#105, but we will revisit them here. If you have a slight idea on components, you can proceed with this article. If you have no clue on this, you can go on and read ART#104 HERE.

a. Create a new class "MyFirstClass" in the src folder under the package "com.test". Create two properties viz. age and name with their setter-getters. See below screenshot.


b. Next, in the config folder, create a folder "com". Inside this folder, create another folder "components". Inside this folder, create a new file "MyFirstComponent.properties". Set the class, and values of the properties: age and name. See below screenshot.


c. Next, inside the config folder, create a new file "Initial.properties". Add this component to initialServices. If you have no idea what this file does, you can refer to more details in ART#105 HERE.



Now, you have configured eclipse, created a blank ATG module, created a new component and added it to initialServices, so that it can be initialized at startup.

Next, we will assemble this application on top of CRS and deploy it.

2 comments:

  1. Hi Monis,

    One simple question if we will create a separate module then to use all other modules of CRS what should be the config file? , because i if i did not mention the all other modules in my module's config file then how can i use it?

    Thanks
    Ajay

    ReplyDelete
    Replies
    1. You dont have to define the modules in any config file.
      You have to provide the module names while assembling the application (using runAssembler.bat) [OR you can use CIM]

      Delete

Subscribe

Get All The Latest Updates Delivered Straight Into Your Inbox For Free!

Flickr