Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
maxLevel3
minLevel3
styleborder:1
locationtop
typeflat
separatorpipe

...

Syntax

Code Block
XML
XML
<ejb beanstalk="string" class="string" [sessionId="string"] [remove="true | false"] 
  [method="string"] [target="string | {xpath}"] [jndiName="string"] /> 
    <args> 
      <arg (value="string | {xpath}")/>* 
    </args> 
</ejb>

 

 

 

EJB specific options

EJB mediator field descriptions,

Field NameDescription
Beanstalk IDReference to the application server specific connection source information, which is defined at the synapse.properties .
ClassThis required the remote interface definition provided in the EJB 3.0 (EJB service invocation remote/home interface).
Session IDWhen the invoke ejb context in the form state-full bean then the related ejb session status specif id will be stored in here. Expression/Value . 
RemoveOnce invoke state-full/stateless session user can force and ask the Enterprise entity manager to remove the ejb context related parameters.
TargetIf a particular EJB method returns then the return object can be saved against the the name provided in the target at the synapse property context Expression/Value
JNDI Name

The Java Naming and Directory Interface (JNDI) is an application programming interface (API) for accessing different kinds of naming and directory services. JNDI is not specific to a particular naming or directory service, it can be used to access many different kinds of systems including file systems; distributed objects systems like CORBA, Java RMI, and EJB; and directory services like LDAP, Novell NetWare, and NIS+

Method ArgumentsCan be used to define the arguments which is required for the particular ejb method to be invoked Expression/Value

 

Example

Code Block
XML
XML
<ejb beanstalk="jack" class="org.ejb.wso2.test.StoreRegister" method="getStoreById" target="store" jndiName="ejb:/EJBDemo/StoreRegsiterBean!org.ejb.wso2.test.StoreRegister">
   <args>
     <arg xmlns:ns="http://org.apache.synapse/xsd" xmlns:ns3="http://org.apache.synapse/xsd" value="{get-property('loc_id')}"/>
   </args>
</ejb>

In this example, the Callout Mediator does the direct service invocation to the StockQuoteService using the client request, get the response and set it as the first child of the SOAP message body. Then using the Send Mediator, the message is sent back to the client.

Excerpt
hiddentrue

Description of the EJB Mediator in WSO2 ESB.