Tutorial Downloads .com

Home

Enterprise Java Beans Components and CORBA Clients A Developer Guide(Java PDF)

This Java tutorial covers the details of Enterprise Java Beans Components and CORBA Clients A Developer Guide.J2EE technology simplifies enterprise applications by basing them on standardized, modular and re-usable components based on the Enterprise JavaBeans™ (EJB™) architecture, providing a complete set of services to those components, and handling many details of application behavior automatically.

This paper discusses how to enable a client written in any language supported by CORBA to access Enterprise JavaBeans™ components (“EJB™ components”). This paper is directed at programmers with advanced knowledge of both the Java™ 2 Platform, Enterprise Edition (J2EE™) and CORBA (Common Object Request Broker Architecture).

J2EE technology simplifies enterprise applications by basing them on standardized, modular and re-usable components based on the Enterprise JavaBeans™ (EJB™) architecture, providing a complete set of services to those components, and handling many details of application behavior automatically. By automating many of the timeconsuming and difficult tasks of application development, J2EE technology allows enterprise developers to focus on adding value, that is, enhancing business logic, rather than building infrastructure. The EJB™ server-side component model simplifies development of middleware components that are transactional, scalable, and portable. Enterprise JavaBeans servers reduce the complexity of developing middleware by providing automatic support for middleware services such as transactions, security, database connectivity, and more.

CORBA is an Object Management Group (OMG) standard that is an open, vendorindependent architecture and infrastructure that computer applications use to work together over networks. Using the standard Internet Inter-ORB Protocol (IIOP), a CORBA-based program from any vendor, on almost any computer, operating system, programming language, and network, can interoperate with a CORBAbased program from the same or another vendor, on almost any other computer, operating system, programming language, and network.To learn more about
CORBA, visit http://www.omg.org/gettingstarted/gettingstartedindex.htm.

Developing a CORBA Client that
Accesses an Enterprise Bean
This is an example of how to develop a CORBA client application that accesses an
EJB component. In this example, the client is written in the C++ programming
language, but the client could be written in any language supported by CORBA.
The general process for developing a CORBA client so that it can access an
enterprise bean is demonstrated in the following sections:
1. “Write the Enterprise Bean”, on page 5.
2. “Generate the CORBA IDL”, on page 9.
3. “Create a CORBA client”, on page 10.
4. “Deploy the Enterprise Bean”, on page 14.
5. “Run the client executable”, on page 15.
This document also includes:
  “Creating a Java RMI-IIOP client application”, on page 16.
  “Where to go from here”, on page 19.
  “Tips for complex interfaces”, on page 19.
  “Links to similar examples”, on page 20.
In order to make the example simple, we have taken a few shortcuts. For
information on building more advanced solutions, see “Tips for complex interfaces”

Deploy the Enterprise Bean
7. The next step is to deploy the enterprise bean using your favorite application
server. The following steps describe how to deploy the LoggerEJB component
using the J2EE 1.3 Reference Implementation (RI).
1. Start the RI application from a terminal window or command prompt by typing:
$J2EE_HOME/bin/j2ee -verbose
2. When the J2EE 1.3 RI indicates “J2EE server startup complete”, run the
deployment tool from another terminal window or command prompt by typing:
$J2EE_HOME/bin/deploytool
3. From the deployment tool, select File -> New -> Application.
4. In the Application File Name field, enter Logger.ear to indicate in which file to
create the application.
5. In the Application Display Name field, enter Logger
6. Select OK to save the settings and close this dialog window.
7. From the deployment tool, select File -> New -> Enterprise Bean.
8. Select Next if you get the Introduction screen. If not, continue.
9. In the New EnterpriseBean Wizard, select Edit in the Contents box.
10. Expand the Available Files list, and add the following four .class files from our
ejbinterop package: Logger.class, LoggerHome.class,
LoggerEJB.class, LogMessage.class. Select OK, then Next.
11. Select Stateless Session Bean Type.
12. Select ejbinterop.LoggerEJB for the Enterprise Bean Class.
13. Select ejbinterop.LoggerHome for the Remote Home Interface.
14. Select ejbinterop.Logger for the Remote Interface.
15. Select the Next button until you get to the Security Settings page.
16. Select the Deployment Settings button.
17. Select Support Client Choice.
18. Select OK to save the settings and close this dialog window.
19. Select Finish.
20. From the deployment tool, select, Tools -> Deploy.
21. If running the Java RMI-IIOP client only, select Return Client JAR.
22. Select Next.
23. Enter ejbinterop/logger in the JNDI Name for our LoggerEJB field.
24. Select Finish.
25. Select File -> Exit to exit the deploytool.
Now, the Logger application with our LoggerEJB components are deployed and
ready to receive messages.
Run the client executable
8. Run the client executable. One way you can run the client executable is to enter
the following URL in a terminal window from the directory containing the
executable client file:
Client corbaname:iiop:1.2@localhost:1050#ejbinterop/logger
In this URL,
- Client is the name of the application to run.
- corbaname specifies that we will resolve a stringified name from a specific naming context.
-  iiop:1.2 tells the ORB to use the IIOP protocol and GIOP 1.2.
 -The host machine on which to find the reference is localhost, the local machine.  To expand this example to run on two machines, enter the IP address or host  name of the machine on which the server is running instead of localhost.
- 1050 is the port on which the naming service is listening for requests. By default in the J2EE v.1.3 RI, the default port the naming service listens on is port 1050. The portion of the reference up to this point at the hash mark (Client corbaname:iiop:1.2@localhost:1050) is the URL that returns the root naming context.
 -ejbinterop/logger is the name to resolve in the naming context.

 Read more about JavaBeans Components and CORBA Clients A Developer Guide


Resource: http://java.sun.com/j2se/1.4.2/docs/guide/rmi-iiop/interop.pdf
Posted By : Rafael Levi
On date : 07.12.08

Most used JAVA Tutorials

JAVA Tutorials ( Ebooks , PDF's )
Java Code Conventions Java and C++ A critical comparison Generics in the Java Programming Language Writing Robust Java Code
Brewing Java: A Tutorial
Part 1 is a brief introduction to what Java is, why it's cool and what you need to use it. Part 2 is a tutorial introduction to Java that just covers what you need to know to start programming command line applications in Java. This is an introduction to the basic syntax of the language. It skims over many details and completely omits little used features like bit-shift operators. This section is fairly complete. Part 3 covers the basics of writing applets in Java. Part 4 introduces you to objects and classes.
JAVA Interview Questions & Answers
What is a transient variable, Why do threads block on I/O, How are Observer and Observable used, What is synchronization and why is it important, Can a lock be acquired on a class, What is the Collections API,What is the List interface, What is the Vector class, What is an Iterator interface, What is the difference between yielding and sleeping, What are wrapper classes, What is the difference between preemptive scheduling and time slicing, What is clipping, What class is the top of the AWT event hierarchy, What is the purpose of the wait(), notify(), and notifyAll() methods ... etc... etc...
Struts interview Questions and answers | FAQs
Interview questions and answers of Struts
The java.util.concurrent package Collections
The java.util.concurrent package includes a number of additions to the Java Collections Framework.
JAVA PDF Tutorials, Code Conventions, Writing Robust Java Code
Java Code Conventions,Java and C++ A critical comparison,Generics in the Java Programming Language,Writing Robust Java Code
JFreeChart Introduction
JFreeChart is a free 100% Java chart library that makes it easy for developers to display professional quality charts in their applications. JFreeChart's extensive feature set includes:
SCJP Sun Certified Programmer for Java 6 Exam 310-065 - Tutorial book
With hundreds of practice questions and hands-on exercises, SCJP Sun Certified Programmer for Java 6 Study Guide covers what you need to know--and shows you how to prepare--for this challenging exam.
NetBeans, Java, and JFreeChart | PDF study material
This set of “papers” consists of an introduction to JFreeChart and NetBeans as an IDE for Java programming. I attempt herein to ease the learning burden, a little, compared to the misery that I had to suffer through. We are using JDK 1.5.0_03, NetBeans 4.1 (for future work, we've gone over to 5.0), and jfreechart-1.0.0-rc1. I hope its not necessary to mention that all of these programs are free, in the public domain, and can be downloaded and installed on modern PCs.
JSF and Struts Classic Reference Manual | Pdf study material
The following chapters describe how to deal with classic/old style of JSF and Struts development. We recommend users to use JBoss Seam [http://www.redhat.com/developers/jbds/Getting_Started/GetStartSeamGen.html] to simplify development, but until then you can read about classical JSF and Struts usage here.We are going to show you how to create a simple JSF application using the JBoss Developer Studio plug-in for Eclipse.
Effective Java (2nd Edition) - Java Book
Are you looking for a deeper understanding of the Java™ programming language so that you can write code that is clearer, more correct, more robust, and more reusable? Look no further! Effective Java™, Second Edition, brings together seventy-eight indispensable programmer’s rules of thumb: working, best-practice solutions for the programming challenges you encounter every day.
Java Interface User Guide (JAVA PDF)
This Java tutorial covers the details of Java Interface User Guide.An Introduction to the Java Interface The Datalogics Java Interface provides a Java-language wrapper to the Adobe PDF Library to facilitate the rapid creation of PDF documents via Java calls. The Adobe PDF Library is C-based, not Java-sourced, but as it is usable by any application type which supports calls to a C-based library, the Datalogics Java Interface has been created.
Java Technology - What java does? - How java works
Java technology is both a programming language and a platform. In the Java programming language, all source code is first written in plain text files ending with the .java extension. Those source files are then compiled into .class files by the javac compiler. A .class file does not contain code that is native to your processor; it instead contains bytecodes - the machine language of the Java Virtual Machine1 (Java VM). The java launcher tool then runs your application with an instance of the Java Virtual Machine.
Executor Interfaces in JAVA
The java.util.concurrent package defines three executor interfaces: Executor, a simple interface that supports launching new tasks. ExecutorService, a subinterface of Executor, which adds features that help manage the lifecycle, both of the individual tasks and of the executor itself.
BASIC CONCEPTS LESSON-1 JAVA OVERVIEW (JAVA PDF)
This Java tutorial covers the details of BASIC CONCEPTS LESSON-1 JAVA OVERVIEW (JAVA PDF).Before you can start writing Java programs, you need acquire and set up some kind of Java programming software.

Latest added JAVA Tutorials

TDD and Acceptance TDD for Java Developers tutorial book
Learn hands-on to test drive Java code How to avoid common TDD adoption pitfalls Acceptance test driven development and the Fit framework How to test Java EE components-Servlets, JSPs, and Spring Controllers
Java Concurrency in Practice - Book
Threads are a fundamental part of the Java platform. As multicore processors become the norm, using concurrency effectively becomes essential for building high-performance applications. Java SE 5 and 6 are a huge step forward for the development of concurrent applications, with improvements to the Java Virtual Machine to support high-performance, highly scalable concurrent classes and a rich set of new concurrency building blocks. In Java Concurrency in Practice, the creators of these new facilities explain not only how they work and how to use them, but also the motivation and design patterns behind them.
SCJP Sun Certified Programmer for Java 6 Exam 310-065 - Tutorial book
With hundreds of practice questions and hands-on exercises, SCJP Sun Certified Programmer for Java 6 Study Guide covers what you need to know--and shows you how to prepare--for this challenging exam.
Head First Design Patterns - Java tutorial Book
At any given moment, somewhere in the world someone struggles with the same software design problems you have. You know you don't want to reinvent the wheel (or worse, a flat tire), so you look to Design Patterns--the lessons learned by those who've faced the same problems. With Design Patterns, you get to take advantage of the best practices and experience of others, so that you can spend your time on... something else. Something more challenging. Something more complex. Something more fun.
Effective Java (2nd Edition) - Java Book
Are you looking for a deeper understanding of the Java™ programming language so that you can write code that is clearer, more correct, more robust, and more reusable? Look no further! Effective Java™, Second Edition, brings together seventy-eight indispensable programmer’s rules of thumb: working, best-practice solutions for the programming challenges you encounter every day.
Head First Java, 2nd Edition - Java Book
It has taken four years, but with Head First Java the introductory Java book category has finally come of age. This is an excellent book, far more capable than any of the scores of Java-for-novices books that have come before it. Kathy Sierra and Bert Bates deserve rich kudos--and big sales--for developing this book's new way of teaching the Java programming language, because any reader with even a little bit of discipline will come away with true understanding of how the language works. Perhaps best of all, this is no protracted "Hello, World" introductory guide. Readers get substantial exposure to object-oriented design and implementation, serialization, neatwork programming, threads, and Remote Method Invocation (RMI).
Learn how to load, validate and submit forms in Ext JS
This tutorial focuses on the topic of 'Processing Forms'. The journey will include client-side and server-side ?eld validation, form loading, submission, ?eld customization, and layout techniques that will make it a breeze to build great-looking and friendly forms.
Useful Apache Maven Plugins
This tutorial discusses some of the Maven plugins, both from Apache Maven and Codehaus Mojo project which are of great help to Maven builds.
while - Java Term
Details about the Java term while
volatile - Java Term
Details about the Java term volatile