Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"

Sushil Deshpande

+ Follow
since Apr 21, 2005
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sushil Deshpande

email Id Please or contact no
12 years ago
- geographically distributed locations that need to communicate
>>> Since J2ee JMS is distibuted Tech geographically distributed locations
is not a problem as long as these sites are connected and up.

- firewall(s) protecting each location

>> In any organization;IT systems are protected by firewall for outside comm'n;but they can readilly talk to each other using VPN

- dedicated line or internet connectivity
>> no coments
- the ability to control software deployed at all locations

>Since there are Infrastructure management toll comes in handy with Such distributed tech or plugins by third party managemebnt; it not an issue. You can developed your own management s/w using JMX.Oracle Provide Oracle Enterprise manager.

- near real-time synchronization (or slight lag) between locations is acceptable.

>>Distributed 2 Phase Conmmit Protocol will handle this issue.

Sushil Deshpande
BPEL-SOA Integration
Oracle Corporation
Hi Arun,
java/J2ee Provides API called JMS(Java Messaging Services)
This API cn be used to put/retrieve the Messages and can work with almost all the vendors providing Message Middleware
Please refere

Your EJB name is CEInvoiceLine
So Corresponding Home Interface/Object name is CEInvoiceLineHome
and as per orion standard it will deploy the bean in JNDI/Lookup the bean
as CEInvoiceLineHomeJNDI

Sushil Deshpande
BPEL-SOA Integration
Oracle Corporation
If you are not going to include the weblogic.jar in your app. lib you will get error while locating the Home interface through JNDI in code

Properties pNamingData=new Properties();
pNamingData.setProperty("java.naming.factory.initial","weblogic.jndi.WLInitialContextFactory" );

make sure that weblogic servershould run on port 7001 or edit the last line according to it.
After deployoing the EJb you must test it using the ADMIN Console.
Ya You can.
But in real Enterprise world,EB can not be accessed directly.Most of J2ee architecture uses the Session facade patterns in which you can directly call the methods on the Home interface.
But Still if you want security you have to Implement the Remote Interface.

See design Patterns on

Since EJb Follows the RMI Semantics,After locating the Home Interface via JNDI,and then executing the Create or finder methods the Home Interface returns the primary key class which is first interpreted by the container and then container returns the Remote Interface to you so that you can locate the EJB by calling methods on it.If I do not want to expose the Create methods to client so i do not write it into the Remote Interface.

You must notice that Home interface returns Primary key class but actual bean class returns the null,so EJb object behaviour can be easily change by Container by providing the Two different Interfaces.

You should read the "Mastering EJB" by Ed Roman on a downloadable PDF...........
Its sufficient to read the first 3 chapters...

Originally posted by Navin Pillu:
Hi All

I've query about J2EE Architecture. Could anybody explain me purpose of home & remote interfaces in J2EE architecture. I know Home inteface defines create & finder method and remote defines business logic. But ultimately we combine it into EntityBean (Except finder). Then what is the purpose of creating 3 things instead of 1
This might be a foolish question, bcoz i'm new to EJB. Plz explore it.

Thanks in Advance

Hello Navin Pillu
Its a Good Question.Tha Most important abt EJB Architecture is that it will based on the RMI Architecture.
Since there are two interface designed in EJb one is home and one is Remote.
You can;t access the Home methods remotely.Methods defined only in the Remote(Business) interface expose methods that is accessible by the Client.
And since this interface is used to generate the EJB object at runtime in container specific algorithms,the vendor can impose their own algo to the Interfaces so that some platfom services can be easily accessed.
In home interface there are some business methods that is accessible internally and might contain secret business logic which you don't want to exposed to the client by Remote Interfaces.

I will post some new Info asap.

Thanks and Regards,
Sushil Deshpande
FWL Technologies India Pvt. Ltd.,
Cell: 9822251993.
Tel.:91-020-25818096/97 ext:310.
"If you don�t know the destination, then it�s just useless to read the roadmap"