O'Reilly logo

Special Edition Using Java™ 2 Enterprise Edition by Mark Wutka

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Factories

One of the things that is conspicuously absent from IDL is a constructor declaration (other than the factory init method for value types). With CORBA, you usually create a special object called a factory that creates object instances. You register the factory with the naming service, and clients only need to perform a naming lookup on the factory. After a client has located a factory, it can invoke methods to create the actual objects.

Figure 17.2 shows the relationship between a factory, a client, and the object the factory creates.

Figure 17.2. The client uses the factory to create specific objects.

Listing 17.10 shows an IDL file ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required