Phrozen


CJ's Technical Playground
Warning: Most of these code examples are from 10-13 YEARS ago (OLD STUFF). All projects listed here are currently UNMAINTAINED, available for HISTORIC purposes only.
ASPCorbaJavaJavaScriptLinuxMySQLPerl
PHPPython and JythonShockwaveVRMLXML


Back To My Resume

Java
Sub-categories:

My Freeware Distributions
EJB
JNDI
JMS
RMI
CORBA (in Java)
JavaMail
JSP
Servlets
JavaBeans
GUI
Regular Apps & Applets
JDBC (throughout various categories)
Java Media Framework (see GUI )
cyJNDI-cyJMS is a new naming and messaging application server using  SSL secured sockets (JSSE), with a clear focus on security and remote administration.  cyJNDI-cyJMS is available as restricted freeware and available for download.  The current version is 1.0 beta.

Go to the cyJNDI-cyJMS page for more information and downloads.


EJB (Enterprise JavaBeans)

Site Categories Entity Bean:
This is a Container-Managed Entity Bean which makes great use of a Yahoo-style index of my sites kept in my MySQL database.  Part of the purpose of this EJB, when used in conjuction with the client I created, is to reduce the number of repetitive hits to a database.  The client is a Servlet, which invokes an overloaded ejbCreate() method with 2 parameters, a category number and a String name for the the collection of results (a CachedRowSet, a serializable & disconnected ResultSet). The category number, called cat_no is the primary key.  The EJB draws the collection of related sites from a column called "itsgroup" in a table called "thesites" in my siteindex2 database, and saves 7 container managed fields to a table called YahooEnt.  When my serlvet engine starts up, the client servlet immediately creates the EJBs for all necessary categories, grabs the CachedRowSets from the EJB, and binds them to their own JNDI namespaces.  A running thread in the servlet then refreshes those CachedRowSets at a set interval, say 1-2 minutes, then rebinds the latest data to the name spaces.   The end user then receives the database information from the JNDI-bound CachedRowSets, rather than the database directly.  The logic behind this being that the end user will be provided with up-to-date databse information, without taxing the database with repeated hits.  The servlet's 1 hit per minute is much more favorable than serveral hundred client hits in the span of a few minutes.  This EJB IS copyright and may not be used by anyone other than myself.  If downloaded for testing, it must be deleted within 24 hours.

Bean:
Home Interface: 
CategoryHome.java
Remote Interface: 
Category.java
Implementation: 
CategoryBean.java
Primary Key Class: 
CategoryPK.java
Deployment Descriptor:
Category_ejb-jar.xml   (ejb-jar.xml)
Client:
A multi-threaded Servlet using JNDI: 
YahooEntServlet.java
Tables/Databases:
siteindex2 database
YahooEnt.

Note: There is a Bean-Managed persistence version of this EJB, which I will be putting on this site as soon as I find the time.

User Preferences EJB:
This is a fairly straight-forward Stateless Session bean which creates user preference accounts for visitors, and is the first part of a current project I've been working on, on and off.  Basically, this EJB helps a client create a user account with a login, password, and machine-generated serial number, to be used later to allow the user to experience the site with the colors, links, etc that he/she prefers.  The client is a JSP/Bean combination which both helps the user create an account (through the EJB), and sets a cookie based on the issued serial number after registration has been completed.  This EJB IS copyright and may not be used by anyone other than myself.  If downloaded for testing, it must be deleted within 24 hours.

Bean:
Home Interface:  CreateAccountHome.java
Remote Interface: 
CreateAccount.java
Implementation: CreateAccountBean.java
Deployment Descriptor:
CreateAccount_ejb-jar.xml
Client:
JSP/Bean: 
CreateAccounts.jsp
Bean for JSP
Database:
Tables for user accounts:

EJBMail:
This is a Stateless Session bean which uses the JavaMail API to send mail.  It is intended for use as a website feedback mechanism.  Simply put, the EJB performs some simple mail validation, constructs a MimeMessage, and sends it to the local server on port 25.  This EJB was created and tested on the free EJBoss EJB server with FTGate as the mail server.  Since EJBoss is pretty much EJB 1.1 compliant, I used XML for my deployment descriptor (ejb-jar.xml).  I created two clients for this EJB, a Swing GUI and a Servlet.  This EJB IS copyright and may not be used by anyone other than myself.  If downloaded for testing, it must be deleted within 24 hours.

Bean:
Home Interface:  EJBMailDaemonHome.java
Remote Interface: 
EJBMailDaemon.java
Implementation: EJBMailDaemonEJB.java
Deployment Descriptor:
EJBMail_ejb-jar.xml   (ejb-jar.xml)
Clients:
Swing GUI: 
EJBMailClient.java
see a snapshot
Servlet: 
EJBMailServlet.java

EJB Query with Cached RowSet:
This is a Stateless Session bean which uses JDBC and MySQL, along with the Early Access release of the Cached Rowset extension available at Sun's JDC site.  For those who don't know, the Cached Rowset extension provides a means of tranporting a serialized, disconnected, scrollable ResultSet.  This EJB simply lists all the sites in one of my databases, then transports the results inside a Cached Rowset to the client, where they can then be iterated through as if they were a regular ResultSet.  This EJB has since graduated to a full-grown, complex search engine (not shown here in the interest of not having it stolen, EJBs are worth too much $$$).  However, the more basic application appears below.  The client for this  EJB is a simple command line application.  This EJB was created and tested on the free EJBoss EJB server with FTGate as the mail server.  Since EJBoss is pretty much EJB 1.1 compliant, I used XML for my deployment descriptor (ejb-jar.xml).   This EJB IS copyright and may not be used by anyone other than myself.  If downloaded for testing, it must be deleted within 24 hours.

Bean:
Home Interface: 
JdbcEJBHome2.java
Remote Interface: 
JdbcEJB2.java
Implementation: 
JdbcEJBEJB2.java
Deployment Descriptor:
JdbcEJB2_ejb-jar.xml   (ejb-jar.xml)
Client:
Simple Command Line App: 
JdbcEJB2Client.java

Simple EJB Query:
This is a Stateless Session bean which which is very similar to the EJB above this one, except it transports query results in a Vector instead of a Cached RowSet. Therefore, it is a little messier; however it gets the job done correctly.   This was a solution I used earlier to solve the serialization issue before trying the new Cached RowSet extension.  This EJB has since graduated to a full-grown, complex search engine (not shown here in the interest of not having it stolen, EJBs are worth too much $$$).  However, the more basic application appears below.  The client for this  EJB is a simple command line application.  This EJB was created and tested on the free EJBoss EJB server with FTGate as the mail server.  Since EJBoss is pretty much EJB 1.1 compliant, I used XML for my deployment descriptor (ejb-jar.xml).   This EJB IS copyright and may not be used by anyone other than myself.  If downloaded for testing, it must be deleted within 24 hours.

Bean:
Home Interface: 
JdbcEJBHome.java
Remote Interface: 
JdbcEJB.java
Implementation: 
JdbcEJBEJB.java
Deployment Descriptor:
JdbcEJB_ejb-jar.xml   (ejb-jar.xml)
Client:
Simple Command Line App: 
JdbcEJBClient.java



JNDI

JNDIce:
UPDATED:  The current version is 1.3 (July 22, 2000), featuring a smoother GUI interface, more thorough  namespace exploration and administration, and support for 5 InitialContext properties: 

SECURITY_PRINCIPAL SECURITY_CREDENTIALS PROVIDER_URL
DNS_URL
SECURITY_PROTOCOL

This is a very useful freeware application I originally created in late April 2000.  This stand-alone version of JNDIce is a companion program to my RMI Administrator and is included in my bundled application suite known as the Java Explorer. It lists objects (both EJB and non-EJB) bound under any naming context factory, as well extensive information about those  objects.  If this application's classpath is set up to have access to your JNDI objects, JNDIce will provide you with information about each object's class, including extensive information about available methods to invoke, fields, constructors, and class attributes.  JNDIce will also tell you if the object is an EJB or not.  In addition, the application allows you to safely and instantly unbind any object from the naming context with the click of a button.  This application is completely freeware; however, it is NOT open  source.  In other words, the source code will not be made available to anyone other than myself.    By downloading the distribution, you are automatically bound to the license agreement as stated in the ReadMeJ.txt file inside the distribution package. The class to run is:  cylikon.JNDICE.Ice

View the Readme file for help and license information.

See a screenshot of the user interface.

Download the distribution - (49 KB).




JMS

This is a new section.  More will be added as time permits.


RMI (Remote Method Invocation)

RMI Administrator:
RMI Administrator is a very useful freeware application I created in late April 2000. This stand-alone version of JNDIce is a companion program to my JNDIce and is included in my bundled application suite known as the Java ExplorerIt is also a JavaBean.  The application allows you to select a list of ports to scan for RMI objects.  After scanning, RMI Admin will list all valid RMI ports as well as any bound objects found on those ports, in a convenient, easy to use, tree interface. RMI Admin also allows you to easily configure server stub codebases, which will then enable the application to provide you with extensive information about the object's class, such as avaiable methods for invocation, class attributes, constructors, and fields. 
In addition, the application allows you to safely and instantly unbind any object with the click of a button.  This application is completely freeware; however, it is NOT open  source.  In other words, the source code will not be made available to anyone other than myself.    By downloading the distribution, you are automatically bound to the license agreement as stated in the ReadMe.txt file inside the distribution package. The class to run is:  cylikon.RMIAdministrator.RMIAdmin

View the Readme file for help and license information.

See a screenshot of the user interface.

Download the distribution - (66 KB).

RMIMail using the JavaMail API :
This RMI apllication uses the JavaMail API for sending mail.  It is intended as a feedback mechanism for a website. The Remote Interface is fairly simple, using a String to return information to the user about the success or failure of the mail attempt.   All mail validation, message construction, and sending is done within the RMI server application.   This application is NOT free for use other than my own, and if downloaded  or copied for testing, it must be deleted within 24 hours.

Implementation:
RMIMailServer.java
Interface:
RMIMail.java
Client (GUI):
Screenshot (appearance the same as CorbaMail)
RMIMailClient.java
Stub & Skeleton (Generated by RMIC):
RMIMailServer_Stub.java
RMIMailServer_Skel.java

RMI/MySQL - With Cached RowSet:
This example is identical to the example below, except it uses the early access Cached RowSet extension available at Sun's JDC site.  Therefore, this implementation is much cleaner since it uses a serialized form of  a ResultSet rather than a Vector.  However, both examples get the job done efficiently. 
This example simply lists all of the sites in one of my MySQL databases. No RMIC stubs and skeletons provided below. 
This application is NOT free for use other than my own, and if downloaded  or copied for testing, it must be deleted within 24 hours. 

Implementation:
RMIMySQLIMPL2.java
Interface:
RMIMySQL2.java
Client (GUI):
MySQLGUI2.java

RMI/MySQL - Listing All Sites:
This is a fairly straight-forward RMI application whose job is to grab a complete list of all my sites from the MySQL database.  The implementation (RMIMySQLIMPL) handles querying the database. Since RMI will throw some sort of ResultSetNotSerializableException if one attempts to process ResultSets in the normal fashion through RMI,  this implementation stores the ResultSet in a big Vector which is sent back to the client.  The RMIResultSet() method returns the Vector to the client. The VectorCleanUp() method clears the Vector returned through RMIResultSet() of old database queries.  The interface (RMIMySQL) sets up two available methods for the client: RMIResultSet() and VectorCleanUp(). The client (RMIMySQLClient) is a GUI built using AWT, which simply prints the ResultSet into a TextArea.  In addition, to these three main .java files, I have also included the Stubs and Skeletons created by JDK's rmic.exe. 

Implementation:
RMIMySQLIMPL - .java file
Interface:
RMIMySQL - .java file
Client:
RMIMySQLClient - .java file
Stub and Skeleton Created By RMIC :
RMIMySQLIMPL_Skel 
RMIMySQLIMPL_Stub 


Java Servlets


Servlet for my Categories Entity EJB: YahooEntServlet.java

Graphics Factory (Servlet Graphics Package):
This is one of my best servlets, and definitely one of the most useful.  It contains 3 very useful utilities:  A sort of "image server" for creating graphics on the fly, a draw-mode utility used for creating and previewing images, and a font list utility for listing all fonts available on the server/computer.  You simply choose the font, font size, colors, and image sizes you want drawn to an image button and the servlet does the rest.  Once you have created the image you like, simply paste the <IMG SRC> tag created by the draw-mode utility into your HTML page. Visit the page, and the servlet will then be acting as an "image server", with all the utilities invisible to the visitor of the page.  This servlet REQUIRES the Acme GIFEncoder class libraries, freely available on the web somewhere.  Help/Usage information as well as Copyright information is available in the comments of the servlet.  Use of this servlet constitutes  your agreement with the copyright outlined inside the servlet.  Free for non-commercial use, provided no modifications whatsoever are made to the software.

Servlet: 
GraphicsFactory.java

EJBMail Servlet Client:
This servlet is one of 2 clients created for my EJBMail application

Servlet: 
EJBMailServlet.java

JavaMail Servlet:
Like the servlet above, this one also is used to send website feedback using the JavaMail API.  However, unlike the other servlet, this one does not use an EJB on the backend.  Instead, all mail validation, message contruction, and sending is done within the servlet:  This application is NOT free for use other than my own, and if downloaded  or copied for testing, it must be deleted within 24 hours.

Servlet: 
MailSenderServlet.java

Servlets/MySQL - Yahoo-style index:
I've been using MySQL to (among other things) create a Yahoo-style index of all my sites on the home page of my IIS server.  This is the servlet  for accessing the database, using the gweMySQLJDBC driver, and printing out the results: 
Accessing Yahoo-style index - .JAVA file

abbreviated dump file for the DB
Snapshot of Yahoo-style index:

Servlets/MySQL - Listing All Sites:
Similar to the Servlet above, but simply prints out ALL the sites in the database as links in one big list. This is the servlet for accessing the database, using the gweMySQLJDBC driver, and printing out the results: 
.JAVA file
abbreviated dump file for the DB


Java Server Pages (JSP)

 
JSP For My User Preferences Session EJB
CreateAccounts.jsp
Bean for JSP

JavaMail JSP with JavaScript:
This JSP script uses a bean to send mail with JavaMail API.   All mail validation, message contruction, and sending is done within the JSP's bean.  This JSP script uses JavaScript to gather additional information about the sender.  The JavaScript attempts to find out if the user has Java enabled in their browser, what kind of plugins the user has on their browser, and the referring URL.  This application is NOT free for use other than my own, and if downloaded  or copied for testing, it must be deleted within 24 hours.

JSP Script: 
mail.jsp
Bean:
MailSenderBean.java

JSP/MySQL - Search Engine:
A JSP verion of my PHP3 search engine.  As with my PHP3 search engine, this JSP script does two things.  First, it handles keyword searching of my MySQL database of urls.  Second, it gives the user the option of seeing other sites related to their search through a "Show Related" link.  The script uses two Beans: Search.java and ShowRelated.java.  The methods in both scripts act as "stored procedures" for querying the database, returning a RAW, unformatted result set back to the JSP script.  The JSP page then puts the ResultSet into plain links, a drop-down menu, or whatever presentation I choose.  This is a good way to keep the data seperate from the presentation.  This application is NOT free for use other than my own, and if downloaded  or copied for testing, it must be deleted within 24 hours. 

 JSP file
Search.java file
ShowRelated.java file
abbreviated dump file for the DB
Snapshot of Yahoo-style index:


JSP/MySQL - Yahoo-style index  - Using Beans:
This is a much cleaner method for creating a Yahoo-style index than the JSP script which does not use Beans.  The YahooBean3 bean contains a collection of similar methods which act as "stored procdeures" for grabbing related sites from my MySQL database.  The method then returns a RAW ResultSet to the JSP page, which is then processed within the page.  The Bean does the querying.  JSP handles the formatting of the ResultSets into usable HTML.  This is a good way to keep the data seperate from the presentation.  As of this writing, MySQL does not yet support stored procedures, so JSP/Beans provides a good way to create some "stored procedures." This application is NOT free for use other than my own, and if downloaded  or copied for testing, it must be deleted within 24 hours. 

 view JSP script
JSP file
view Bean source code
abbreviated dump file for the DB
Snapshot of Yahoo-style index:
JSP - Server-side Includes:
These are the server-side includes you will see referred to in the "<@  include file" tags of my Yahoo-style index (with beans).  Both the sidebar and the header use a bean called DataBasedContent.java, which provides nicely formatted dates and  timestamps.  In addition, this Bean provides dynamic content based on the time of day.  The time-based dynamic content includes  time-specific greetings such as "Good Morning" and special morning afternoon, and evening links placed on the sidebar.  The DateBasedContent bean also  sets the color scheme for the site based on the time of day: turquiose in the morning, purple in the afternoon, and blue at night.  As your can see, these server-side inlcudes  with beans provide the same functionality as my PHP3 server-side includes, but with the power and speed of Java.
DateBasedContent bean
Index JSP file
Header JSP file
Sidebar JSP file
JSP/MySQL - Yahoo-style index - Without Beans:
I've been using MySQL to (among other things) create a Yahoo-style index of all my sites on the home page of my IIS server.  This is the script for accessing the database using the gweMySQLJDBC driver and printing out the results.  All querying and processing of ResultSets is handled *within* the JSP page: 
Accessing Yahoo-style index - JSP file
abbreviated dump file for the DB
Snapshot of Yahoo-style index:
Bar Graph:  jsp file
(Allows the user to create bar graphs with their own numbers, titles, and names. They can even choose a color scheme.  To get an idea, check out the Javascript version.  Also scripted in ASP , Perl,
Python , and PHP3)


Regular Ol' Classes/Applets

Java/MySQL - Listing All Sites:
Simply prints out ALL the sites in the database in one big list.  This is NOT an applet.  It's just an ordinary class executed at the command line. This is the class for accessing the database, using the gweMySQLJDBC driver, and printing out the results: 
.JAVA file
abbreviated dump file for the DB


JavaBeans

RMI Administrator: RMI Administrator

MailerBean:
This non-GUI JavaBean *greatly* simplifies  sending mail with the JavaMail API classes.  It eases the creation of InternetAddress lists, makes adding attachments a snap, supports 4 different mime types (including text/plain and text/html), and gives the developer complete control over SMTP hosts, SMTP ports, Authentication, Error/Success messages, headers, and much more.  This bean requires JavaMail version 1.1.3 or above.  The distribution includes extensive JavaDocs, a sample client, examples, and help. This application is completely freeware; however, it is NOT open  source.  In other words, the source code will not be made available to anyone other than myself.    By downloading the distribution, you are automatically bound to the license agreement as stated in the MBeanReadMe.txt file inside the distribution package.

View the Readme file for help and license information.

Download the distribution - (66 KB).

View The Java Docs





JdbcBean: 
This is a very useful bean GUI  I created for querying any database which can be connected to through a JDBC-compliant driver. (The bean is NOT intended for and has not been tested with database connections using the JDBC-ODBC bridge.)  The bean uses Vectors for processing the ResultSet.  So any number of columns returned in a result set will be handled gracefullly.  Customizable properties of the bean include:  JDBC driver, database/database url, database password, database username, default SELECT query shown on start-up, and the interface's main colors.  The bean has been tested in BDK 1.0, NetBeans 2.1, and JForge and is available as freeware, provided the small credits on the GUI are left untouched and the component is not used for any sort of profit.  Quick tips on how to use the Bean as well as copyright information are included in the source code.  The main class is cylikon.jdbc.JdbcGUI .  However, you NEED to customize the bean before attempting to connect to a database.  Just drop the component in your favorite bean editor and look for the   icon. 

Download the Bean (JdbcBean.jar) - 9KB
View the source code for the main class
See a preview of the GUI interface
To see how I've used non-GUI Beans, check out the JSP portion of this page.


Java Swing & AWT GUI

NOTE:  GUIs are NOT my strength.  While I can hold my own with GUIs, Server-side and distributed computing are my real talents. 

Java Explorer: Java Explorer

RMI Administrator: RMI Administrator

JNDIce: JNDIce

Swing/AWT Valentine's Day  Using the Java Media Framework (JMF):
Although I am not too much of a GUI developer, I was very proud of this GUI.  It's one of two interactive  Valentine's Day cards I created for my parents (this is Dad's).  The GUI uses mostly Swing components based around a JTabbedPane.  The best part, of course, is the media.  A midi file begins playing when the card opens (There is an ON/OFF button for the music).  In addition, the card includes two short AVI files, which open in a new frame and begin playing when certain buttons are pressed.  To run these examples,you would need the javax.media library available from Sun.  The media files needed for this GUI (the midi, and AVIs) are NOT included on this site. This application is NOT free for use other than my own, and if downloaded  or copied for testing, it must be deleted within 24 hours. 

Screenshot of the Valentine's Day Card
.java Source

JavaMail GUI Interfaces (Swing):
Interface to the EJBMail application
EJBMailClient.java
see a snapshot

Interface to the CorbaMail application
Screenshot
Source (CorbaMailClient.java)

Corba Search Engine GUI (Swing/AWT):
Screenshot
Source (CorbaSearchGUIClient.java)

Swing/AWT GUI For Database Queries:
Here is a simple, but sleek looking GUI for querying my MySQL database.  The GUI uses a combination of Swing and AWT components.  This GUI is intended for a specific database, one of my MySQL databases tables with 5 columns.  It was created for a specific personal pupose, so it is not equiped to handle other numbers of columns. 

.java file
See a preview of the GUI interface


JavaMail API


MailerBean
EJBMail
CorbaMail
RMIMail
Servlet Mail
JSP Mail


My Freeware

 
Java Explorer v. 1.0:

Java Explorer is my biggest  freeware project yet, and consists of a bundle of very useful, mostly server-side utilities. 
While the application has many uses, it is particularly geared toward distributed computing, and includes my RMI Administrator and JNDIce tools.  Some other features include:

1. RMI Administrator
2. JNDIce, the EJB Assistant  version 1.0
3. JDBC Interactive
4. An RMI Port Creation Utility
5. An innovative file and archive (.jar & .zip) browser
6. Archive extraction utilities (.jar & .zip)
7. Component Viewer, a GUI viewer (not a JavaBean tool!)
8. A Port Scanner
9. Easy viewing of your Java VM properties
10. Easy viewing of your localhost properties
11. Email software (sending capabilities only)
12. A Java class inspector and browser
13. Convenient multimedia support (sound & video)
14. A simple text viewer/text editor
15. An image viewer
16. Easy viewing of files within archives WITHOUT 
    extracting them
17. Rooted, FTP-style directory browsing
18. Very memory-friendly
This application is completely freeware, but its is NOT open source.  Under no circumstances will soruce code be made available for this application.  System Requirements:  JDK 1.2 or above (1.3 strongly suggested), JavaMail API classes (version 1.1.3 or above a must - 1.1.2 and below will not due),  the Java Media Framework classes (JMF - any recent version), the Java Activaton classes (required by JavaMail), the Java Servlet classes (javax.servlet), and the JNDI naming classes (javax.naming).  At least 24 MB of RAM, 32 MB if you intend to use the application's multimedia capabilities. This application is completely freeware; however, it is NOT open  source.  In other words, the source code will not be made available to anyone other than myself.    By downloading the distribution, you are automatically bound to the license agreement as stated in the ReadMe.txt file inside the distribution package. The class to run is:  cylikon.explorer.EXPLORER

View the Readme file for help and license information.

See a screenshot of the user interface.

Download the distribution - (337 KB).

RMI Administrator: RMI Administrator

JNDIce: JNDIce

MailerBean:  MailerBean

GFS: Graphics Factory Servlet

JdbcBean: JdbcBean