Well, hmm,
the example you described should work ... SOAP-Bean calls JRMP bean, where
JRMP-bean
is looked up through JNDI ...
your trace however indicates that you seem to lookup the
SOAP-Bean through JNDI ?
unfortunately, I have not yet been able to test/commit those
parts my local source repository which contain the
serializable SoapInvocationHandler (including in-VM optimisation) that can
be
put into /looked up from JNDI (hence, the registration is disabled for
SOAP-beans at the moment).
Until then, there is only the possiblity to construct the client proxies
"manually" (as done in the test example).
I�m sorry ... the more I�m sorry, the earlier I will take some spare time to
do that pending commit (next week?) ... So please keep on asking!
CGJ
-----Urspr�ngliche Nachricht-----
Von: Douglas D. Dickinson [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 13. Februar 2001 22:44
An: jboss-user
Betreff: [jBoss-User] ZOAP xor JNDI issue
Fellow zoapers,
When I deploy EJBs with zoap-enabled SOAP interfaces,
it seems that I can no longer find them via JNDI look-ups.
If I disable ZOAP (by setting <configuration-name> to empty
in the .jar file's jboss.xml and changing nothing else), it works.
ie the JNDI calls work, and the method invocation
(getSubscriberID()) on the remote (EJB) Object returns
sucessfully.
I was expecting that the zoap-enabled EJBs would be
accessible by both the old (JNDI) and new (SOAP) methods.
I suppose it could be possible to:
- deploy bean B(configuration-name: none)
- deploy bean BZ(configuration-name: SOAP-enabled Stateless SessionBean)
where BZ simply looks up B via JNDI & calls it
...but this seems to go against the "zero effort" ideal of ZOAP :-)
Am I missing something here?
(Config/Log/Code details are included below)
Many thanks in advance,
DouglasDD
--
Douglas D. Dickinson =^..^= [EMAIL PROTECTED]
DETAILS:
########
JBOSS server log
[Auto deploy] Auto deploy of
file:/home/ddd/cvs-test/3rdParty/jboss/deploy/DDD.jar
[J2EE Deployer] Deploy J2EE application:
file:/home/ddd/cvs-test/3rdParty/jboss/deploy/DDD.jar
[J2EE Deployer] Create application DDD.jar
[J2EE Deployer] Installing EJB package: DDD.jar
[J2EE Deployer] Starting module DDD.jar
[Container factory]
Deploying:file:/home/ddd/cvs-test/3rdParty/jboss/bin/../tmp/deploy/DDD.jar/e
jb1002.jar
[Container factory] Deploying SSM
[Bean Cache] Cache policy scheduler started
[Container factory] Deployed application:
file:/home/ddd/cvs-test/3rdParty/jboss/bin/../tmp/deploy/DDD.jar/ejb1002.jar
[J2EE Deployer] J2EE application:
file:/home/ddd/cvs-test/3rdParty/jboss/deploy/DDD.jar is deployed.
CLIENT application log:
Starting
Got context
javax.naming.NameNotFoundException: ssm not bound
at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteC
all.java:245)
at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:295)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:279)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at clients.SSMClient.run(SSMClient.java:38)
at clients.SSMClient.main(SSMClient.java:108)
DDD.jar file's META-INF/jboss.xml:
<jboss>
<secure>true</secure>
<container-configurations>
<container-configuration
configuration-class="org.jboss.ejb.deployment.StatelessSessionContainerConfi
guration">
<container-name>SOAP-enabled Stateless
SessionBean</container-name>
<container-invoker>org.jboss.ejb.plugins.zoap.SoapContainerInvoker</containe
r-invoker>
<container-invoker-conf>
<ReadMetaData>false</ReadMetaData>
<MetaDataFileName></MetaDataFileName>
<BindingClass>org.zoap.soap.meta.builtin.DefaultBinding</BindingClass>
<SerialisationPolicyClass>org.zoap.xml.SerialisationPolicy$DefaultSerialisat
ionPolicy</SerialisationPolicyClass>
</container-invoker-conf>
<instance-pool>org.jboss.ejb.plugins.StatelessSessionInstancePool</instance-
pool>
<instance-cache></instance-cache>
<persistence-manager></persistence-manager>
<transaction-manager>org.jboss.tm.TxManager</transaction-manager>
<container-pool-conf>
<MaximumSize>100</MaximumSize>
<MinimumSize>10</MinimumSize>
</container-pool-conf>
</container-configuration>
</container-configurations>
<resource-managers />
<enterprise-beans>
<session>
<ejb-name>SSM</ejb-name>
<jndi-name>ssm/SSM</jndi-name>
<configuration-name></configuration-name>
<!-- WORKS: *empty* -->
<!-- FAILS: SOAP-enabled Stateless
SessionBean -->
</session>
</enterprise-beans>
</jboss>
CLIENT source:
import javax.naming.*;
import java.util.Hashtable;
import javax.rmi.PortableRemoteObject;
...
Hashtable h = new Hashtable();
h.put( "java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory" );
h.put( "java.naming.provider.url", "localhost:1099" );
System.out.println("Starting");
try {
InitialContext jndiContext = new InitialContext( h );
System.out.println("Got context");
// ### FAILS if EJB for SSM is Zoap-enabled... ###
Object ref = jndiContext.lookup("ssm/SSM");
System.out.println("Got reference");
SSMHome home = (SSMHome)
PortableRemoteObject.narrow (ref, SSMHome.class);
SSM ssm = home.create();
System.out.println("Subscriber ID for 'bob' is " +
ssm.getSubscriberId("bob") );
} catch(Exception e) {
e.printStackTrace();
}
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]