Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to deploy EJB bean in WEBLOGIC 6

Status
Not open for further replies.

CovaiSiva

Programmer
Aug 8, 2003
1
IN
Dear friends,

I am new to EJB & Web Logic. I have created RemoteInterface,HomeObject and SessionBean. Have created ejb-jar.xml and weblogic-ejb-jar.xml files too. Now i don know how to deploy this file and how to call this bean from Client code.

I have attached all the script herewith, plz help me sombody how to deploy and make it work in weblogic 6.1



Remote Interface
****************

package MySiva;

public interface HelloRemote extends javax.ejb.EJBObject {
public String Hello() throws java.rmi.RemoteException;
}

Home Interface
****************

package MySiva;


public interface HelloHome extends javax.ejb.EJBHome {
HelloRemote create() throws java.rmi.RemoteException,
javax.ejb.CreateException;
}

SessionBean
***************

package MySiva;

import java.rmi.RemoteException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;

public class HelloBean implements SessionBean {

public String Hello()
{
return "Hello World" ;
}

public HelloBean() {}
public void ejbCreate() {}
public void ejbRemove() {}
public void ejbActivate() {}
public void ejbPassivate() {}
public void setSessionContext(SessionContext sc) {}

}


ejb-jar.xml
***************

<?xml version=&quot;1.0&quot;?>
<!DOCTYPE ejb-jar PUBLIC
'-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN'
'<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>HelloRemote</ejb-name>
<home>MySiva.HelloHome</home>
<remote>MySiva.HelloRemote</remote>
<ejb-class>MySiva.HelloBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>

weblogic-ejb-jar.xml
***************

<?xml version=&quot;1.0&quot;?>
<!DOCTYPE weblogic-ejb-jar PUBLIC
'-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN'
'<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>HelloRemote</ejb-name>
<jndi-name>SivaHelloJNDI</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>

plz do respond me

Regards
Siva
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top