grafthez
grafthez

Reputation: 4091

access @Remote EJB deployed in WAR on JBoss 7.1.1 from standalone client

I'm a bit lost. I've been googling around for quite long time. Is it possible to access EJB with @Remote that is packaged into WAR file from standalone java client? I'm using JBoss 7.1.1 and every combination of JNDI names I try I keep getting NameNotFoundException.

I can't find anything about that in doc. It is only said that in the Java EE web profile @Remote is not supported, but I suppose that if I'm running it on JBoss 7.1.1 it is run on the full profile not on the web one (just because it is packaged in WAR).

Upvotes: 0

Views: 1195

Answers (2)

Gustavo Mazzoni
Gustavo Mazzoni

Reputation: 26

You need to generate an EAR file.. that means you have a Java EE application not only web. Then you'll be able to locate and call your remote EJB from a java client.

Upvotes: 0

mazi
mazi

Reputation: 501

Try this doc. If this is too long for you, you can check out my example code at github

Important things to note:

  1. See your jboss/bin/client/README.txt for how to easily include the relevant libraries
  2. Use the ejb:/... name for lookup; the java:... names you see in log at deploy are note remotely exposed
  3. The two *.properties files: in some cases (when some libraries are missing etc.) you might think you need to add something into them, but they're fine; make sure you set up everything else correctly.

Upvotes: 2

Related Questions