I'm having big problems trying to deploy a client/server application. Here's the software I'm using:
- java 1.6
- Netbeans 5.5.1
- Sun Application Server 9.x (bundled with Netbeans)
- DB2 V9.x
The client application has a GUI-client, no webpages.
The server side has the ejb-beans, session beans, persistence layer, etc.
In order to keep compile and deploy time at a minimum, the sourcecode has been separated in smaller (Netbeans) projects:
- app-client (Main class that shows a JFrame)
- 2 other client projects with GUI-Dialogs that get called thru class loader
- base (remote interfaces and business classes that do lookups to facades (session beans) thru remote interfaces and calls to facade functions)
- ejb (server side, here are all the session beans, ejb-beans, local interfaces, persistence layer and db-schema)
- utility projects on the server side for math-logic and business logic
Here's what works:
- All the projects have been created thru Netbeans
- These projects can be deployed to a local Sun Application Server using Netbeans
- The app-client can be started and/or debugged and all calls to the remote interfaces work
- The server-facades are called thru remote interfaces, using lookup and initialcontext
Here's what doesnt work:
- The projects can be deployed to a remote Sun AS server, but when started, the app-client cant find the server facades
I'm trying to use Netbeans for development and debugging on a local Sun AS Server,
and at the same time I want to deploy an .ear file to a remote Sun AS Server and run the app-client with java web start.
I've added a .jnlp file to the .ear file.
I dont know which descriptor/deployment files i need, and which projects need them.
I'm getting name lookup errors when the app-client tries to access the facades.
From what I've seen its no wonder, because i havent told the app-client where to look for the server.
I've looked in different forums, and found plenty of articles. I've tried all solutions,
but they dont seem to work with my project configuration. I've tried all kinds of different "hello world" programs.
(The "sless" program works as is.) The hello programs work, but as soon as i try to expand them to more than two projects,
I get lookup errors. I've looked at the Sun Docs, read all about sun-ejb-jar (and cohorts).
Netbeans puts some of these .xml files into some of the projects. I've looked in these files, but I don't know if
they're needed or if some are still missing.
I'm at a total loss, and I don't know where to go from here. Is my project configuration so complicated?
My "base" project is THE PROJECT that all other projects have to link to.
The "base" project has the remote interface calls (hidden) in business classes. I want all client-apps to use these
business classes if they want to access server-data.
Considering my project configuration, which projects need which deployment files?
Which projects have to be application or ejb modules and which can be simple java projects?
Most important, is it possible to use this project configuration, or do I have to change something?