Forums Register Login

EJB annotations at the client side

+Pie Number of slices to send: Send
I remember readin an article sometime back that EJB annotations can only be used at the server side and not at the client side. This would mean that client code would still have the JNDI lookup code. why hasn't sun taken care of this ?
+Pie Number of slices to send: Send
How are you going to get an EJB ref if you don't know where to get it from?
That's what the JNDI lookup is for.

If you want you can use something like Spring to put an abstraction layer around it.
+Pie Number of slices to send: Send
Hi Pradip,

Java EE clients support dependency injection into static fields. So a remote EJB client can inject the bean reference without having to use JNDI.

Cheers,

Merrick
+Pie Number of slices to send: Send
Thanks Merrick
+Pie Number of slices to send: Send
 

Originally posted by Merrick Schincariol:
Java EE clients support dependency injection into static fields. So a remote EJB client can inject the bean reference without having to use JNDI.



In the scenario above who is responsible for the naming and directory services?

Bye,

Alex
+Pie Number of slices to send: Send
 

Originally posted by Alexandros Stivaktatis:


In the scenario above who is responsible for the naming and directory services?

Bye,

Alex



Same as before. The EJB server. The only difference is that the client does not have to do the lookup.
+Pie Number of slices to send: Send
well, the client still needs to do the lookup, but the actual implementations are hidden in the framework you're deploying as part of your application.
+Pie Number of slices to send: Send
 

Originally posted by Jeroen T Wenting:
well, the client still needs to do the lookup, but the actual implementations are hidden in the framework you're deploying as part of your application.


I meant that the client does not have to write the lookup code.
+Pie Number of slices to send: Send
Is it correct to say that the Service Locator pattern is in
this way introduced in the framework that is being deployed,
whereas previously this design choice was left completely in
the hands of the developers?

Alex
+Pie Number of slices to send: Send
 

Originally posted by Alexandros Stivaktatis:
Is it correct to say that the Service Locator pattern is in
this way introduced in the framework that is being deployed,
whereas previously this design choice was left completely in
the hands of the developers?

Alex



Yeah, no more ServiceLocator pattern.
+Pie Number of slices to send: Send
Sorry ab out the lack of knowledge but... how do you do then ?
+Pie Number of slices to send: Send
 

Originally posted by Satou kurinosuke:
Sorry ab out the lack of knowledge but... how do you do then ?



I guess you'll know that after reading the book
These are the worst of times and these are the best of times. And this is the best tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 751 times.
Similar Threads
Java SE client depends on javax.ejb?
annotations loading in VM
Specification version
file upload
Specification version
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 11:29:59.