Re: [jboss-user] [jBPM] - Unable to load JBPM 4.3 in spring web application context
by Jaber C. Mourad
Jaber C. Mourad [http://community.jboss.org/people/newbeewan] replied to the discussion
"Unable to load JBPM 4.3 in spring web application context"
To view the discussion, visit: http://community.jboss.org/message/543974#543974
--------------------------------------------------------------
I've justed test it, remplacing my @PreDestroy annotation, I've got that messages :
2010-05-20 09:37:48,648 [INFO ] org.springframework.web.context.support.XmlWebApplicationContext - Closing Root WebApplicationContext: startup date [Thu May 20 09:36:59 CEST 2010]; root of context hierarchy
2010-05-20 09:37:48,648 [DEBUG] mypackage.internal.jbpm.ExtendedProcessEngine - ApplicationClosedEvent fired !
2010-05-20 09:37:48,648 [INFO ] mypackage.internal.jbpm.ExtendedProcessEngine - Terminating ProcessEngine !...2010-05-20 09:37:48,649 [INFO ] org.jbpm.pvm.internal.jobexecutor.DispatcherThread - inactive job dispatcher thread 'DispatcherThread' got interrupted
2010-05-20 09:37:48,649 [INFO ] org.jbpm.pvm.internal.jobexecutor.DispatcherThread - DispatcherThread leaves cyberspace
My "ExtendedProcessEngine" is only a wrapper implementing ProcessEngine and ApplicationListener
@Override
public void onApplicationEvent(ContextClosedEvent event) {
logger.info("Terminating ProcessEngine !...");
processEngine.close();
processEngine = null;
}
It doesn't help for reloading context :(
Any other idea ?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/543974#543974]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 1 month
[JBoss Web Services] - Using MutlipartInput via ClientRequest
by Kevin Moodley
Kevin Moodley [http://community.jboss.org/people/kevinmoodley] created the discussion
"Using MutlipartInput via ClientRequest"
To view the discussion, visit: http://community.jboss.org/message/543949#543949
--------------------------------------------------------------
Does anyone have an example of how to set up a request with MultipartInput using the ClientRequest class ?
I tried something like this - without success :
Client:
String url = http://localhost:8080/resteasy/test http://localhost:8080/resteasy/test
ClientRequest request = new ClientRequest(url);
Customer customer = new Customer("kmoodley");
StringBuilder resource = new StringBuilder(JAXBMarshall.marshall(customer));
User user = new User("kmoodley");
resource.append("SECURE_USER");
resource.append(JAXBMarshall.marshall(user));
Map<String, String> parameters = new HashMap<String, String>();
parameters.put("boundary", "SECURE_USER");
MediaType contentType = new MediaType("multipart",null,parameters);
MultipartInputImpl input = new MultipartInputImpl(contentType, ResteasyProviderFactory.getInstance());
ByteArrayInputStream bais = new ByteArrayInputStream(resource.toString().getBytes());
input.parse(bais);
request.body(contentType, input );
response = request.post();
The JAXBMarshall class is a utility class that marshalls classes annotated with @XmlRootElement into XML
Server:
@POST
@Path("/resteasy/test")
@Produces("application/xml")
@Consumes("multipart/mixed")
public String testMultipart(MultipartInput input) {
Customer customer = null;
User user = null;
for (InputPart part : input.getParts()){
try {
customer = part.getBody(Customer.class, null);
user = part.getBody(User.class, null);
} catch (IOException e) {
logger.error("Failed to get objects from multipart input");
return null;
}
}
....
return "SUCCESS";
}
Thanks
Kevin
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/543949#543949]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 1 month