[Management, JMX/JBoss] - Re: Local JNDI lookup in local JMX bean?
by nappinc
"nappinc" wrote :
| Note that the URL (wsdl.toExternalForm()) is jndi:/localhost/pegasus/WEB-INF/wsdl/gms.wsdl, and a little debug code in the JMX bean is able to open this URL as an InputStream and output all the WSDL file's contents.
|
| If I simply create a JAX-RPC Service instance without providing the wsdl URL, I get a "Unable to obtain Service Meta Data" error.
|
If I change using servlet-context relative URLs for an external URL (http://someserver:someport/blah?WSDL) - not really something I want to do but there you go - I can still successfully debug the contents of the WSDL file but I get an error related to a method in the WSDL that I'm not even calling:
| org.jboss.ws.WSException: Cannot obtain java type mapping for: {http://www.abm-uk.com/abmpegasus/v5.0/gms}>Search
| at org.jboss.ws.deployment.JSR109MetaDataBuilder.buildParameterMetaDataDoc(JSR109MetaDataBuilder.java:451)
| at org.jboss.ws.deployment.JSR109MetaDataBuilder.setupOperationsFromWSDL(JSR109MetaDataBuilder.java:200)
| at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaDataInternal(JSR109ClientMetaDataBuilder.java:208)
| at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:126)
| at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:82)
| at org.jboss.ws.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:96)
| at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
| at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:128)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049263#4049263
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049263
18 years, 10 months
[Clustering/JBoss] - Re: JBoss clustering - ejb lookup using HA-JNDI problem
by shribala
Here is the client program for the same..
import javax.naming.Context;
import javax.naming.*;
import javax.rmi.*;
import java.util.*;
import com.arbitron.ppm.ops.sampling.*;
class CalculatorClient {
public static void main(String args[]) throws Exception {
CalculatorClient t = new CalculatorClient();
t.go();
}
public void go() throws Exception {
Context ctx = getContextExternalClient();
CalculatorHome calculatorHome = (CalculatorHome) PortableRemoteObject.narrow(ctx.lookup("Calculator"), CalculatorHome.class);
Calculator calculator = calculatorHome.create();
String answer = calculator.add(234, 555);
System.out.println("answer : "+ answer);
}
private Context getContextExternalClient() throws Exception {
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
p.put(Context.PROVIDER_URL, "jnp://10.239.20.193:1100");
p.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
Context ctx = new InitialContext(p);
return ctx;
}
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049259#4049259
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049259
18 years, 10 months
[Clustering/JBoss] - JBoss clustering - ejb lookup using HA-JNDI problem
by shribala
I am getting the following exception when I try to invoke a clustered EJB from a remote java client.
The same program works when I invoke through the port 1099, but not through 1100..
Please let me know where the problem is.
1. Exception trace::
Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: 10.239.20.193:11
00 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeo
utException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server 10.239.20.193:
1100 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 10.239.20.193:1100 [Root exception i
s java.net.ConnectException: Connection refused: connect]]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1414)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:594)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at CalculatorClient.go(CalculatorClient.java:17)
at CalculatorClient.main(CalculatorClient.java:11)
Caused by: javax.naming.CommunicationException: Failed to connect to server 10.239.20.193:1100 [Root exception is javax.naming.Ser
viceUnavailableException: Failed to connect to server 10.239.20.193:1100 [Root exception is java.net.ConnectException: Connection
refused: connect]]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:269)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1385)
... 5 more
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server 10.239.20.193:1100 [Root exception is java.net.Co
nnectException: Connection refused: connect]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:243)
... 6 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:516)
at java.net.Socket.connect(Socket.java:466)
at java.net.Socket.(Socket.java:366)
at java.net.Socket.(Socket.java:266)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:239)
... 6 more
2. Setting changes I had done.:
cluster-service.xml (I havent made any changes in cluster-service.xml and its present with the default values)
<!-- Name of the partition being built -->
${jboss.partition.name:DefaultPartition}
<!-- The address used to determine the node name -->
${jboss.bind.address}
<!-- Determine if deadlock detection is enabled -->
False
<!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->
30000
<!-- The JGroups protocol configuration -->
HA JNDI entries:
----------------
<!-- We now inject the partition into the HAJNDI service instead
of requiring that the partition name be passed -->
<depends optional-attribute-name="ClusterPartition"
proxy-type="attribute">jboss:service=${jboss.partition.name:DefaultPartition}
<!-- Bind address of bootstrap and HA-JNDI RMI endpoints -->
${jboss.bind.address}
<!-- Port on which the HA-JNDI stub is made available -->
1100
<!-- RmiPort to be used by the HA-JNDI service once bound. 0 => auto. -->
1101
<!-- Accept backlog of the bootstrap socket -->
50
<!-- The thread pool service used to control the bootstrap and
auto discovery lookups -->
<depends optional-attribute-name="LookupPool"
proxy-type="attribute">jboss.system:service=ThreadPool
<!-- A flag to disable the auto discovery via multicast -->
false
<!-- Set the auto-discovery bootstrap multicast bind address. If not
specified and a BindAddress is specified, the BindAddress will be used. -->
${jboss.bind.address}
<!-- Multicast Address and group port used for auto-discovery -->
${jboss.partition.udpGroup:230.0.0.4}
1102
<!-- The TTL (time-to-live) for autodiscovery IP multicast packets -->
16
<!-- The load balancing policy for HA-JNDI -->
org.jboss.ha.framework.interfaces.RoundRobin
<!-- Client socket factory to be used for client-server
RMI invocations during JNDI queries
custom
-->
<!-- Server socket factory to be used for client-server
RMI invocations during JNDI queries
custom
-->
3. jboss.xml changes:
<ejb-name>Calculator</ejb-name>
<jndi-name>Calculator</jndi-name>
True
<cluster-config>
<partition-name>DefaultPartition</partition-name>
<home-load-balance-policy>
org.jboss.ha.framework.interfaces.RoundRobin
</home-load-balance-policy>
<bean-load-balance-policy>
org.jboss.ha.framework.interfaces.RoundRobin
</bean-load-balance-policy>
</cluster-config>
<configuration-name>
Standard Stateless SessionBean
</configuration-name>
<resource-ref>
<res-ref-name>jdbc/PPM</res-ref-name>
<jndi-name>java:/EntityMedia</jndi-name>
</resource-ref>
<method-attributes>
<method-name>*</method-name>
<transaction-timeout>3600</transaction-timeout>
</method-attributes>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049257#4049257
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049257
18 years, 10 months