[JBoss Getting Started Documentation] - Re: Duke's Bank Example Problem
by rishianand
Peter,
Here's what I noticed on the console while bringing up the app server:
ObjectName: jboss.jca:service=LocalTxCM,name=DefaultDS
State: CONFIGURED
I Depend On:
jboss.jca:service=ManagedConnectionPool,name=DefaultDS
jboss.jca:service=CachedConnectionManager
jboss.security:service=JaasSecurityManager
jboss:service=TransactionManager
Depends On Me:
jboss.jca:service=DataSourceBinding,name=DefaultDS
ObjectName: jboss.jca:service=ManagedConnectionPool,name=DefaultDS
State: CONFIGURED
I Depend On:
jboss.jca:service=ManagedConnectionFactory,name=DefaultDS
Depends On Me:
jboss.jca:service=LocalTxCM,name=DefaultDS
ObjectName: jboss.jca:service=ManagedConnectionFactory,name=DefaultDS
State: CONFIGURED
I Depend On:
jboss:service=Hypersonic,database=localDB
jboss.jca:service=RARDeployment,name='jboss-local-jdbc.rar'
Depends On Me:
jboss.jca:service=ManagedConnectionPool,name=DefaultDS
ObjectName: jboss.jca:service=DataSourceBinding,name=DefaultDS
State: CONFIGURED
I Depend On:
jboss.jca:service=LocalTxCM,name=DefaultDS
jboss:service=invoker,type=jrmp
Depends On Me:
jboss.ejb:service=EJBTimerService,persistencePolicy=database
jboss:service=KeyGeneratorFactory,type=HiLo
jboss.mq:service=StateManager
jboss.mq:service=PersistenceManager
ObjectName: jboss.j2ee:service=EjbModule,module=bank-ejb.jar
State: FAILED
Reason: org.jboss.deployment.DeploymentException: Error: can't find data sourc
e: java:/DefaultDS; - nested throwable: (javax.naming.NameNotFoundException: Def
aultDS not bound)
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss:service=Hypersonic,database=localDB
State: NOTYETINSTALLED
Depends On Me:
jboss.jca:service=ManagedConnectionFactory,name=DefaultDS
ObjectName: jboss.j2ee:service=EjbModule,module=bank-ejb.jar
State: FAILED
Reason: org.jboss.deployment.DeploymentException: Error: can't find data sourc
e: java:/DefaultDS; - nested throwable: (javax.naming.NameNotFoundException: Def
aultDS not bound)
Rishi
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026479#4026479
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026479
19Â years, 1Â month
[JBossWS] - Problem using wstools
by d_pavel
Hi All,
I want to implement web services in my project which is a j2ee web application based on JBoss AS 4.0.5.GA and jbossws-1.2.0.GA.
I installed JBoss AS using "jems-installer-1.2.0.GA.jar" on RedHat Linux RHEL4 (using "all" as a profile for the AS). I bought the "JBoss at Work" book but it's using the sun's jwsdp tool. Since I'm using JBoss I want to leverage the wstools which comes with jbossws-1.2.0.GA.
I am trying to implement first the JSR-109 JAX-RPC Service Endpoints:
1) Here is my SEI:
| package generic.hello;
|
| import java.rmi.Remote;
| import java.rmi.RemoteException;
|
| public interface Service_SEI_Interface extends Remote
| {
|
| public String hello(String name) throws RemoteException;
|
| public String purchase (String person, String product) throws RemoteException;
|
| }
|
2)Here is my JSE:
| package generic.hello;
|
| /**
| *
| * @author dragos
| *
| * This class represents the Endpoint Implementation Bean (=our web service implementation).
| * JAX-RPC service endpoints (JSEs) provide web services from the web tier. They take the form of a simple
| * Java objects that masquerade as servlets. This case is implemented in this generic package.
| * In other specs this is reffer to as "Java Service Skeleton".
| */
| public class POJO_EndpointJSE
| {
| //ddd - insert all business methods that we provide and expose as web services
|
| public String hello(String name)
| {
| System.out.println("Hello There : " + name + "!");
| return "Hello There : " + name + "!";
| }
|
| public String purchase (String person, String product)
| {
| System.out.println("DDD_EndpointJSE purchase: " + person + "," + product);
| return "ok" + person + product;
| }
| }
|
3) the input configuration file (wstools-config.xml) for the wstools:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <!-- using this config file, wstools can generate the JSR-109 required number of deployment artifacts, which are:
| ? webservices.xml, the deployment descriptor that identifies a deployment of a web service endpoint
| ? wsdl, the abstract webservice contract
| ? jaxrpc-mapping.xml, the mapping desriptor that bridges WSDL to java -->
|
|
| <!-- RPC Style Endpoint -->
| <configuration xmlns="http://www.jboss.org/jbossws-tools">
| <java-wsdl>
| <!-- ddd The service element defines the interface our web service provides -->
| <service name="SampleService"
| style="rpc"
| endpoint="generic.hello.Service_SEI_Interface"/>
| <namespaces target-namespace="http://hello.generic/"
| type-namespace="http://hello.generic/types"/>
| <mapping file="jaxrpc-mapping.xml"/>
| <webservices servlet-link="HelloWorldWS"/>
| </java-wsdl>
| </configuration>
|
4)I am running WSTools from the command line like this:
/usr/local/jboss-4.0.5.GA/bin/wstools.sh -cp /home/dragos/SW/myeclipsews/testbenchWS/WebRoot/WEB-INF/classes/generic/hello/Service_SEI_Interface -config ./wstools-config.xml
5)Here is my web.xml file:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
| http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
| version="2.4">
|
| <!-- ddd declare a pseudo-servlet -->
|
| <servlet>
| <servlet-name>HelloWorldWS</servlet-name>
| <servlet-class>generic.hello.POJO_EndpointJSE</servlet-class>
| <load-on-startup>0</load-on-startup>
| </servlet>
|
| <!-- ddd :
| | 1) We declare our web service implementation class as a servlet and provide a servlet mapping
| | that will respond to the web service invocations
| | 2) The URL pattern in the servlet mapping is the only externally visible configuration element
| | = URL the web service lives at = will be primarily noticed as the location of the WSDL file for this service
| -->
|
| <servlet-mapping>
| <servlet-name>HelloWorldWS</servlet-name>
| <!-- url-pattern>/Service_SEI_Interface</url-pattern -->
| <url-pattern>/services/*</url-pattern>
| </servlet-mapping>
|
| </web-app>
|
6) Here is the output from the command line wstools:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
| http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
| version="2.4">
|
| <!-- ddd declare a pseudo-servlet -->
|
| <servlet>
| <servlet-name>HelloWorldWS</servlet-name>
| <servlet-class>generic.hello.POJO_EndpointJSE</servlet-class>
| <load-on-startup>0</load-on-startup>
| </servlet>
|
| <!-- ddd :
| | 1) We declare our web service implementation class as a servlet and provide a servlet mapping
| | that will respond to the web service invocations
| | 2) The URL pattern in the servlet mapping is the only externally visible configuration element
| | = URL the web service lives at = will be primarily noticed as the location of the WSDL file for this service
| -->
|
| <servlet-mapping>
| <servlet-name>HelloWorldWS</servlet-name>
| <!-- url-pattern>/Service_SEI_Interface</url-pattern -->
| <url-pattern>/services/*</url-pattern>
| </servlet-mapping>
|
| </web-app>
|
7)To me it looks like the parameters passed to anonymous wrote : handleJavaToWSDLGeneration(Configuration config, String outDir) are not instantiated properly cause I not see otherways why later I can't load the end point class. Here is the pertinent code from the ToolsHelper class:
| public void handleJavaToWSDLGeneration(Configuration config, String outDir) throws IOException
|
| jason.greene(a)jboss.com
|
|
|
| 97
|
| 89 {
| 90 JavaToWSDLConfig j2wc = config.getJavaToWSDLConfig(false);
| 91 JavaToWSDL jwsdl = new JavaToWSDL(Constants.NS_WSDL11);
| 92 jwsdl.setServiceName(j2wc.serviceName);
| 93 jwsdl.setTargetNamespace(j2wc.targetNamespace);
| 94 jwsdl.setTypeNamespace(j2wc.typeNamespace);
| 95 jwsdl.setOperationMap(j2wc.operations);
| 96
| 97 if ("document".equals(j2wc.wsdlStyle))
| 98 jwsdl.setStyle(Style.DOCUMENT);
| 99 else if ("rpc".equals(j2wc.wsdlStyle))
| 100 jwsdl.setStyle(Style.RPC);
|
| thomas.diesler(a)jboss.com
|
|
|
| 221
|
| 101 else throw new WSException("Unrecognized Style:" + j2wc.wsdlStyle);
|
| jason.greene(a)jboss.com
|
|
|
| 97
|
| 102
| 103 if ("wrapped".equals(j2wc.parameterStyle))
| 104 jwsdl.setParameterStyle(ParameterStyle.WRAPPED);
| 105 else if ("bare".equals(j2wc.parameterStyle))
| 106 jwsdl.setParameterStyle(ParameterStyle.BARE);
|
| thomas.diesler(a)jboss.com
|
|
|
| 221
|
| 107 else throw new WSException("Unrecognized Parameter Style:" + j2wc.parameterStyle);
|
| jason.greene(a)jboss.com
|
|
|
| 97
|
| 108
| 109 Class endpointClass = loadClass(j2wc.endpointName);
| 110
|
| thomas.diesler(a)jboss.com
|
|
|
| 221
|
| 111 if (endpointClass == null)
| 112 throw new WSException("Endpoint " + j2wc.endpointName + " cannot be loaded");
| ............
|
8) Any ideas about the endpoint class loading issue?
Thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026475#4026475
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026475
19Â years, 1Â month
[JBoss Messaging] - Re: 1.2.0.GA transparent node failover does not always work
by timfox
"bander" wrote :
| My test case does not know about the different nodes - it has simply requested multiple connections from the connection factory. It sounds like I'm not using the correct JBoss configuration for my test case. In the scenario where the messaging client had connected consumers to one node and producers to another node we would want JBoss Messaging to ensure the messages on the queues were distributed to the nodes with active consumers.
|
Basically JBM clustering needs to be tuned according to your application topology. Different types of applications have different requirements for load balancing and redistribution.
So first you need to determine what kind of application you have then tune based on that.
The most common use of clustering is a bank of servers with the same MDBs on each node. In such a case moving messages from one node to another is not required. It always makes sense to favour the local node. There are other topologies where there are more consumers on one node than another or consumers with different throughput on different nodes. In these cases redistribution can be configured.
There is a chapter in the user guide on this which I am going to expand upon in the future.
anonymous wrote :
| Ok - this is the more critical issue for us. I can break it consistently and within a very short time. For our testing we're using WinXP and JVM 1.4.2-b28. Which JVM are you using? Have you changed any of the configuration defaults?
|
I am using WinXP and JDK1.5 and all the default settings. The cruisecontrol run is using Linux on multi processor intel.
anonymous wrote :
| Obviously. I what I meant was that after shutting both nodes down for a period and then restarting one the test case should reconnect and start dispatching/receiving again. Shutting down both servers seemed to cause problems in the client i.e. it failed to detect that one of the nodes had been restarted.
The cluster requires at least one node to be up to remain a cluster. If all nodes fail then the clients will fail.
If you're expecting the client to keep on retrying if the *entire* cluster disappears in the hope it will eventually come up, then this is currently not supported. I'm not sure which other JMS providers support this either - JBoss MQ certainly doesn't.
Typically you would design the cluster with enough nodes such that the probability of all servers simultaneously failing is vanishingly small.
Client retrying is not something we normally consider under the banner of "clustering" - but we have a task for it which is due to be complete in 1.2.1. This feature would be useful in scenarios such as ATM machines or POS terminals where the connection to the "main office" is unstable.
If you feel this is an important feature then you can vote for and bump the priority of the feature request.
Right now we have a message bridge which is resilient to failure so you can always use this to bridge your "unstable" connection.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026473#4026473
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026473
19Â years, 1Â month