I just started with JBoss by creating simple Swing app working with one session bean. Now I had a few difficulties with running it and understanding the idea of design in JBoss.
The first strange thing is that I am somewhat forced to define client in my EJB, more concretely I was forced to put inside my app's ear file the file jboss-client.xml which contains the client name which is put as j2ee.clientName property inside client.
Here come my questions:
1. Why it is needed for EJBs to know anything about client programs. Why it is not sufficient to just invoke JNDI service, find EJBs and use them without stating who I am (as a client program)?
2. How to build projects in such logic? I am forced to put client files inside server (i.e. EJBs project) ear. I have client and ejbs projects as a separate projects in my NetBeans IDE and it is strange and unhealthy to define connections between them. How do you organize your projects in IDEs? Should all components of application be in one project?
3. Can I define two different application clients with two different names in j2ee.clientName - invoking the same set of EJBs?
Not familiar with J2EE client container requirements but what you describe in point #1 will work.