Railcar control system
(legacy PauWare ver. 1.3)

Preamble

Railcar control system is a software case study, which is implemented in State Chart XML (SCXML) and PauWare. PauWare is a Java engine for executing Harel's Statecharts in general. This case study is inspired by the following paper: “Executable Object Modeling with Statecharts”. Railcar control system is a Java Enterprise Edition (Java EE) application i.e., state machines are embedded in Stateful Session Enterprise JavaBeans (EJBs).

Resources
Installation requirements (general)
User interface in Processing

R1 & R2 railcars are approaching the T4 terminal while R3 does the same in the reverse direction. The 100 and 80 milestones impose crossing coordination between approached terminals and concerned railcars.

  
Installation requirements (specific)

The Railcar control system database must be configured and accessible from a Java EE application server (GlassFish in NetBeans). The name of the data source must be set to jdbc/Railcar_control_system within the server.

Database SQL scripts

For example, how to proceed in NetBeans with GlassFish and Java DB?

  1. First create the database in NetBeans (Services tab.) as follows:
  2. Next connect to the database in order to execute the Railcar control system database SQL script:
  3. Next create in GlassFish a “JDBC connection pool” as follows (1st step):
  4. 2nd step (please, try pinging the pool to test its accessibility):
  5. Next create in GlassFish a “JDBC resource” as follows:

Java Message Service (JMS) resources

The server-side app. requires JMS resources on the GlassFish server.

  1. First create a JMS queue factory named jms/Control_center_queue_factory as follows:
  2. Next create a JMS queue named jms/Control_center_queue as follows:

Running the application with Railcar_control_system_simple_test

This client-side app. is an Enterprise Application Client, which performs a simple test (look at main program).

Running the application with Railcar_control_system_client

This client-side app. is a common Java SE application, which required enhanced adjustments in NetBeans.