Socket Beans (Beans for Novell Services)

1.0 Introduction
2.0 What's New
3.0 Documentation
4.0 Bean Dependencies
5.0 Directory References
6.0 CLASSPATH Variable
7.0 Path Variable
8.0 Sample Programs
8.1 Running the Sample Programs on a NetWare Server
9.0 Using Beans in Visual Cafe
10.0 Using Beans in JBuilder
11.0 Legal Notices

1.0 Introduction

Beans for Novell Services abstract major NetWare and Directory services into JavaBean components. The easy-to-use Java components can be used for rapid and effective development of network applications.

Socket beans allow you to easily integrate low-level communication functionality into your network applications without writing directly to the socket or delving into low-level network programming APIs.

Novell provides the following Socket Beans:

The Novell Developer Web site provides information about the updates to the JavaBeans. Visit this site to download new beans and view updated versions of the documentation and component features.


2.0 What's New

Beans for Novell Services now includes eCommerce Beans and the complete suite of components is split into five new categories. The software, documentation, and sample code for each category will be available as separate downloads on the NDK site from now on. Easy access to required components and lesser download time are the key benefits.


3.0 Documentation

After you have installed the documentation, use the NDK Documents entry on your Start menu to quickly locate and access NDK documentation.

The documentation for the beans consists of html files and graphics files in several different directories.

To view the documentation, locate the index.htm file in the [install location]\doc directory and open that file in your Web browser.


4.0 Bean Dependencies

For all beans, the following are required:


5.0 Directory References

BEANSHOME refers to the root directory of LDAP beans; for example, c:\novell\java.


6.0 CLASSPATH Variable

Ensure that the .jar files containing the beans that you use and the corresponding dependencies are in your CLASSPATH. For using the Scoket Beans, NWSockets.jar should be included in the classpath in the following format:

For example: BEANSHOME\beans\NWSockets.jar


7.0 Path Variable

Ensure that the location of NWNative.dll, NWSckNtv.dll, jncpv2.dll, and jncpv2_g.dll is in your PATH variable.

For NetWare, ensure that the location of NWNative.nlm, NWSckNtv.nlm, jncpv2.nlm, and jncpv2_g.nlm is in your SEARCH path.


8.0 Sample Programs

Sample programs are provided to demonstrate the usage of the Beans. They are bundled with the software package. The samples can also be downloaded from the NDK site.


8.1 Running the Sample Programs on a NetWare Server

The samples are installed to the sys:\java\samples\beans directory by default.

  1. Use the ENVSET command at the console to set the CWD (current working directory) variable to the directory containing the sample you wish to run, such as

    myserver:envset cwd=sys:\java\samples\beans\dsbrowse

    The directories containing the samples are:

    sys:\java\samples\beans\clientsocket
    sys:\java\samples\beans\serversocket

  2. At the console prompt, type: java <class name>, where <class name> is the appropriate class for the demo you want to run. The class names are:

    ClientSocketTest
    ServerSocketTest

If you experience problems running the sample programs, use the ENVSET command to verify that all the appropriate .jar files are included in the CLASSPATH environment variable.


9.0 Using Beans in Visual Cafe

  1. With Visual Cafe not running, modify the sc.ini file found in Visual Cafe's bin directory and append the following text to the line that starts with CLASSPATH=

    ;NJCLHOME\lib\njclv2.jar;NJCLHOME\lib\jndi.jar
    ;NJCLHOME\lib\swing.jar

  2. Run Visual Cafe and open the Component Library window. Using Explorer, drag the .jar files into the Component Library window.

    or

    Run Visual Cafe > click File > Add Component to Library > select the .jar file you wish to add to the Component Library window > click Open.

  3. To use a bean in your code, drag the bean's icon from the Component Library window into the Project Window and over the class name of the class you want to use it in, then drop it.


10.0 Using Beans in JBuilder

  1. Right-click the tool palette > select Properties.

  2. In the Palette Properties window click Add > create a new page with whatever name you would like > click OK.

  3. Select the new page > select the Add From Archive tab > Browse for a .jar file with its manifest intact, and select the .jar file.

  4. Select the Only Display Classes that Have BeanInfo checkbox > click Install. When you see the Installation Complete message, click OK.

    You should now see a tab representing the new page on your tool palette, and you should see an icon for the bean on the new page.

    Now you need to create a new project. If your project has a graphical user interface, proceed to Step 5. If it does not have a graphical user interface, skip to Step 6.

  5. To create a new project with a graphical user interface, go into design mode and select the bean from the palette. Drop the bean into your visual component, such as a frame or panel. You should now see the name of your bean in the Structure Pane.

  6. In the Project Window, right-click the name of the project > select Properties.

  7. In the Properties dialog, select the Edit button for the CLASSPATH and add the .jar file.


11.0 Legal Notices

Novell, Inc. makes no representations or warranties with respect to the contents or use of this documentation, and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. Further, Novell, Inc. reserves the right to revise this publication and to make changes to its content, at any time, without obligation to notify any person or entity of such revisions or changes.

Further, Novell, Inc. makes no representations or warranties with respect to any software, and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. Further, Novell, Inc. reserves the right to make changes to any and all parts of Novell software, at any time, without any obligation to notify any person or entity of such changes.

You may not export or re-export this product in violation of any applicable laws or regulations including, without limitation, U.S. export regulations or the laws of the country in which you reside.

Copyright © 2003 - 2004 Novell, Inc. All rights reserved. No part of this publication may be reproduced, photocopied, stored on a retrieval system, or transmitted without the express written consent of the publisher.

Novell is a registered trademark of Novell, Inc. in the United States and other countries.

All third-party products are the property of their respective owners.