• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Integrating with EJBs

You can interact with Enterprise Java Beans (EJBs) using ColdFusion MX 7. There is no specific tag or function built into ColdFusion for getting a reference to an EJB. Instead, you use a series of <cfobject> or CreateObject() to instantiate and work with the standard Java classes responsible for locating and maintaining EJBs, such as javax.naming.Context and javax.naming.InitialContext. The specific steps are very similar to the steps you would take when connecting to EJBs in normal Java code; you just use the CFML-style syntax to do so.

Once you have an instance of an EJB, you access its methods and properties just like any other Java class object or Bean. You will see a simple example of calling an EJB method in the next listing. For details about working with the methods and properties of a Java object, refer to the “Using Java Class Objects” section at the beginning of this chapter.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint