ATG's Commerce Reference Store already has a list of module which it uses for assembly and deployment. We have to add our new module MyCustomProject on the top of the default CRS module list.
4. Adding module on top of CRS
a. Open "cmd" as Administrator.
b. Navigate to DYNAMO_HOME/bin. [command: cd %DYNAMO_HOME%/bin]
c. Start cim utility [command: cim.bat]
d. This will start the cim utility.
e. Once it is started, and you can see the menu, press "3" for Server Instance Configuration, and press enter. It will give you a server selection, something like below:-
f. Select the option for Production Server (whatever shows on your screen), and press Enter.
g. Press "C" for Modify Calculated List.
h. Press "A" for Add a Custom Module
i. Enter the name of your custom module, enter MyCustomProject, which we created in previous articles. Press Enter.
j. Next, CIM will ask for entering the location of your module. Chose whatever is the last number on your list. For me, it shows "17". Enter that number and press Enter.
k. CIM will display a the module list under "Current Module List". Make sure your module MyCustomProject is placed last. See below screenshot.
l. Press "D" and press enter.
m. It will come back to the previous menu. Press "O" for Configure another instance type, and press Enter. Next, press "D" for Done and press Enter.
n. The screen will come back to the main menu.
NOTE: The above steps are ONLY for adding a new module to existing list. You dont have to do all the steps above every time. These steps must be repeated ONLY when you create a new module.
5. Deploying the application
Start CIM if it is not already runnning. [Use Steps 4-a,b and c above]
a. Make sure your weblogic "ADMIN" server is running.
b. Press "4" for Application Assembly and Deployment.
c. Next, select the option for atg_production_lockserver.
d. CIM will display the ear name [atg_production_lockserver]. Press ENTER directly
d. System will again display a list of all the modules. Make sure your module (MyCustomProject) is present at the end of the list.
e. Press "D" for Deploy Production with Server Lock Manager, and press Enter.
f. If your Weblogic Admin is running, your EAR will be created without errors and the system will come back to the same menu. Check the logs on the CIM screen carefully. It should not have any errors. See below screenshot.
g. Now, your production EAR has been successfully deployed.
NOTE: Now that your module is added to the list, whenever you make changes to your code within this module (MyCustomProject), you have to repeat these steps.
6. Starting the Servers
a. Open "cmd" as Administrator.
b. Navigate to your weblogic domains directory.
[command: cd D:/Oracle/Middleware/domains/atg11/bin]
c. Use the startManagedWebLogic.cmd followed by the server name to start the production server. [command: startManagedWebLogic.cmd atg_production_lockserver]
d. This will start your server.
e. Once your server is started, hit the URL: http://localhost:7003/myWebApp
f. This should open a sample JSP (this is automatically created in the module by eclipse)
Your screen should display like this.
g. Now, open the dyn/admin. [http://localhost:7003/dyn/admin].
h. Login using admin/Welcome1 for first dialogue box, weblogic/Welcome1 for second dialogue box.
h. Go to Component Browser --> Search --> Type MyFirstComponent --> Press Enter
i. Your result should be displayed like this:-
j. This means that your component has been instantiated.
h. Click on this link, and see the "age" and "name" properties with the values you entered in your properties.
Now, you have successfully deployed your custom module.
Whenever you make any changes in the code, you can skip the Step "4" and jump directly to step "5" and then "6"
Next, we will see how we can create .bat files for automating the startup.