I have the same problem, I know that with weblogic you get a tool for generating the client JAR, does anyone know of a tool to do the same thing for jboss?
Following up on this:
Using JBoss-IDE you can generate a simple client jar containing the required/EJB interfaces but this jar does not contain any stub/skeleton classes.
It seems that even with this jar available you still need to setup security in order to obtain an initialcontext. You can do this using a policy file but .. geeze!
Well, heres some more questions:
- Is EJB the wrong choice for application's that require BOTH client and web capabilities? JBoss specific or not.
- If yes, then what IS the best technique?
- Am I missing the point completely? It's highly likely ..
but this jar does not contain any stub/skeleton - They are not required.
Put jbossall-client.jar on the classpath of the client and the jar file that contains the home and remote interfaces of the beans that the client needs to access.
It seems that even with this jar available you still need to setup security in order to obtain an initialcontext - I have never had to set up anything to do with security to get a client to use a bean remotely, what exactly are you doing?
but .. geeze! - How did you find the getting started guide to follow through?
I am not sure what you mean by your last question, sorry, but as far as getting started guides go the JBoss-IDE is a pretty good one.
I managed to solve the problem. I still am not 100% sure why I was getting the security issues but I am guessing it was a classpath issue (my bad).
I am sorry if this was all a pretty straightforward issue but I have not really found any substantial documentation on the issue of client-EJB communication where the client and EJB are in separate "projects".
So to recap, the solution is:
- generate client jar (containing interfaces only) - jboss-ide is great for this
- generate and deploy the ejb to jboss
- add jbossall-client.jar and [app]client.jar to your client's classpath
It seems so idiodically simple now, but I was tearing my hair out earlier this week over it.
JBoss 4.0 embedded Tomcat and Tomcat 4 and 5.
So, If I understand this correctly, I need to generate the client.jar and use the jbossall-client.jar with my client and I'm OK. And my client should be running with JBoss. (I used to run Tomcat with a connector. Now, I assume I can just use JBoss with embedded Tomcat on my client tier. ?)
So, I generate myclient.jar with the JBoss-IDE. How do I do that with the IntelliJ IDE? I'm assuming I'd need the JBoss plugin. How is that coming?
Could someone point me to good documentation for the JBoss-IDE? I've seen some stuff but specifically generating client jars would be nice.
So, am I correct in thinking that if I use IntelliJ, I stilll need the JBoss-IDE, to generate the client interfaces? Is there a command line? Could someone point me to the appropriate WIKI or Forum answer?