Quick thoughts on things
|
Switching between classes in eclipse |
|
|
|
|
Written by Chintan Rajyaguru
|
|
Saturday, 09 September 2006 |
|
Most
application that allows multiple windows allow you to switch between them using
ctrl+tab key. Not eclipse. It uses ctrl+F6 and so does RAD etc. But this can be
changed. To change the key that switches between classes (small windows within
eclipse),
- go to Window
> Preferences > expand Workbench > select Keys
- In the Category
dropdown, select Window
- In the Name
dropdown, select Next Editor
- Put the cursor
in the Name field in the Key Sequence section and press ctrl+tab. Do not
type ctrl+tab, press those keys
- Click Add, the
key assignment is added to Assignments section
- Optionally,
remove the ctrl+F6 assignment by selecting it and clicking Remove button
- Click Apply and
then OK buttons to close the dialog box
If
you are using eclipse 3.1.2 OR WebSphere Application Server toolkit v6.1, the
procedure is similar but the buttons are little different:
- go to Window
> Preferences > expand General > select Keys
- In the Category
dropdown, select Window
- In the Name
dropdown, select Next Editor
- Put the cursor
in the Name field in the Key Sequence section and press ctrl+tab. Do not
type ctrl+tab, press those keys
- Click Add, the
key assignment is added to Assignments section
- Optionally,
remove the ctrl+F6 assignment by selecting it and clicking Remove button
- Click Apply and
then OK buttons to close the dialog box
| | |
|
Last Updated ( Saturday, 09 September 2006 )
|
|
|
Moving WAS 5.x projects to WAS 6.0 in RAD |
|
|
|
|
Written by Chintan Rajyaguru
|
|
Tuesday, 05 September 2006 |
|
There
are all kinds of considerations when migrating an application from WAS 5.x to
6.x. But I want to talk about moving projects from WAS 5.x to WAS 6.x within
Rational Application Developer. This change could come in two flavors:
- Moving from
WSAD to RAD
- Moving from
RAD using WAS 5.1 to WAS 6.0
Before
we talk about specific steps to follow, it must be noted that every J2EE
project in WSAD or RAD uses at least 2 variables. Both of these variables are
predefined in the IDE and point to specific set of jar files:
- JRE System
Library variable, which can be configured to point to any valid JRE. While
you have the option to use the eclipse JRE that comes with the IDE, I
recommend against it. The JRE System Library variable should point to
WebSphere JRE because the code is ultimately going to run in WAS runtime
environment.
- WebSphere v5.1
runtime, which is added by WSAD or RAD when the project was created for
WAS 5.x server. This variable includes all the J2EE and WebSphere
libraries needed to build the project
In
any case you can follow these steps to move the project:
- If the project
doesn't exist in RAD already, import it using File > Import >
Existing Project into Workspace, select the directory that contains the
.project file and click Finish
- Upon
successful import, one or more of the following could happen:
- If you are
using RAD and if you have installed WAS 5.x test environment, you should
not get any errors. To use WAS 6.x runtime in this case,
- Right click
the project, select Properties > Java Build Path > Libraries tab
- Select JRE
System Library variable and click Edit button
- Click
Alternate JRE radio button, select WebSphere v6 JRE from the dropdown
and click Finish
- Go to the
Server section in the Properties dialog box and select WebSphere
Application Server v6.0 in the Target runtime dropdown
- Click OK to
close the Properties dialog box, the project should rebuild itself
- If you
haven't installed WAS 5.x test environment, you will get errors upon
importing a project that has WAS 5.x entries in its classpath. In that
case,
- Right click
the project, select Properties > Java Build Path > Libraries tab
- If the JRE
System Library variable has an error, remove it
- Click Add
Library button, select JRE System Library click Next
- Click
Alternate JRE radio button, select WebSphere v6 JRE from the dropdown
and click Finish
- Remove the
WebSphere v5.1 runtime entry
- Go to the
Server section in the Properties dialog box and select WebSphere
Application Server v6.0 in the Target runtime dropdown
- Click OK to
close the Properties dialog box, the project should rebuild itself
If
any of your projects had generated EJB code, you will get a number of
compilation errors that won't make much sense, just delete all the generated
code and do a clean build. If you will start using JDK 1.4 with this move and
have assert statements in your code, there are some other considerations but I
will write about that later.
| | |
|
|
Written by Chintan Rajyaguru
|
|
Monday, 04 September 2006 |
|
On Thursday November 17, 2005, I wrote a blog entry about going solo. Today, I am writing this entry to announce that I have actually gone solo. In a search engine friendly language, "I have become an independent consultant providing problem definition, analysis, architecture, design, development and knowledge services in the Information Technology area." The first draft of this entry contained details about my prior consulting experience, my wide experience in solving IT problems in pretty much all the industries and my specialty in SOA/web services and J2EE/WebSphere. But all that self promotion was overshadowing this enthusiastic "going solo" announcement; so, I am going to save those things for the future. The new life Am I doing something totally different than what I was doing before? No. Life doesn't change much as an independent consultant - especially when I have pretty much always worked for consulting companies! I still go to the client location every day, I still work on IT projects, I still move from one project to another, I still work with clients and go through the daily dynamics of the client-consultant relationship and above all, I still have family, mortgage and car. A number of things have changed however. I can now do consulting within the framework of my core values and beliefs. I can truly shape my career by focusing on areas of my interest and by choosing my projects. I don't have to worry about my utilization and that next promotion. I get paid for all the hours I work and I am accountable for all the hours I don't work. The details I have formed a Limited Liability Company named Taraba Consulting LLC. As part of this company, I will help clients identify, analyze and solve IT problems. For now, I will only accept contract positions in Chicago land area. These days I am working for a healthcare client in downtown Chicago re-architecting and redesigning a web services based messaging application. The influences While working at two of the big five consulting companies, I had always wanted to cut the crap and focus on the consulting aspects I really loved. Working for a corporation for a very short period of time made me realize that I had to be a consultant or a teacher (ideally both) to keep my sanity. My wife helped me see my potential and encouraged me to work hard to realize that potential. And finally, two of my team members on a project at my last employer provided me with the environment that helped me make this happen sooner than later. I have much more to share on this topic. In fact, starting today, visitors will see a new category named 'Consulting' in my blog but more on that later. | | |
|
Last Updated ( Tuesday, 23 January 2007 )
|
|
|
WebSphere v6.1: initial impression |
|
|
|
|
Written by Chintan Rajyaguru
|
|
Sunday, 03 September 2006 |
|
WebSphere
v6.1 is out
for a while now. I recently got an opportunity to use it in the development
environment and wanted to list my quick thoughts here:
- First off,
there is no production release of Rational Application Developer (RAD) for
WebSphere v6.1 yet. WAS 6.1 ships with a so called Application Server
Toolkit (AST). In my personal opinion, toolkit is a misleading word as it
makes customers think it's some sort of beta tool and not suitable for
serious development. This perceived lack of development tools may even
cause a delay in WAS 6.1 adoption. While I believe IBM should have
released RAD 6.1 with WAS 6.1 (more on this in some other post), I also
believe the toolkit has all the coding features an average development
project needs. Some RAD features e.g. UML modeling are missing. If you are
still not clear what AST offers, think of AST as WSAD for WAS 6.1
- Second, you
cannot install the toolkit with WAS 6.1 test environment. You must install
WAS 6.1 and toolkit separately and then point the toolkit to WAS 6.1
installation directory to use the server. I am not sure whether this is
how RAD 7.0 (which is supposed to be the IDE for WAS 6.1) will work or RAD
7.0 will continue to have WAS install within its runtimes directory.
Personally, I like the ability to use separate installation of WAS. This
gives the flexibility to run the server outside the IDE and deploy and run
applications on it.
- Third, the
toolkit appears to support export and import of server profiles. Thank you
IBM! In WSAD, an experienced developer could configure all the server
parameters and distribute the server profile to the rest of the team. In
RAD, this feature disappeared forcing every developer to go through the
painful steps of configuring the server. But, looks like now this feature
is back. At least it's back in the toolkit. I haven't personally used it
yet (may be I will use it next week)
- Forth, Since I
am using a separate server installation, I have to rely on the log files
created within the server. In other words, not everything is printed on
the old friend console within the IDE. This may not be true for RAD 7.0
but it's true for the toolkit. Also, if you are using WAS 5.x, the log
files are at
<app_server_home>/logs/<server_name>/<log_file_name>.log
but WAS 6.x uses the concept of cell, node and profile. The new location
for the log files is, <app_server_home>/profiles/<profile_name>/logs/<server_name>/<log_file_name>.log
Listed
above are all the WAS 6.1/toolkit features related observations. Here are some
miscellaneous observations. It's possible that some of these were implemented
in WAS 6.0; consequently, the list below is more useful to some one migrating
from WAS 5.x:
- By default WAS
6.1 installs as a windows service. I wish I could choose against it
- Security on WAS
installation is turned on by default
- Default urls
have changed as follows:
- Admin console
is available on http://<hostname>:9061/ibm/console
- Applications
are deployed on http://<hostname>:9081/<web_app>
- Universal Test
Client is available on http://<hostname>:9081/UTC
- Server startup
takes longer. It appears that the server initializes some out of the box
applications. I have yet to dig into this
| | |
|
Last Updated ( Sunday, 03 September 2006 )
|
|
|
The Contact Me section of my website works now! |
|
|
|
|
Written by Chintan Rajyaguru
|
|
Sunday, 03 September 2006 |
|
In
a nutshell, you can now go to the Contact Me section of my website and send me
a message. This section silently didn't work until today.
If
you use Joomla and have had the same problem, read on. I had configured the
global configuration file by adding email parameters in the Mail tab but this
is not enough to receive emails from the website. I had to go to Component >
Contacts > Manage Contacts and edit the only available contact. Joomla keeps
a default contact with name = Name, email =
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
and so on.
Obviously, these are all dummy values. The Contact Me section is configured to
display contact information of this contact and send emails to this user. I
changed this user to contain my information and that's it!
| | |
|
|
Oraclexe: getting started |
|
|
|
|
Written by Chintan Rajyaguru
|
|
Tuesday, 15 August 2006 |
|
As part of our JavaEE development
efforts, we need a database to persist our data.
Before we move on, let's do a
quick recapture of what we have done so far:
- We decided to do some Java EE development
- We downloaded, installed and configured GlassFish
application server , which is an open source (beta) reference
implementation of the Java EE specifications
- We downloaded and installed NetBeans
- We configured NetBeans to use GlassFish application
server; we will use this setup to write code in NetBeans and deploy it on
GlassFish
- This blog entry talks about how to install the
database (will be used to persist data as part of developing JPA code)
In my first blog about Java EE
development, I had mentioned that I was going to use Oracle XE for that. The
installation and configuration of Oracle XE is really easy on windows platform.
You simply download Oracle XE from http://www.oracle.com/technology/products/database/xe/index.html,
double click the exe, follow the prompts and you are done.
Oracle XE gives a nice browser
based GUI tool to manage the database. This was easy, let's quickly create the
user (schema) we will be using for Java EE development. Note the following
about this db user:
- This user is the application user that will be used
to configure data source in GlassFish server for our application to
interact with the database
- This user will have connect and resource privileges
on the database. Read more about privileges at http://www.oracle.com/pls/xe102/homepage
- Connect privilege allows the user to connect to the
database. Usually, applications users are given this privilege BUT we
want our application user to be able to create tables (as part of JPA
annotated Entity classes)
- Resource privilege allows the user to create certain
type of schema objects in his own schema (e.g. create tables, views
etc.). The specific types of objects this user is allowed to create can
be selected using the 'Direct Grant System Privileges' list. As shown in
the screen shot below, we have selected all the options in the list
- DBA privilege enables the user to perform administrative
functions. We will not give javaee user this privilege
To create the application user, go
to Home > Administration > Manage Database Users, Click Create, Fill in the data as
shown below (I am using username=javaee and password=javaee):
This step created the database schema.
In Oracle, the terms user and schema are used interchangeably but I will not
get into those details here. The javaee schema we just created will eventually
hold all the tables, views and other database objects.
Just to make sure everything went
well, we will now connect to the database and run a sql from command line:
- Open a command prompt by selecting Run SQL Command
Line from the Oracle start menu entry
- Login as the user using connect javaee/javaee
command. You should see a "connected" message
- Save the following sql as address.sql
|
drop table ADDRESS;
create table ADDRESS (
"ADDRESS_ID" NUMBER NOT NULL,
"ADDRESS1" VARCHAR2(100) NOT NULL,
"ADDRESS2" VARCHAR2(100),
"CITY" VARCHAR2(50) NOT NULL,
"STATE_CODE" VARCHAR2(2) NOT NULL,
"ZIP" NUMBER NOT NULL
);
alter table ADDRESS add constraint pk_address primary key
(ADDRESS_ID);
|
- Run the address.sql file using SQL>@"<full_path_to_file>."
Note the following about running the sql:
- @ sign runs the sql in the file
- Double quotes are required if your path contains
spaces
- You will get an error "table or view does not
exist." This is because the first line of the script drops the table
but the table doesn't exist yet. Any subsequent runs of this file won't
display the error message
- Run desc ADDRESS. This will describe the table
ADDRESS
In the next installment we will
create an Address entity from the ADDRESS table. JPA also allows you to create
entity classes first and use them to create database table. We will use this
feature for some of the other entity classes.
| | |
|
Last Updated ( Tuesday, 15 August 2006 )
|
|
| | << Start < Prev 1 2 3 4 5 6 7 8 Next > End >>
| | Results 41 - 50 of 71 |
|
|
|
BlogSidebar |
Sep October 2008 Nov
| S | M | T | W | T | F | S |
| | 1 | 2 | 3 | 4 |
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 | |
categoriesLatest in BlogSVTechie Resources |
|
|