Re: [jboss-user] [Beginner's Corner] - web app online
by Peter Johnson
Peter Johnson [http://community.jboss.org/people/peterj] replied to the discussion
"web app online"
To view the discussion, visit: http://community.jboss.org/message/558174#558174
--------------------------------------------------------------
So what you are trying to do is let people access the JBoss AS running on your PC. How do you connect to the internet? What does your home network look like? What kind of firewalls does your internet provider (ISP) have in place? Essentially, you want to open the firewalls in your ISP and your local router (if any) so that anyone accesing port 8080 can get to your machine. Personally, I would set up a seperate computer that hosts JBoss AS, and place that computer in front of my router. (I could provide a quick diagram, but I have a meeting to attend)
By the way, you can purchase a small server configuration from Amazon's EC2 for about %0.10 per hour which works out to about $72USD a month, much less that the 200Euro the hosting company charges.
Also, what kind of apps are you writting? If mainly serverlet/JSF then perhaps Goosle's AppEngine might be a better approach. They let you host your app and as long as it doesn't exceed a certain threshold (and the threshold is fairly high) then it is free.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/558174#558174]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 1 month
Re: [jboss-user] [jBPM] - Visualize workflow and it's current state
by Eugene Dzhurinsky
Eugene Dzhurinsky [http://community.jboss.org/people/jdevelop] replied to the discussion
"Visualize workflow and it's current state"
To view the discussion, visit: http://community.jboss.org/message/558152#558152
--------------------------------------------------------------
Well, in the meantime I tried to implement generation of an image after workflow is deployed.
I tried to get image with the following code:
NewDeployment deployment = repositoryService.createDeployment();
String name = workflow.getName().replaceAll(" ", "_");
String key = deployment.addResourceFromString(
name + "_" + workflow.getVersion() + ".jpdl.xml",
workflowSerializer.serialize(workflow)).deploy();
ProcessDefinitionQuery pdq = repositoryService
.createProcessDefinitionQuery();
List<ProcessDefinition> processDefinitions = pdq.processDefinitionKey(
key).list();
for (ProcessDefinition pd : processDefinitions) {
String imageName = pd.getImageResourceName();
File f = new File("/home/bofh/" + imageName);
try {
FileOutputStream fos = new FileOutputStream(f);
System.out.println("Created file " + f.getAbsolutePath());
InputStream imageInputStream = repositoryService
.getResourceAsStream(pd.getDeploymentId(), imageName);
byte[] buffer = new byte[10240];
int read = 0;
while ((read = imageInputStream.read(buffer)) > 0) {
fos.write(buffer, 0, read);
}
fos.flush();
fos.close();
imageInputStream.close();
} catch (Exception e) {
e.printStackTrace();
}
}
However the name of image at line
String imageName = pd.getImageResourceName();
is always null, which causes NPE on getting the actual image stream
Am I missing something?
Thank you in advance!
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/558152#558152]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 1 month