purpose of this post is to show the design of EJB client that is allowed to switch to @Local or @Remote easily without changing codes.
Steps:
1. Create a java interface with all the method signatures. eg. IFooService
2. Create an empty java interface that extends IFooService and annotate it as @Local. eg. ILocalFooService.
3. Create an empty java interface that extends IFooService and annotate it as @Remote. eg. IRemoteFooService
4. Create the implementation class that implements both ILocalFooService and IRemoteFooService, eg. FooService.
Packaging:
1. compile IFooService as base-service.jar
2. compile ILocalSercie as local-service.jar
3. compile IRemoteService as remote-service.jar
4. compile FooService as service-implementation.jar
when running in a remote environment, include only base-service.jar and remote-service.jar in the client environment.
when running in a local environment, include only base-service.jar and local-service.jar in the client environment.
service-implementation.jar always in the service provider environment.
y
ReplyDeleteTo ensure Search engine marketing Links possibly the safest link building companies in the marketplace.Recommended Site Continue and mail out us details discuss when you find yourself uncertain relating to a specific thing and how to use it properly reading the product site and often requested inquiries.
ReplyDeleteThis article has some vast and valuable information about this subject.
ReplyDeletethis
It’s my first time to visit this site & I’m really surprised to see such impressive stuff out there.
ReplyDeleteUI/UX design agency
Thanks friends, for providing such enlightening data.
ReplyDeletehis response
You guys present there are performing an excellent job.
ReplyDeleteweb design agency San Francisco
The superb highly informative blog I’m about to share this with all my contacts.
ReplyDeleteLead conversion system squared
Hey buddies, such a marvelous blog you have made I’m surprised to read such informative stuf
ReplyDeletemobile app design services
Keep the ball rolling you have done the great job here.
ReplyDeletetop UX designer
An unbelievable blog. This blog will indisputably be definitely recommended to my friends as well.
ReplyDeleteUI UX design company
Pretty! It was really a wonderful blog. Thanks for the provided information.
ReplyDeleteuser experience consultants