Archive | Ejb-client RSS feed for this section

Spiegazione-problema-classloder-serialcontext-per-call-ejbremote

4 Jan

Vedere questa spiegazione assolutamente.

http://stackoverflow.com/questions/7804357/serialinitcontextfactory-not-found-in-glassfish-naming

Call-ejb3-on-glassfish-from-tomcat7.attenzione-aggiugere-jar-per-securezza

4 Jan

http://javahowto.blogspot.it/2011/06/tomcat-to-glassfish-remote-ejb.html
Spiega bene. Notare la nota finale su programlogin quando non si usa bisogna aggiungere il file  appclient.security.jar inside CATALINA_HOME/lib

Altri files da aggiungere

For a simple Tomcat-GlassFish test that includes a servlet (in Tomcat) invoking remote EJB 3 stateless bean (in GlassFish 3), the following 32 jars are the minimum set of jars to be included in Tomcat lib:

javax.ejb.jar
ejb-container.jar
deployment-common.jar
dol.jar
glassfish-corba-csiv2-idl.jar
glassfish-corba-codegen.jar
ssl-impl.jar
security.jar
ejb.security.jar
management-api.jar
gmbal-api-only.jar
gmbal.jar
glassfish-corba-asm.jar
glassfish-corba-newtimer.jar
glassfish-corba-orbgeneric.jar
bean-validator.jar
config-types.jar
kernel.jar
config.jar
config-api.jar
glassfish-corba-omgapi.jar
glassfish-corba-orb.jar
orb-connector.jar
orb-enabler.jar
orb-iiop.jar
glassfish-api.jar
auto-depends.jar
hk2-core.jar
internal-api.jar
common-util.jar
glassfish-corba-internal-api.jar
glassfish-naming.jar

classloader-problema-per-serial-init-context

3 Jan

https://www.java.net//node/703676

the exception :

root cause

javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.enterprise.naming.impl.SerialInitContextFactory [Root exception is java.lang.ClassNotFoundException: com.sun.enterprise.naming.impl.SerialInitContextFactory]
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:674)
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)
javax.naming.InitialContext.init(InitialContext.java:242)
javax.naming.InitialContext.<init>(InitialContext.java:216)
test.TestServlet.initTestBean(TestServlet.java:48)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:606)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
java.lang.Thread.run(Thread.java:724)

the solution

I avoid the same problem by put following code:

Class clazz = Class.forName(this.getClass().getName());
Thread thread = Thread.currentThread();
ClassLoader classLoaderThread = thread.getContextClassLoader();
System.out.println(“ClassLoader for Thread : ” + classLoaderThread);
ClassLoader classLoaderClass = clazz.getClassLoader();
System.out.println(“ClassLoader for Class : ” + classLoaderClass);
thread.setContextClassLoader(classLoaderClass);

before the “context.lookup”.
This change:
ClassLoader for Thread : org.eclipse.core.runtime.internal.adaptor.ContextFinder@1970ae0
to:
ClassLoader for Class : org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@d19bc8
and works (at least in my case).

 

———————————————

My 11 day quest to connecting JMS client to remote GlassFish from Tomcat

 

http://blog.trifork.com/2010/12/02/my-11-day-quest-to-connecting-jms-client-to-remote-glassfish-from-tomcat/

 

 

come-usare-ejb-remoti .

31 Dec

http://stackoverflow.com/questions/9829922/how-to-access-ejb-on-remote-server

What if I have an existing stand-alone java client that accesses EJB components through the CosNaming JNDI provider ?  How do I get static RMI-IIOP stubs for it?

https://glassfish.java.net/javaee5/ejb/EJB_FAQ.html#CosNaming

————————

http://www.coderanch.com/t/539922/EJB-JEE/java/remote-call-EJB-deploy-glassfish

 

GlassFish-to-GlassFish Remote EJB Invocation

http://docs.oracle.com/cd/E19798-01/821-1752/beanv/index.html

https://blogs.oracle.com/chengfang/entry/glassfish_to_glassfish_remote_ejb

EJB FAQ . su glassfish

https://glassfish.java.net/javaee5/ejb/EJB_FAQ.html

https://glassfish.java.net/javaee5/ejb/#Docs

How do I “unit test” my EJB components?

https://glassfish.java.net/javaee5/ejb/EJB_FAQ.html#How_do_I_unit_test_my_EJB_components

What is the syntax for portable global JNDI names in EJB 3.1?

https://glassfish.java.net/javaee5/ejb/EJB_FAQ.html#What_is_the_syntax_for_portable_global_

I have a Remote EJB dependency (@EJB or <ejb-ref>) in my Java EE component.  How do I control which actual target EJB component it refers to?

https://glassfish.java.net/javaee5/ejb/EJB_FAQ.html#mappingRemoteejbdependency

————————————————————————————-

How do I access a Remote EJB (3.0 or 2.x) component from a non-Java EE web container like Tomcat or Resin?

https://glassfish.java.net/javaee5/ejb/EJB_FAQ.html#nonJavaEEwebcontainerRemoteEJB

————————————————

http://stackoverflow.com/questions/6361937/application-client-access-ejb-on-glassfish-via-a-remote-interface-can-i-do-it-v

https://community.oracle.com/thread/2379848?tstart=121

glkassfish:

Accessing the Naming Context

http://docs.oracle.com/cd/E18930_01/html/821-2418/beans.html

ciclidivita moduli per esempio di un singleton rmi

http://docs.oracle.com/cd/E18930_01/html/821-2418/beamc.html#scrolltoc

———————————–

Glassfish to glassfish

https://blogs.oracle.com/chengfang/entry/glassfish_to_glassfish_remote_ejb

——————————————————-

Application Client access EJB on Glassfish via a remote interface. Can I do it via local interface?

https://glassfish.java.net/javaee5/ejb/EJB_FAQ.html

chiamate remote ejb tra 2 istanze glassfsih standalone

https://glassfish.java.net/javaee5/ejb/EJB_FAQ.html#nonJavaEEwebcontainerRemoteEJB

https://glassfish.java.net/javaee5/ejb/EJB_FAQ.html#nonJavaEEwebcontainerRemoteEJB

stand-alone client style ejb 3.0 reference lookup fails from foreign web container

https://java.net/jira/browse/GLASSFISH-920

——————

How do I specify the Queue or Topic that a Message Driven Bean should consume from?

https://glassfish.java.net/javaee5/ejb/EJB_FAQ.html#mappingRemoteejbdependency

—————————————-

Creating and Running an Application Client on the GlassFish Server

https://netbeans.org/kb/docs/javaee/entappclient.html

————————————————————

JElastic

Remote Access to Enterprise Java Beans on GlassFish Server

http://blog.jelastic.com/2013/10/15/remote-access-to-enterprise-java-beans-on-glassfish-server/

http://jelastic.com/

——————————————————

tutorial-ejb-on-tutorialspoint.com

16 Oct

http://www.tutorialspoint.com/ejb/ejb_quick_guide.htm

tutorial ejb remoto in italiano

26 Sep

http://meow.altervista.org/blog/ejb-remote-lookup-tramite-nome-jndi-su-glassfish/

Launching-Application-Client-over-the-internet

26 Sep

http://glassfish.10926.n7.nabble.com/Launching-Application-Client-over-the-internet-td41798.html#a41807