Hello,
I have a Java [v1.5] stand alone application that creates a Derby Database.
I implemented this application with Derby in the embedded mode. Works fine
so far!
I have a requirement to produce a series of reports given inputs from the
Derby Database. These reports shall be produced in two application modes as
follows:
Mode APP: From the Java stand alone application...
Mode WWW: From an Internet Browser...
Initially I intended to write the “Mode APP” Report Generator in Java
methods embedded within the Java stand alone application.
In “Mode WWW” the Derby Database shall reside on a Server and the HTML shall
access the Derby Database using JSP. The HTML shall enable my end user to
select a specific report, view the generated report and conditionally print
the report on-line.
To eliminate the need for 2 different report generators, ideally, I would
like to reuse the “Mode WWW” JSP in “Mode APP”, i.e. invoke my end user’s
default Internet Browser and process the reports via JSP acting-on the Derby
Database from the host computers HDD.
With the Derby Database presently being embedded, I believe that access to
the Derby HDD file from the Browser process will be denied.
Therefore, I will need to recode my application to setup three processes as
follows:
Process 1) The Java stand alone application...
. Load the Derby Network Server in a new process
[Process 2].
. Connect to the Derby Network Server...
. Create or Open the Derby Database file.
. Perform embedded services on the Database file.
. Conditionally spawn the default Internet Browser in a
new process [Process 3] and invoke the Report
Generator HTML.
Process 2) The Derby Network Server...
Process 3) The Report Generator HTML...
. Connect to the Derby Server...
. Perform user authorization via account / password
user interface...
. Query the end user for report selection...
. Use the selected report template to produce a JSP
request to adjust the dynamic tags in the report
template HTML...
NOTE 1:
The Java stand alone application shall be marketed for both the Windows and
the Mac OS X platforms...
NOTE 2:
The above assumptions suggest that the “Derby Network Server” can perform
JSP operations.
I doubt that is true.
I am thinking that I would need to have an Application Server [e.g. Tomcat]
included in the above scenario.
If an Application Server is required, can you please point me to a link to
help me understand what is required to implement this dual JSP usage from a
client computer?
WORKAROUND METHOD:
The re-use of the JSP in my host stand alone Java implementation may be more
work then I am capable of handling.
A workaround would be to write “Mode APP” unique HTML without JSP, i.e.
develop code to connect to the Derby Database file via the Derby Network
Server [Process 2] and emulate the JSP by making SQL queries and dynamically
changing the tags in the selected reports template HTML.
In this workaround I would hopefully reuse several Java methods from the
Java Servlets that service the JSP request in the “Mode WWW” processing.
HOUSEKEEPING:
I am concerned about the housekeeping required if I have to spawn the three
above processes [and perhaps a 4th for an Application Server].
I can close the processes properly when the Java stand alone application is
terminated by my end user. I assume that if the Java stand alone application
aborts unexpectedly, the additional processes will also be terminated by the
host Operation System.
Is that a safe assumption for both the Windows and Mac OS X platforms?
I am sorry for the wordiness of this inquiry.
I did not know how to better state my problem and my new Derby Database
design.
Please let me know where I have gone wrong and any better solutions to
implement my stated requirements.
-----
Regards,
Jim...
--
View this message in context:
http://old.nabble.com/Derby-Network-Server-usage--tp27117797p27117797.html
Sent from the Apache Derby Developers mailing list archive at Nabble.com.