users@glassfish.java.net

Re: Standalone Client - exception invoking method on EJB3 method

From: <glassfish_at_javadesktop.org>
Date: Fri, 25 May 2007 21:04:47 PDT

Make sure that the bean implements remote interface.
Standalone client have to use remote interface.
It's better to show in code the best way to do it.

Example:

PatientServiceRemote.java :

package com.medenterprise.app.patientservice.session;

import javax.ejb.Remote;

@Remote
public interface PatientServiceRemote {
-----------------------------------------------------------------------------------------

PatientServiceBean.java :

package com.medenterprise.app.patientservice.session;

import javax.ejb.Stateless;

@Stateless
public class PatientServiceBean implements PatientServiceRemote {
-------------------------------------------------------------------------------------------------------


PatientServiceClient.java :

package com.medenterprise.app.patientservice.client;

import javax.ejb.EJB;
import com.medenterprise.app.patientservice.session.PatientServiceRemote;

public class PatientServiceClient {
        private @EJB PatientServiceRemote patientService;
--------------------------------------------------------------------------------------------------------

Good luck,
Vladimir
[Message sent by forum member 'vladperl' (vladperl)]

http://forums.java.net/jive/thread.jspa?messageID=219053