Java Reference
In-Depth Information
binding="#{backing_create.cb1}" id="cb1"
action="#{backing_create.cb1_action}"/>
</af:group>
</f:facet>
</af:panelFormLayout>
</h1>
</af:form>
</af:document>
</f:view>
<%-- oracle-jdev-comment:auto-binding-backing-bean-name:backing_
create--%>
The Create.java managed bean has RichInputText components corresponding
to each of the properties of the entity instance Catalog . The managed bean also
has methods cb1_action() and find() (custom added) to persist and find entity
instances respectively. The create.jsp JSF page has af:inputText components
for each of the Catalog entity properties. Each of the ADF Faces components in the
create.jsp page has a binding with ADF Faces UI components in the managed
bean. The create.jsp also has an af:commandButton button component that has
its action attribute's binding to the cb1_action method in the backing bean. In the
cb1_action() method in the backing bean, we lookup the session bean and invoke
the persistEntity() method on it, which returns a String . First, we create
an InitialContext :
InitialContext context = new InitialContext();
Two methods are available to lookup a session bean using the remote
business interface:
1.
Lookup the session bean remote interface using the mapped name. The
global JNDI name for a session bean remote business interface is derived
from the remote business interface name. The format of the global JNDI
name is mappedName#qualified_name_of_businessInterface .
2.
Create a weblogic-ejb-jar.xml deployment descriptor and specify the
business interface JNDI name in the weblogic-ejb-jar.xml deployment
descriptor. The global JNDI name is specified as follows:
<weblogic-enterprise-bean>
<ejb-name>CatalogTestSessionEJBBean</ejb-name>
 
Search WWH ::




Custom Search