Hi All ,

I have a stateless session ejb which is NOT referencing any other ejbs. I
just wish to perform a JNDI lookup via ENC and this is how I am doing it. I
have successfully deployed it on Weblogic 6.1 server.

Context ctx = new InitialContext();
Object obj = ctx.lookup("java:comp/env/ejb/MyAdminHome");//throws an
Exception

BUT

Object obj = ctx.lookup("MyAdminHome");//works fine
....
....


But it gives me an Exception saying

Unable to resolve comp/env/ejb/SMProCardSpendAdminHome Resolved: 'comp/env'
Unresolved:'ejb'

The ejb-jar.xml looks like this
<ejb-jar>
    <enterprise-beans>
        <session>
        <ejb-name>MyAdminBean</ejb-name>
        <home>com.abc.xyz.ejb.MyAdminHome</home>
        <remote>com.abc.xyz.ejb.MyAdmin</remote>
        <ejb-class>com.abc.xyz.ejb.MyAdminBean</ejb-class>
        <session-type>Stateless</session-type>
        <transaction-type>Container</transaction-type>
     </session>
    </enterprise-beans>
 </ejb-jar>

and the weblogic-ejb-jar.xml looks like this

<weblogic-enterprise-bean>
        <ejb-name>MyAdminBean</ejb-name>
        <stateless-session-descriptor>
                <pool>
                        <max-beans-in-free-pool>100</max-beans-in-free-pool>

<initial-beans-in-free-pool>5</initial-beans-in-free-pool>
                </pool>
        </stateless-session-descriptor>
    <jndi-name>MyAdminHome</jndi-name>
</weblogic-enterprise-bean>

Where am I faltering? Can anybody please point out? I saw the petstore
weblogic deployment descriptor for the Customer session bean but couldnt
understand how the ENC lookup was working there.

- Rahul

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to