NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

JEE6 application client

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
Glenn Holmer
Posted via mailing list.





PostPosted: Tue Feb 09, 2010 3:41 pm    Post subject: JEE6 application client Reply with quote

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

PostPosted: Sun Feb 20, 2011 6:46 am    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo