Sunday, October 31, 2004

notes on bea workshop 8.1 control

--- controls are lightweight JavaBeans based framework with a single goal: making it easy to leverage resources in j2ee.

--- Most of the inbuilt controls are designed to generate a Java control extension (JCX) file when you add a new one to your application. The JCX file contains configuration information specific to that use of the control. You can reuse a generated JCX file in multiple applications. This kind of reuse assumes that the resources specified by the JCX file are present for each application in which it's used.

--- Not all Java controls generate a JCX file. Controls that do not must always be added as new controls. An example of such a control is the Timer Control.

--- Custom java controls are built from a Java control source file (JCS) and an interface file (JAVA) .

--- By default WebLogic Workshop adds this control file with a JCX extension to the same folder as the file that is currently open in Design View. This control file cannot be located in the root of the project. If the application is in the root of the project, you must create the built-in control in a different folder.

--- controls are javabeans and can be instantiated and used from anywhere like jsp, pageflows, JSF, web services, ejbs, and other component types.

--- For the sake of convenience, you will develop your Java control within a web application project instead of a Java control project. By developing a Java control within a web application project, it is easier to generate and use Workshop's testing devices.

--- When creating custom control, Note that two files are created: (1) a JCS file (which stands for "Java Control Source") and (2) JAVA file. The JCS file contains the implementation code for your Java control, the JAVA file contains the public interface for the underlying implementation code. The JAVA file is the public face of your Java control: it is essentially a list of methods that users can call to access the functionality contained within the underlying implementation code. For the most part, you do not have to directly edit the JAVA file, because WebLogic Workshop automatically maintains the JAVA file as your edit the JCS file.

--- A JCX file extends one of Workshop's pre-build control classes.

---- When creating controls server must be running. controls can be created without server running but it looks like that it may not show all methods. found this issue when adding jms control in the control tutorial.

--- It is necessary to separate the (Investigate) Java control from (its test) web service because web services aren't enabled in Control projects.

--- Java controls can be compiled into JAR files for general distribution to other containers.

--- Also note that once you have compiled a Java control, WebLogic Workshop uses the JAR version by default, instead of working directly from the source code contained in the control project.

--- You can use Java controls to encapsulate complex functionality.

--- Java controls can communicate asynchronously with other components.

--- Control property attribute values are stored as Javadoc annotations in source code

---- tried to use controls from the following but did not work. there was no option to do a 'new control'.

from java project (.java files have no design tab)
from ejb project (even though their was design tab)

No comments: