Deploying EJB with Local Interfaces.

HI everybody

I am trying example on EJB with LocalInterfaces with BMP.

My bean without Local interface is deployed and working fine.

Then i have changed Home & Remote interface code. Again i have deployed it . It is deployed but i am unable to Look Up.

I am using J2SDKEE1.3 server & JDK1.3.

I have changed both interface files as follow:-

I have made my Home interface as :

public interface RetrieveConditionHome extends javax.ejb.EJBLocalHome {

public RetrieveCondition create(String SQL_WHERE_ID, String SQL_WHERE_NAME,

String FROM_TABLE , String WHERE_CLAUSE , String LAST_UPD_USER_ID ,

Date LAST_UPD_TMSTMP, int ROW_VERSION)

throws CreateException;

}

-

I have made my Remote interface as :

public interface RetrieveCondition extends javax.ejb.EJBLocalObject {

public String getSQLWHERENAME() ;

}

-

-Viren

[960 byte] By [virenj122] at [2007-9-19]
# 1

Please check how you are performing your lookup. For local interfaces the only wau allowed is

InitialContext ictx = new InitialContex();

Please make note that there are no parameters. This means that you can look up "local" EJB from another EJB or servlet/JSP or any client which is within the same application server. This does not include, different servers in the same domain.

Hope this helps.

John.

john_arun at 2007-7-4 > top of java,Enterprise & Remote Computing,Enterprise Technologies...
# 2

I hope you understand problem : (1)I have deployed bean with local Interfaces.(2) I am running same client code which i was using for Non-LocalInterface bean.

Since i am using J2SDKEE1.3 i am NOT adding Properties in constructor of InitialContext().

So it is as you have said only.

Let me try today once again.

Viren.

virenj122 at 2007-7-4 > top of java,Enterprise & Remote Computing,Enterprise Technologies...
# 3
What is the type of client u r using. Is it a servlet of JSP or EJB.If you are using local interface only applications which are within the container can access it.Hope this helps...John.
john_arun at 2007-7-4 > top of java,Enterprise & Remote Computing,Enterprise Technologies...
# 4
i am using Standalone java class as Client with Look up as:-InitialContext ctx = new InitialContext();RetrieveConditionHome home = (RetrieveConditionHome)ctx.lookup("RetrieveLocal"); I think you are correct .Let me try with Servlet .Viren
virenj122 at 2007-7-4 > top of java,Enterprise & Remote Computing,Enterprise Technologies...
# 5

I have deployed JSP page .

But still not getting .

While deploying Jar file I have added My Local bean as EJB Module & JSP page calling this Local Bean as Web Module in ONE application(one .ear).

I have deployed it but still it is unable to Look UP.

It is giving NameNotFoundException.

If you have time i can mail you all Java file as well as JSP file.

viren

virenj122 at 2007-7-4 > top of java,Enterprise & Remote Computing,Enterprise Technologies...
# 6

In JMS tutorial : They have stated ejbCreateLocal method.

I am not using this method in my Bean class. I am using general ejbCreate method as we normally do .

I am really confused about these methods : ejbCreate & ejbCreateLocal.

JMS Tutorial site (where they have used ejbCreateLocal):

A J2EETM Application that Uses the JMS API with an Entity Bean

java.sun.com/products/jms/tutorial/1_3-fcs/doc/j2eeapp3.html

Viren

virenj122 at 2007-7-4 > top of java,Enterprise & Remote Computing,Enterprise Technologies...