In the directory $ORION_HOME/demo/news-app/news-client-source you have
a working example of a client.
You have to add the file jndi.properties somewhere at your CLASSPATH

[barak@gandalf]$ cat ~orion/orion/demo/news-app/news-client-source/jndi.properties 
java.naming.factory.initial=com.evermind.server.ApplicationClientInitialContextFactory
java.naming.provider.url=ormi://localhost/news
java.naming.security.principal=admin
java.naming.security.credentials=admin

the relevant xml files are:
~orion/orion/demo/news-app/META-INF/application.xml
that have the application module defination:
        <module>
                <java>news-client.jar</java>
        </module>
and the file 
~orion/orion/demo/news-app/news-client-source/META-INF/application-client.xml 
that holds the EJB reference for JNDI.

On Apr 23, Harley Rana wrote:
> Hi i have just started out with orion, i can't figure out how to access bean
> from a client. i've followed the Hello-Planet primer and made some changes
> to the bean, repackaged the .ear and redeployed.  Now every thing works fine
> when access the bean from a servlet that is packaged in the .ear file.
> My question is how do you access a bean, from a client not packaged in the
> .ear file?
> 
> Im getting an NamingException usally saying :
> java:comp/env namespace is only available from within a J2EE component
> sometimes saying :
> javax.naming.NamingException: Error reading application-client descriptor:
> No location specified and no suitable instance of the type 'hello.ejb.Hello'
> found for the ejb-ref HelloPlanet
> 
> I do have the application-client.xml file, and if i change details in it i
> see change in message from the second exception type.  so it must be reading
> the .xml file to see the change.
> 
> What do i need to do?
> Could you include code examples please.
> I appreciate any help you can give!
> Thanks, Harley Rana.


-- 


Reply via email to