Hi, I'm new to EJB3, so I'm probably missing something but here it goes...
I developed a very simple slsb to manage Employees. Following the book I'm
reading I created the business interface and implemented it from within the sb.
So far so good. I'm studying EE 5 because I want to introduce the passage to
EJB3 in the company I work for. So it happens that our architecture has got
Apache HTTP/Tomcat on a front-end box and Jboss running on another box shielded
from the outside world, and the front-end talks to the backend through Business
Delegates. This means that our applications can use two types of interfaces:
local (B2B) and remote (User interfaces). I declared the interface with the
@Remote annotation to make it available remotely, but I would have expected
that I could use the same business interface both locally and remotely.
Unfortunately, when I declared by slsb as follows:
| @Stateless
| @Local({HelloService.class})
| @LocalBinding(jndiBinding="uk_co_jemos_ejb3.sessions_EmployeeServiceLocal")
| @Remote({HelloService.class})
| @RemoteBinding(clientBindUrl="socket://192.168.2.3:4173/",
jndiBinding="uk_co_jemos_ejb3.sessions_EmployeeService")
| public class EmployeeServiceImpl implements EmployeeService {
|
| ...etc
|
and I performed a remote lookup with the PortableRemoteObject.narrow I got a
ClassCastException. This in my opinion happened because the JNDI resolved the
same name to two different types: one was the pure, local interface, the other
a stub of the interface.
When I removed the local declarations, everything worked fine.
The conclusion I get from the above is that I have to declare two interfaces
(which do exactly the same thing) for local and remote access.
Please tell me that's not true.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3954877#3954877
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3954877
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user