Get started with Hibernate
I have avoided the book Hibernate in action so far. But, here is an aricle on getting started with Hibernate.
CVS in WSAD/Eclipse
CVS is one of the early code versioning systems. I am going to first run thru some resources [1] [2] on how to use this within wsad/eclipse.
CVS setings can be accessed in eclipse : Windows -> Preferences -> Team -> CVS
To enter the CVS perspective in eclipse: Windows -> Open Perspective -> Other -> CVS
To check out a project into eclipse using CVS from Apache , see this link
datasource in web.xml with JNDI
In the past I would establish a connection to a database like this:
Class.forName (Driver_string).newInstance ();
connection = DriverManager.getConnection (“jdbc:db2://localhost/qms”, user_name, “user_password”);
However, it is not a good idea to code such information in the application’s source code. They are all likely to change over time. Here on page 8 I learned you can use the web.xml to specify the datasource.
SVN on RedHat Linux
from command line: lynx http://summersoft.fay.ar.us/pub/subversion/latest/redhat-8.0/bin/
download all the apr rpm files, all the neon rpm files, and subversion-1.0.6-1.rh80.i386.rpm , and subversion-tools-1.0.6-1.rh80.i386.rpm
rpm -Uvh *.rpm
I am using JSVN as client.
Just download the jar , and to invoke : java -jar jsvn-0.8.jar
JDO at JUG
I made it to the JUG meeting on JDO/EJB3.0.
I was paying more attention to the JDO information. He mentioned that the object relational mapping (I guess from a design perspective) consists of two step process : mapping (easy part), then making it quick.
Also, he said that JDO works with J2EE, but does not require it. Another point was the JDO defers the datastore decisions. Meaning the spec does not call just for relational databases.
Last point was that 20-40% of JDBC persistence is spent on persistence infrastructure.
IBM Portal
Cogix Survey portlet for WebSphere 5.0.2
Service Locator with JNDI
Service Locator Pattern: an intelligent connection from a presentation tier to the various remote services. The service locator is the applications central point to directory services (i.e servlet that needs access to business data). Having a single centralized locator means there is a single piece of code to modify when the directory changes.
[article]
Free UML Tools
This link talks about some options from free UML tool ranks.
Feeds with GMAIL
This site talks about ATOM with GMAIL. Speaking of gmail, i have some more accounts to give out. Email me if you want one.
Stop Promising Miracles
Wideband Delphi : “No estimation method is perfect; if it were, it would be called prediction, not estimation. However, the Wideband Delphi technique incorporates some solid estimating principles. The team approach acknowledges the value of combining multiple expert perspectives.”
[one take]
Linux Wiki
LinuxQuestions.org Wiki: “share your knowledge”.
Struts and JSF
Struts and JSF: The rationale between the two application from Craig.
Hello World Portlet
From IBM:
WSAD Integration edition
First, this page has a link to the portal toolkit
Requirements: portlet-api.jar, wpsportlets.jar, wps.jar
Servlet functionality: j2ee.jar, dynacache.jar
javac -classpath %CLASSPATH% com.ibm.wps.samples.HelloWorld.java
import org.apache.jetspeed.portlet.*;
import java.io.*;
public class HelloWorld extends PortletAdapter {
public void init(PortletConfig portletConfig) throws UnavailableException
{
super.init( portletConfig );
}
public void doView( PortletRequest portletRequest, PortletResponse portletResponse )
throws PortletException, IOException
{
PrintWriter writer = portletResponse.getWriter();
writer.println(“
Hello Portal World!
“);
}
}
Struts in action forum
Click here to enter the forum
First Time Strutter
Just a link to a nice source of information. This one happens to be on Struts. But there seems to be quite an array of good information [link].
Then there is this Struts with WSAD example.
Sequence Diagram
Below is the link to a UML sequence diagram i composed using Magic Draw.
It contains the following components: Control, Entity, Boundry, and a User:
Linux 101
APT as in Advanced Package Tool
Webmin.com – a web-based interface for system administration for Unix
LWN.net– Linux news
Linux distrubutions can be found at distrowatch, example ubuntu
As well, you can find a distribtion archive at ibiblio Right hand side for links.
The Linux Documentation Project – TLDP
GNOME is a Unix and Linux desktop suite and development platform.
KDE is a powerful Free Software graphical desktop environment for Linux and Unix workstations.
Fedora (redhat)
Centos – CentOS-3 is designed for people who need an RHEL 3 compatible OS but who do not need strong support in order to achieve successful operation.
GNU – complete UNIX style operating system which is free software.
Subversion (SVN)
Subversion : Next-Generation Open Source Version Control [book]
tigris: A Subversion Eclipse Plugin
There is a windows explorer plugin called tortoise for SVN.
Steps to install:
1. Go to : http://tortoisesvn.tigris.org/download.html and download the version you need.
2. Install the application and reboot
Steps to use:
1. Pick any working directory. For example: C:\Workbench
2. Go to C:\Workbench in the Windows File Explorer
3. Right click in the whitespace in C:\Workbench
4. Select the “Checkout Option”
5. In the prompt enter: svn://url1/project1 (for only project1) or svn://url1/project2 (for only project2) or svn://url1 (for both projects)
6. Password and usernames follow. This allows us to track who added or changed files in the repository.
7. Be sure to check the box that says to save your credentials so you don’t have to re-enter them.
8. To begin working with the repository you can add files and directories using the right-click mouse menu.
9. Check out creates the “Working Directory”.
To Add files:
1. Checkout your desired repository to a working directory.
2. Go to the working directory and create the file or folder.
3.IMPORTANT: You should in the Working directory area to create files/folders.
4.When you have created your files and are ready to add them to the repository
a. Right-click on the file/folder and select “Add”.
b. The select commit.
c. TortiseSVN automatically submits any subfolders and files for you.
5. when everything has a green check mark, you know everything has been committed successfully.
6. when you add files in Windows you may want to hit F5 to refresh you folder view if it doesn’t update fast enough for you.
To Edit/Change Files:
1. Checkout your desired repository to a working directory
2. Modify the files.
3. Select the files are the containing directories and select “Commit”.
4. when all files/folder show the “Green Check Mark” you are done.
To get the latest changes:
1. Right click on the working directory you created and select Update.
ActionError(s)
The page I am working on uses struts which means a validate method as well. So, I thought I should get a better understand the ActionError and ActionErrors classes. Note that these two classes are in the org.apache.struts.action package. I found this article.
The ActionError contains two pieces of information. A key and a value. The key is a string , and the value is an array of replacement values (i.e. error messages).
The ActionErrors stores a collection of ActionError objects. You add objects using its add method which stores the object in an internal hashmap. You pass in a property name and the ActionError object. The property name is just a property name or ActionErrors.GLOBAL_ERROR
The article is old, so I did run into some deprecations.
Here is a jsp snippet:
ActionErrors e = (ActionErrors) request.getAttribute(org.apache.struts.Globals.ERROR_KEY);
if ( e!=null && !e.isEmpty()){
out.println(e.size() + “errors(s) found”);
Iterator detail = e.get();
while (detail.hasNext()){
org.apache.struts.action.ActionError ae = (org.apache.struts.action.ActionError) detail.next();
String s = ae.getKey();
String x = (String) (ae.getValues()) [0];
out.println(“-” + x + “br”);
}
}
from WSAD to RAD
Websphere 6: “IBM WebSphere Studio Site Developer and WebSphere Studio Application Developer will be re-branded as IBM Rational Web Developer for WebSphere Software and Rational Application Developer for WebSphere Software”.
[WASV6]
JavaBeans
Beans
– each property is a variable name that begins with lower case variable
– Each accessor method (getter/setter) starts with the word set, get, or is.
– in using a bean, it has attributes:
id : variable name in the page
name : Java class /name of bean
property : property name from bean , i.e getName
scope : variable name in the page
More on SDO
SDO: The BEA and IBM collaboration. Once called WDO, now its SDO. Data Graphs. The Server Side has an entry on it.