NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
Glenn Holmer Posted via mailing list.
|
Posted: Tue Feb 09, 2010 3:41 pm Post subject: JEE6 application client |
|
|
I'm trying to learn how to write an "Enterprise Application Client" for
our new Java EE 6 app. We have the prototype web app up and running,
but I'm having trouble with the client.
The enterprise (blue triangle) project has an EJB subproject and a WAR
subproject; I created an Enterprise Application Client project and added
it to the enterprise project. The client project lists the EJB
subproject in its library list.
I added a remote interface to one of our EJBs and verified that the app
still builds and the web app runs; now I want to add code in the client
to call it:
CategoryBeanRemote categoryBean = null;
ctxName = "java:global/phoenix-jee6/phoenix-jee6-ejb/CategoryBean"
+ "!com.weycogroup.phoenix.business.iface.CategoryBeanRemote";
categoryBean = (CategoryBeanRemote)ctx.lookup(ctxName);
The problem is that I can't get NetBeans to recognize the name
CategoryBeanRemote, which is the remote interface to CategoryBean (i.e.
alt-shift-I gives no suggestions, and typing the package name in
manually gives an error). If I declare it as CategoryBean instead of
CategoryBeanRemote, he still won't recognize the method name that
implements the remote interface ("cannot find symbol").
In CategoryBeanRemote:
public String myGroovyMethod();
In CategoryBean:
@Override
public String myGroovyMethod() { // for testing remote interface
return "Shadow codez good";
}
In the app client:
s = categoryBean.myGroovyMethod();
Am I missing something here?
--
____________________________________________________________
Glenn Holmer address-removed
Software Engineer phone: 414-908-1809
Weyco Group, Inc. fax: 414-908-1601 |
|
| Back to top |
|
 |
pablopina
Joined: 31 Jul 2010 Posts: 4 Location: Perth, Australia
|
Posted: Sun Feb 20, 2011 6:46 am Post subject: |
|
|
Hi,
I think you forgot to include the ejb module as a library to the application client module.
IF you do this, then you will be able to run it from netbeans but it may fail to run when deploying it through the web console (assume you are using GF)
The way forward is to create a new Java class library project called ejb_module_name-client and cut and paste all remote interfaces on to it.
Then, add this class library project as a dependency (library) to your app client module,
If you can't get it running drop me an email and i'll may be able to give you a hand...
Pablo. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|