[JBoss Web Services] New message: "Re: JBoss 5.0.1 for jdk 1.6 web services configuration"
by Gorkem Turan
User development,
A new message was posted in the thread "JBoss 5.0.1 for jdk 1.6 web services configuration":
http://community.jboss.org/message/519004#519004
Author : Gorkem Turan
Profile : http://community.jboss.org/people/gturan@acm-software.com
Message:
--------------------------------------------------------------
Saaj.jar file comes with jboss 5.x. That is under jboss->lib->endorsed . In some forms I saw addinglines to jboss launch config;
-Djava.endorsed.dirs=$JBOSS_HOME_5/lib/endorsed
-Dsun.lang.ClassLoader.allowArraySyntax=true
Which did not help. I changed jboss 5.0.1 jdk to 5.1.0 jdk also did not help.
The file I try calling the service is below. (and the amazon web service jar file is under the WEB-INF->lib of the project folder.)
import java.util.List;
import javax.xml.ws.Holder;
import javax.xml.ws.WebServiceRef;
import com.corejsf.amazon.AWSECommerceService;
import com.corejsf.amazon.AWSECommerceServicePortType;
import com.corejsf.amazon.Item;
import com.corejsf.amazon.ItemSearchRequest;
import com.corejsf.amazon.Items;
public class AuthorSearchBean {
@WebServiceRef(wsdlLocation
="http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl")
private AWSECommerceService service;
private String name;
private List<Item> response;
private String accessKey;
public String getName() { return name; }
public void setName(String newValue) { name = newValue; }
public void setAccessKey(String newValue) { accessKey = newValue; }
public String search() {
try {
AWSECommerceServicePortType port = service.getAWSECommerceServicePort();
ItemSearchRequest request = new ItemSearchRequest();
request.getResponseGroup().add("ItemAttributes");
request.setSearchIndex("Books");
request.setAuthor(name);
Holder<List<Items>> responseHolder = new Holder<List<Items>>();
port.itemSearch("", accessKey, "", "", "", "", request, null, null,
responseHolder);
response=responseHolder.value.get(0).getItem();
return "success";
} catch(Exception e) {
e.printStackTrace();
return "failure";
}
}
public List<Item> getResponse() { return response; }
}
Actually this is web service demo application I got from http://horstmann.com/corejsf/
Under source code ch10->amazon is what I am trying to run.
Thanks for the reply.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/519004#519004
14 years, 4 months
[jBPM] New message: "Re: How to terminate a forked process"
by Jas Lam
User development,
A new message was posted in the thread "How to terminate a forked process":
http://community.jboss.org/message/519000#519000
Author : Jas Lam
Profile : http://community.jboss.org/people/lamj1
Message:
--------------------------------------------------------------
In fact, my code is somewhat irrelevant. It is more like how to terminate a forked process while it is still active? without causing exception and ensure the database entities are cleaned up gracefully.
Junit code:
public void testForking()
{
ProcessInstance processInstance = workflowManager.startProcess("ForkSubProcess");
String pid = processInstance.getId();
//sleep to allow fork to create task before querying it
try {Thread.sleep(2000);} catch(Exception e){}
//verify that there are two outstanding tasks assign to testUser
List<Task> taskList = taskService.findPersonalTasks("testUser");
assertEquals(2, taskList.size());
//attempt to ends all processes, while they are still active
workflowManager.endAll();
}
public void endAll()
{
ProcessInstanceQuery query = executionService.createProcessInstanceQuery();
List<ProcessInstance> listPI = query.list();
for(ProcessInstance processInstance : listPI)
{
//using execution service to end
//1. cause a child record found error - if this is the parent process
//2. cause a null pointer exception - if this is the forked process
// For the second case, I traced the code and found out that endProcessInstance method
// query for the processInstanceid with a where clause parents == null
// <query name="findProcessInstanceById">
// <![CDATA[
// select processInstance
// from org.jbpm.pvm.internal.model.ExecutionImpl as processInstance
// where processInstance.id = :processInstanceId
// and processInstance.parent is null
// and processInstance.state != 'suspended'
// ]]>
// </query>
executionService.endProcessInstance(processInstance.getId(), "active");
//OR
//i also tried this - unit test quit after this. Nothing was done
((ExecutionImpl) processInstance).end();
}
}
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/519000#519000
14 years, 4 months
[EJB 3.0] New message: "Re: Persistence unit issues when migrating to JBOSS 5.1.0"
by jaikiran pai
User development,
A new message was posted in the thread "Persistence unit issues when migrating to JBOSS 5.1.0":
http://community.jboss.org/message/518990#518990
Author : jaikiran pai
Profile : http://community.jboss.org/people/jaikiran
Message:
--------------------------------------------------------------
> dbobes wrote:
>
> I find it strange that I have to create an empty jar just to place persistence.xml at the root level of the ear.
> Is there a better way to accomplish this?
>
> Thanks,
> Dragos
Place the persistence.xml in the META-INF of the .ear.
So:
myapp.ear
|
|--- META-INF
| |
| |--- persistence.xml
And let the persistence.xml use the "jar-file" element to point to the jars containing the entities. This is how the EJB3 persistence spec lets EAR level persistence.xml to be deployed. For more details, see section 6.2 of EJB3 Persistence spec.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/518990#518990
14 years, 4 months