These instructions provide steps for setting up and running the Java Smart Ticket demo on WebLogic Server.
- Download the Smart Ticket demo application source code at Sun's Website:
http://developer.java.sun.com/developer/releases/smarticket/. Extract it into a new directory on your machine; from now
on we will call this directory SMARTICKET_HOME.
- Download the Sun Wireless toolkit at:
Install the toolkit; during installation you will be prompted to point to a JDK, you can select the JDK included in your
Download the smarticket-patch.zip from BEA.
This patch provides the WebLogic descriptors that allow you to run the Smart Ticket Demo on WebLogic Server.
Extract this zip file in the directory
- Set up your development environment. Running the
setExamplesEnv script in
WL_HOME/samples/server/config/examples will do this for you. WL_HOME is the home location of your
WebLogic installation, by default, WL_HOME is c:/bea/weblogic700.
Set your environment to also include the
J2MEWTK_HOME variable which specifies the home of your
Wireless Toolkit. Point to the root directory of where you installed the toolkit.
For example, type:
In your development shell run the ant build script that has been provided for you in
SMARTICKET_HOME/smarticket directory. In this directory run the build script by typing:
WebLogic Server comes with a demonstration PointBase database. To upload the necessary data to this database,
you must first have PointBase
running. Boot up your Examples server and PointBase will begin automatically. Check the
SMARTICKET_HOME/smarticket/populate.bat script to make sure it is pointing to the correct
POINTBASEHOME; this should be set to your
WL_HOME/samples/server/eval/pointbase directory. Then run the
SMARTICKET_HOME/smarticket/populate.bat script by typing the following in your development shell
- Now you must configure your Data Sources for each of the four EJBs the Smart Ticket application uses. Start your
WebLogic Examples Server and once it is running, open the Administration Console by pointing a browser to
Under the JDBC heading in the main home page of the Administration Console, click on 'Tx Data Sources' and go to the
'Configure a new JDBC Tx Data Source' tab.
Enter a name for the data source, the first one is:
MovieInfoData. Then enter
in the JNDI field. Enter
demoPool as your Pool Name; this
is the default connection pool the WebLogic examples use. Click on 'Create.' Click on the Targets Tab.
examplesServer in the 'Available' column and
click on the right arrow to target it. Click 'Apply.'
Repeat the above step for the other three datasources this application requires. The names of the remaining three sources are:
LocaleInfoData. Their corresponding JNDI names are:
LocaleInfoDataSource. Each uses the
demoPool as the Pool Name.
Now you must install the Smart Ticket application on WebLogic Server. Click on the picture of the house at the top of the
Administration Console page to return to the Console Home. Under the 'Your deployed resources' heading, click on 'Applications.'
Then click on the 'Configure a new application' link. Browse to your
smarticket/bin directory and
examplesServer and click on the right arrow to target the application to the
'Create.' Wait a moment until the components of the application have deployed.
A configuration tab will appear for your newly installed application. Click 'Apply' once more.
- You must edit the Smart Ticket client to point to the proper host name and port on which your WebLogic Server is running. With an editor
smarticket.jad file located in the
SMARTICKET_HOME/smarticket/bin directory and change the following
three lines to point to the correct location of your server:
- Open the
smarticket.jad file in the
- Sign In! For further instructions on running the SmartTicket demo, refer to the documentation provide in the
When creating a user account for the SmartTicket Application, enter in 95130 or 95054 for your zip code; also, your password must be 6 characters long.
Try selecting the 'Poster' mode when you create an account, this will enable your phone or emulator to view a picture of the
movie you choose to see.
There are several options available for using the emulator. go into your J2ME Wireless Ticket and manipulate the default device and
If you have run the client Smart Ticket Application before and are redploying the application on WebLogic, you will have to clear the
database of the previous users information. To do so, run the J2ME Wireless Ticket Utility which is available from the Windows start menu.
Click on 'Clean Database'. Then restart the Smart Ticket Client.