Freitag, Juni 25, 2004

 

OC4J Remote deployment with dcmctl Commands

I get often the question how to deploy a J2EE App. remotely to IAS. Here are two examples to that:

java.exe -Djava.protocol.handler.pkgs=HTTPClient -jar d:\jdev9052\jdev\lib\oc4j_remote_deploy.jar http://192.33.33.12:1811/Oc4jDcmServletAPI/ ias_admin PASSWORD redeploy F:\ora10g\midtier F:\test\deploy\helloOracle.ear helloOracle home

parameter's:

Protocol: -Djava.protocol.handler.pkgs=HTTPClient
Deploy Utility: eg. d:\jdev9052\jdev\lib\oc4j_remote_deploy.jar
MidtierDeployServlet incl. EM port: http://192.33.33.12:1811/Oc4jDcmServletAPI/
IAS-Username: ias_admin
Password: PASSWORD
Option eg: redeploy, listApplications ... (any dcmctl option is possible"
Midtier ORACLE_HOME Directory: eg.
F:\ora10g\midtier
EAR-File: F:\test\deploy\helloOracle.ear
AppName eg: helloOracle
InstanceName: home

or use the following ANT-Task:

<
<java jar="${jdeveloper.dir}/jdev/lib/oc4j_remote_deploy.jar" fork="yes">
<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient" />
<arg value="http://remote_server:1810/Oc4jDcmServletAPI/" />
<arg value="ias_admin" />
<arg value="PASSWORD" />
<arg value="redeploy" />
<arg value="${ias_oracle_home.dir}/" />
<arg value="${build.dir}/${name}.ear" />
<arg value="${appname}" />
<arg value="OC4J_XXXXINSTANCEName" />
</java>

Here an other example to query DCM with the listApplications paramter:

F:\jdev9051\jdk\jre\bin\javaw.exe -Djava.protocol.handler.pkgs=HTTPClient -jar F:\jdev9051\jdev\lib\oc4j_remote_deploy.jar http://testhost:1811/Oc4jDcmServletAPI/ ias_admin **** listApplications D:\ora10g\midtier

All commands will interpreted form the Oracle Application Server Servlet deployed in the home OC4J instance.

regards,
Berthold

Donnerstag, Juni 03, 2004

 

UIX and Struts

UIX in conjunction with the Struts extention (not ADF-DataBinding) can not automaticly populate form fields of a UIX-Table (editable UIX-Table or selectionKey of the table component) to ActionForms with Array-Argumens like setFirstName(String[]). The problem lies in the naming schema of cascaded components. To identify each column with an unique name, UIX concat the name of each column element with the table name and the column sign ':'. So, an editable column get the name like myTable:firstName. With this extention Struts can't find the right setter method in the ActionFormBean. This limitation needs to overwrite the form struts population mechanism to solve the problem.
To do that you must overwrite the processPopulate methode of the org.apache.struts.action.RequestProcessor.java


protected void processPopulate(HttpServletRequest request,
HttpServletResponse response,
ActionForm form,
ActionMapping mapping)
throws ServletException {

super.processPopulate(request, response, form, mapping);

String contentType = request.getContentType();

if ((contentType != null && contentType.startsWith("multipart")) || (form == null)) {
return;
}

UixStrutsFormPopulateUtil.populate(form, request);

}

Additional you must register your new RequestProcessor within the struts-config.xml like this:



When you use table selection moded, UIX add the keyword "Selected" and the row index to the tableName (myTable:Selected:1, myTable:Selected:2 usw.). This behavior must also be handled in your own population methode to get an array of selected rows.









This page is powered by Blogger. Isn't yours?