9 Feb 16:42
JEE6 application client
Glenn Holmer <gholmer <at> weycogroup.com>
2010-02-09 15:42:04 GMT
2010-02-09 15:42:04 GMT
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 gholmer <at> weycogroup.com
Software Engineer phone: 414-908-1809
Weyco Group, Inc. fax: 414-908-1601
RSS Feed