/* This is great information
with regards to TC client implementations
are there any potential alligators in the TC swamp for implementing com.sun.enterprise.naming
or ORB access
before loading to InitialContext?
*/
Properties props = new Properties();
props.setProperty("java.naming.factory.initial",
"com.sun.enterprise.naming.SerialInitContextFactory");
props.setProperty("java.naming.factory.url.pkgs",
"com.sun.enterprise.naming");
props.setProperty("java.naming.factory.state",
"com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
// optional. Defaults to localhost. Only needed
if web server is running
// on a different host than the appserver
props.setProperty("org.omg.CORBA.ORBInitialHost",
"localhost");
// optional. Defaults to 3700. Only needed if
target orb port is not 3700.
props.setProperty("org.omg.CORBA.ORBInitialPort",
"3700");
InitialContext ic = new InitialContext(props);
/* EJB 3.0 :
E.g., assuming a Remote 3.0 EJB with a global JNDI name of
com.acme.FooRemoteBusiness
*/
FooRemoteBusiness foo = (FooRemoteBusiness) ic.lookup("com.acme.FooRemoteBusiness");
/*
I did'nt see any mention in v.3.0 Servlet spec for either NamingFactory or ORB access
perhaps we should wrap the call in try {}{catch NamingException} ?
try
{
InitialContext ic = new InitialContext(props);
}
catch(NamingException name_exception)
{
System.err.println("NamingException ="+name_exception.getMessage() );
}
*/
any thoughts Hassan?
thanks,
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
> Date: Sat, 15 Aug 2009 06:13:13 -0700
> From: glassfish_at_javadesktop.org
> To: users_at_glassfish.dev.java.net
> Subject: Re: How to connect Java SE client to Java EE module running on GlassFish?
>
> Hi.
>
> Please take a look at this FAQ:
>
> https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#StandaloneRemoteEJB
>
> It explains what you need to do. Please let us know if those steps work for you.
>
> - Tim
> [Message sent by forum member 'tjquinn' (tjquinn)]
>
> http://forums.java.net/jive/thread.jspa?messageID=360600
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
_________________________________________________________________
Get free photo software from Windows Live
http://www.windowslive.com/online/photos?ocid=PID23393::T:WLMTAGL:ON:WL:en-US:SI_PH_software:082009