I sent a message today regarding how 2 deploy a Swing application without hardcoding EJB references, i.e using a deployment descriptor file. Surely someone has done this ???
Hi Every1 I hope some1 can please provide an answer to my question below. I am a serverside developer and accustomed to deploying my components through the use of either a WAR DD file (for web based apps) or a JAR file (for EJBs) or sometimes an EAR (container for everything).
I have recently moved over to SWINg development and I can easily create a SWINg application that invokes an EJB. This all works correctly.
What I would like to know :-
1) Is there any concept of client side DD files for Swing development ? i.e calling EJB's from swing ?
2) Does client side development with SWING support the EJB lookup naming standard of : java:/comp/env/ejb/EJBName ?
3) I cannot believe that there are NO DD files within swing development to invoke an EJB. Does this mean you have to hardcode the JNDI reference ??
4) I have read somewhere that you need to create an application-client.xml DD file and also run your swing based application using the runclient.bat start file ? I have tried this and cannot get this to work.
Please can some1 take the time to put me in the right direction regarding the questions above.
I would really like to know that there is a concept of using DD within swing and if there are any CLEAR simple examples that walks someone through from scratch the deployment and execution process of invoking a simple 'Hello World Bean' from within swing - that would be gr8.
I have not done this either. But did you try googling for the specific appserver you are using. May be you should try that until someone here offers you further directions.
Joined: Jan 30, 2004
It has nothing to do with *any* specific APP server. Its suppose to be just the rules for having a clientside application communicate with an EJB and what the best practices are for packaging up and deploying such an application. In this instance, the client side application is JFC/SWING based.
I deleted your first thread with your initial question as this one has generated some traffic.
In the future, please don't post the same question more than once. We are all just trying to help around here and 4 hours really isn't a long wait for an answer. Also note that maybe no one knows the answer. That is entirely possible. We don't know everything and posting your question again won't help that.
Patience is a virture. And around here patience goes a long way in getting the help you need.
Actually, no. That statement is not quite correct. From what I have read, the application-client.xml file is the CLIENT-SIDE DD file. This is the format of my client side XML file that I use :
It would appear that JNDI references for CLIENT-SIDE applications cannot use the notation java:/comp/env/ejb/ETC. Can some1 confirm this also ?
The deployment descriptor is used only on server side deployments. The JNDI names to be used are those from the server side DD (as you said: java:/comp/env/ejb/EJBName).
-- ./pope [the_mindstorm] --------------------
Joined: Jul 12, 2004
By rechecking the application-client DTD it seems you are right. However, afaik you can use the long jndi format (ejb/EjbName, as I can read in the doc: The ejb-ref-name element contains the name of an EJB reference. The EJB reference is an entry in the application client's environment and is relative to the java:comp/env context. The name must be unique within the application client). I have seen applications working not using this facility on client side, so I assume it wrongly.
-- ./pope [the_mindstorm] [ January 21, 2005: Message edited by: Ali Pope ]