-
FEATURED COMPONENTS
First time here? Check out the FAQ!
How can I access and EJB in a VM. I am trying to use pure Java EE 6 as backend as I found spring hard to understand compare to Java EE 6. My setup is as follows:
Eclipse Enterprise Application Project with modules { EJB Module and ZK Web Module}. I've created Users Entiy and UsersEJB to fetch all users and return a list. I am not getting any ejb exceptions but when I tried to get usersList in zul page I am getting NullPointerException.
Any help or documentation how to use EJB as backend for ViewModels.
Thanks.
It is just like you use EJB in any servlet. ViewModel are running in servlet-thread. if you are using spring to help you access EJB, please read http://books.zkoss.org/wiki/ZK%20Developer's%20Reference/Integration/Middleware%20Layer/Spring
Asked: 2013-03-06 12:59:56 +0800
Seen: 30 times
Last updated: Mar 11 '13
I don't use EJBs any more, but ZK will work just fine with them. Look up some tutorials on using an EJB in a servlet and make sure your project has a simple HelloWorld servlet and see if accessing your EJB in there works. Sounds like you might be new to using EJBs in general.
rickcr ( 2013-03-09 04:02:19 +0800 )edit