Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

How to deploy a simple bean in Oracle 9iAS

  Asked By: Dora    Date: Jan 28    Category: Java    Views: 826
  

anybody help me how to deploy a
simple bean in OC4J ( Oracle Container For JAVA).

i tried, but i am getting error.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Sydney Thompson     Answered On: Jan 28

What was the error  u got? Give a complete description.

 
Answer #2    Answered By: Kim Cruz     Answered On: Jan 28

Deploying a bean  in Oracle9ias

1. Create the Bean classes. and compile it in the corresponding Folder "d:\app1\app\ecomp"
that u have set in the application.xml in the config folder
Sample


<web-module id="DefaultWebApp" path="d:\app1\app\web" />
<ejb-module path="d:\app1\app\ecomp" remote="false" />
<client-module path="d:\app1\app\ecomp" remote="false" />
<persistence path="../persistence" />

2. Modify the ejb-jar.xml in the path "d:\app1\app\ecomp\META_INF" folder

EJB-jAR XML
----------

<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>

<ejb-jar>
<enterprise-beans>
<session>
<small-icon>images/orange-cube.gif</small-icon>
<ejb-name>SampleStatelessHome</ejb-name> <!-- can be any Name->
<home>package1.SampleStatelessHome</home>
<remote>package1.SampleStateless</remote>
<ejb-class>package1.SampleStatelessBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>SampleStatelessHome</ejb-name> <!-- ejb-name specified in the session tag -->
<method-intf>Remote</method-intf>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>

3. Restart the server, and the bean is re-deployed.

If u further find any problems, let me know

 
Didn't find what you were looking for? Find more on How to deploy a simple bean in Oracle 9iAS Or get search suggestion and latest updates.




Tagged: