WebSphere Application Server Network Deployment, Version 6.0.x     Operating Systems: AIX, HP-UX, Linux, Solaris, Windows

Developing ActiveX application client code

Before you begin

This topic provides an outline for developing an ActiveX program, such as Visual Basic, VBScript, and Active Server Pages, to use the WebSphere ActiveX to EJB bridge to access enterprise beans.

This topic assumes that you are familiar with ActiveX programming. Consider the information given in ActiveX to EJB bridge as good programming guidelines.

Why and when to perform this task

To use the ActiveX to EJB bridge to access a Java class, develop your ActiveX program to complete the following steps:

Steps for this task

  1. Create an instance of the XJB.JClassFactory object.
  2. Create Java Virtual Machine (JVM) code within the ActiveX program process, by calling the XJBInit() method of the XJB.JClassFactory object. After the ActiveX program has created an XJB.JClassFactory object and called the XJBInit() method, the JVM code is initialized and ready for use.
  3. Create a proxy object for the Java class, by using the XJB.JClassFactory FindClass() and NewInstance() methods. The ActiveX program can use the proxy object to access the Java class, object fields, and methods.
  4. Call methods on the Java class, using the Java method invocation syntax, and access Java fields as required.
  5. Use the helper functions to do the conversion in cases where automatic conversion is not possible. You can convert between the following data types:
    • Java Byte and Visual Basic Byte
    • Visual Basic Currency types and Java 64-bit
  6. Implement methods to handle any errors returned from the Java class. In Visual Basic or VBScript, use the Err.Number and Err.Description fields to determine the actual Java error.

What to do next

After you develop the ActiveX client code, start the ActiveX application.



Sub-topics
Starting an ActiveX application
JClassProxy and JObjectProxy classes
Java virtual machine initialization tips
Example: Developing an ActiveX application client to enterprise beans
Example: Calling Java methods in the ActiveX to enterprise beans
Java field programming tips
ActiveX to Java primitive data type conversion values
Array tips for ActiveX application clients
Error handling codes for ActiveX application clients
Threading tips
Example: Viewing a System.out message
Example: Enabling logging and tracing for application clients
ActiveX client programming best practices
Task topic    

Terms of Use | Feedback

Last updated: Mar 17, 2005 4:28:29 AM CST
http://publib.boulder.ibm.com/infocenter/ws60help/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/tcli_developactivex.html

© Copyright IBM Corporation 2004, 2005. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)