Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Build a dynamic Derby application

Tyler Anderson graduated with a degree in computer science from Brigham Young University in 2004 and is currently in his final semester as a master-of-science student in computer engineering. In the past, he worked as a database programmer for DPMG.COM, and he's currently an engineer for Stexar Corp. based in Beaverton, Oregon.
Christopher Judd (cjudd@juddsolutions.com), President, Judd Solutions, LLC
Christopher Judd is the President and Primary Consultant for Judd Solutions, LLC, international speaker, open source evangelist, Central Ohio Java Users Group coordinator, and coauthor of Enterprise Java Development on a Budget and Pro Eclipse JST. He has spent eight years developing software in the insurance, retail, government, manufacturing, service, and transportation industries. His current focus is consulting, mentoring, and training with Java, Java 2 Platform, Enterprise Edition (J2EE), Java 2 Platform, Micro Edition (J2ME), Web services, and related technologies.

Summary:  This tutorial shows you how to build a dynamic Java™ analysis application that connects to Apache Derby. Explore the dynamic way the database stores new application logic, changing the logic of the database without touching the core client program. And learn about Java archive (JAR) signing and how to provide security for the application that uses hot-swappable .jar files.

Date:  04 Oct 2005
Level:  Intermediate PDF:  A4 and Letter (143 KB | 27 pages)Get Adobe® Reader®

Activity:  4449 views
Comments:  

Before you start

If you're a developer interested in creating a Java analysis application that uses Derby to modify functions without modifying the core application code, this tutorial is for you. It's also for those interested in securing the Derby database in a signed .jar file.

About this tutorial

In this tutorial, you'll build a dynamic Derby application and learn more about the dynamic abilities of the Java language through a Java analysis program that determines insurability of automobile drivers. The key concepts of this tutorial are creating dynamic functions in Derby and then calling these functions in your Java application.

As soon as you're able to store application logic (using functions) in your database, you'll discover how to modify the application logic, or the functions that your application uses, by modifying the .jar file. Modifying the functions allows your program to produce different results, without you having to modify the core application code. The ability to do this is a huge advantage for code maintenance.

Because this process requires working with a database in a .jar file, security is crucial. Toward the end of this tutorial, you'll create a signed .jar file and verify that it's genuine and hasn't been tampered with, assuring your content is safe.

The following topics are covered in this tutorial:

  • Application overview, Derby refresher, and setup
  • Analysis application
  • Storing logic in Derby
  • Changing the application logic
  • Looking out for tampering

Prerequisites

This tutorial assumes you're familiar with basic programming and Java concepts, including classes, methods, and variables. Knowledge of Java GUI programming is helpful, but not required. For more information, see the Resources section at the end of this tutorial.


System requirements

To follow along with this tutorial, you'll need the following tools (see the Resources section for links to these downloads):

  • Database. Obviously, you need Derby. Download Derby from Apache and the IBM DB2® JDBC Universal Driver, making sure you've set your class path appropriately by following the installation instructions.
  • Java technology. Derby requires the use of Java code. Working on a Linux® box running Red Hat Fedora Core, the gcj compiler provided in the distribution was insufficient. Download the Java 2 Platform, Standard Edition (J2SE) Development Kit.
  • GUI front end. The GUI front end isn't required. It is, however, a recommended download for your experience throughout this tutorial. Download the GUI and other miscellaneous application code.

1 of 10 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Open source, Information Management
ArticleID=133097
TutorialTitle=Build a dynamic Derby application
publish-date=10042005
author1-email=tyleranderson5@yahoo.com
author1-email-cc=troy@backstopmedia.com
author2-email=cjudd@juddsolutions.com
author2-email-cc=troy@backstopmedia.com

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.