[Clustering/JBoss] - Re: Clustering and Load Balancing in Jboss-4.0.2 using Apach
by chillal.kishor
GREAT solution sir...it works....As per your suggestions, i commented a line in the code. Now its not displaying the error.
I changed CacheMode to REPL_SYNC in tc5-cluster-service.xml to check whether session is replicating or not. It waits for sometime and displays following in node1....
14:01:53,218 WARN [ReplicationInterceptor] runPreparePhase() failed. Transaction is marked as rolled back
org.jboss.cache.lock.TimeoutException: rsp=sender=kishor:2283, retval=null, received=false, suspected=false
at org.jboss.cache.TreeCache.callRemoteMethods(TreeCache.java:2186)
at org.jboss.cache.TreeCache.callRemoteMethods(TreeCache.java:2208)
at org.jboss.cache.interceptors.ReplicationInterceptor.runPreparePhase(ReplicationInterceptor.java:485)
at org.jboss.cache.interceptors.ReplicationInterceptor$SynchronizationHandler.beforeCompletion(ReplicationInterceptor.java:389)
at org.jboss.cache.interceptors.OrderedSynchronizationHandler.beforeCompletion(OrderedSynchronizationHandler.java:77)
at org.jboss.tm.TransactionImpl.doBeforeCompletion(TransactionImpl.java:
What could be the reason? Done the settings are per the site...
http://www.jboss.org/developers/projects/jboss/tc5-clustering.html
waiting for reply..
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039155#4039155
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039155
19 years
[JBoss jBPM] - Re: Can't deploy my BPEL process to jBPM BPEL 1.1 Beta3
by agusgr
Hi,
Now you have the bpel process running in the server, but not as a web service. The next steps are:
1.- Create the wsdl files to interact whit the process. You have to run the ant task: ant generate-service.
2.- Create the "artifacts" to interact whit the process. You have to run the ant task: ant generate-artifacts.
3.- Deploy the web service to interact whit the process. You have to run the ant task: ant deploy.
To the first step you don't need any file, only run the ant task. It generates some wsdl files in the target folder.
To the second step you need the wscompile.xml file. It's a file with the configuaration settings to the wscompile tool. It generates the java classes that your web service uses.
To the third step you need:
-web.xml
-webservices.xml
-bpel-application.xml
-A class that implements the interface generated in the second step.
You have more information in the user guide, there are some examples. It's in \jbpm-bpel-1.1.Beta3\doc\userguide.
Try to do it, and post your problems.
Regards,
Agus
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039151#4039151
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039151
19 years
[JBossWS] - Re: Cannot obtain java type mapping for: {http://org.mazurek
by sandello
What I should do to connect some public webservice in the Internet (like http://www.webservicex.net/WCF/ServiceDetails.aspx?SID=48)?
I create small client method:
| @Test
| public void weather() {
| QName serviceQName = new QName("http://www.webserviceX.NET", "GlobalWeather");
|
| try {
| ServiceFactory factory = ServiceFactory.newInstance();
| assertNotNull(factory);
|
| String endpoint = "http://www.webservicex.net/globalweather.asmx?wsdl";
| URL url = new URL(endpoint);
| assertNotNull(url);
|
| Service service = factory.createService(url, serviceQName);
| assertNotNull(service);
|
| Call call = service.createCall();
|
| QName methodQName = new QName("http://www.webserviceX.NET", "GetWeather");
| call.setOperationName(methodQName);
| assertFalse(call.isParameterAndReturnSpecRequired(methodQName));
|
| call.setTargetEndpointAddress(endpoint);
|
| QName typeName = call.getPortTypeName();
| assertNotNull(typeName);
|
| System.out.println(typeName);
|
| call.invoke(new Object[] {"London", "UK"});
|
|
| } catch (Exception e) {
| e.printStackTrace(); File | Settings | File Templates.
| }
| }
|
When I try to execute this I receive exception:
| org.jboss.ws.WSException: Cannot obtain java type mapping for: {http://www.webserviceX.NET}>GetWeather
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.processDocElement(JAXRPCMetaDataBuilder.java:627)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.buildParameterMetaDataDoc(JAXRPCMetaDataBuilder.java:886)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.setupOperationsFromWSDL(JAXRPCMetaDataBuilder.java:214)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaDataInternal(JAXRPCClientMetaDataBuilder.java:216)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:133)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:85)
| at org.jboss.ws.core.jaxrpc.client.ServiceImpl.<init>(ServiceImpl.java:111)
| at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
| at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:128)
| at com.company.ws.client.TestWS.weather(TestWS.java:131)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
| at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
| at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
| at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
| at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
| at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:71)
| at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
| at
|
Where I should get jaxrpc-mapping.xml for this public ws?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039148#4039148
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039148
19 years
[JBoss Seam] - Re: Webservices ETA?
by szaccaria
Sorry Shane if I disturb you again but is rare found people that answer so fast in the forums, believe me this is very appreciated!
I've another questions about ws and seam...
1) You wrote to me that the ws is only support in CVS, therefore I must to check out and compile from CSV or is sufficiente that I down load the night build ?
2) I've take a look in to the "seambay" examples be present in to CVS. This example, call a object that is annotating with seam tag from a ws class...
package org.jboss.seam.example.seambay;
|
| import javax.ejb.Stateless;
| import javax.jws.WebMethod;
| import javax.jws.WebService;
|
| import org.jboss.seam.Component;
| import org.jboss.seam.core.Manager;
| import org.jboss.seam.security.Identity;
|
| @Stateless
| @WebService
| public class AuctionService implements AuctionServiceRemote
| {
| @WebMethod
| public boolean login(String username, String password)
| {
| Identity.instance().setUsername(username);
| Identity.instance().setPassword(password);
| Identity.instance().login();
| return Identity.instance().isLoggedIn();
| }
|
| @WebMethod
| public boolean logout()
| {
| Identity.instance().logout();
| return !Identity.instance().isLoggedIn();
| }
|
| @WebMethod
| public Category[] listCategories()
| {
| CategoryAction catAction = (CategoryAction) Component.getInstance(
| CategoryAction.class, true);
|
| catAction.loadCategories();
|
| return catAction.getCategories().toArray(new Category[catAction.getCategories().size()]);
| }
|
| @WebMethod
| public Integer createAuction(String title, String description, int categoryId)
| {
| AuctionAction action = (AuctionAction) Component.getInstance(AuctionAction.class, true);
|
| action.createAuction();
| action.setDetails(title, description, categoryId);
|
| return action.getAuction().getAuctionId();
| }
|
| @WebMethod
| public Auction getNewAuctionDetails(int auctionId)
| {
| AuctionAction action = (AuctionAction) Component.getInstance(AuctionAction.class, true);
|
| action.editAuction(auctionId);
|
| // TODO remove the auction image from the result
|
| return action.getAuction();
| }
|
| @WebMethod
| public void updateAuction(int auctionId, String title, String description, int categoryId)
| {
| AuctionAction action = (AuctionAction) Component.getInstance(AuctionAction.class, true);
|
| action.editAuction(auctionId);
| action.setDetails(title, description, categoryId);
| }
|
| @WebMethod
| public void setAuctionDuration(int auctionId, int days)
| {
| Manager.instance().restoreConversation("" + auctionId);
| AuctionAction action = (AuctionAction) Component.getInstance(AuctionAction.class, true);
|
| action.setDuration(days);
| }
|
| @WebMethod
| public void confirmAuction(int auctionId)
| {
| AuctionAction action = (AuctionAction) Component.getInstance(AuctionAction.class, true);
|
| action.confirm();
| }
|
| @WebMethod
| public Auction[] findAuctions(String searchTerm)
| {
| AuctionSearchAction search = (AuctionSearchAction) Component.getInstance(
| AuctionSearchAction.class, true);
|
| search.setSearchTerm(searchTerm);
| search.queryAuctions();
|
| return search.getAuctions().toArray(new Auction[search.getAuctions().size()]);
| }
| }
|
where AuctionAction is
| package org.jboss.seam.example.seambay;
|
| import static org.jboss.seam.ScopeType.CONVERSATION;
|
| import java.io.Serializable;
| import java.util.Calendar;
| import java.util.GregorianCalendar;
|
| import javax.persistence.EntityManager;
|
| import org.jboss.seam.annotations.Begin;
| import org.jboss.seam.annotations.End;
| import org.jboss.seam.annotations.In;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.annotations.Scope;
| import org.jboss.seam.annotations.security.Restrict;
|
| @Scope(CONVERSATION)
| @Name("auctionAction")
| @Restrict("#{identity.loggedIn}")
| public class AuctionAction implements Serializable
| {
| private static final long serialVersionUID = -6738397725125671313L;
|
| @In EntityManager entityManager;
|
| @In Account authenticatedAccount;
|
| private Auction auction;
|
| private int durationDays;
|
| @Begin
| public void createAuction()
| {
| auction = new Auction();
| auction.setAccount(authenticatedAccount);
| auction.setStatus(Auction.STATUS_UNLISTED);
| entityManager.persist(auction);
| }
|
| @Begin(join = true)
| public void editAuction(Integer auctionId)
| {
| auction = entityManager.find(Auction.class, auctionId);
| }
|
| public void setDetails(String title, String description, int categoryId)
| {
| auction.setTitle(title);
| auction.setDescription(description);
| auction.setCategory(entityManager.find(Category.class, categoryId));
| }
|
| public void setDuration(int days)
| {
| this.durationDays = days;
| }
|
| @End
| public void confirm()
| {
| Calendar cal = new GregorianCalendar();
| cal.add(Calendar.DAY_OF_MONTH, durationDays);
| auction.setEndDate(cal.getTime());
| auction.setStatus(Auction.STATUS_LIVE);
| auction = entityManager.merge(auction);
| }
|
| public Auction getAuction()
| {
| return auction;
| }
| }
So, if in the same manner, I call a class annotating with seam tag inherent jbpm, why this not will function ?
Thanks again
Stefano
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039147#4039147
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039147
19 years