[JBoss Seam] - Re: Timers from previous deployments are still persistent
by markfoerstein
tuxzilla, I'm doing exactly the same thing, and having the same problem.
Take a look at your \JBOSS_HOME\server\default\data\hypersonic dir. You will find a file named localDB.log
Open this file. You will see something like this:
| After the first deploy:
| INSERT INTO TIMERS VALUES('1','[target=jboss.j2ee:service=EJB3,ear=consultoria.ear,jar=jboss-seam.jar,name=Dispatcher]','2007-06-14 18:18:35.732000000',30000,NULL,'aced0005737200356f72672e6a626f73732e7365616d2e636f72652e44697370617463686572244173796e6368726f6e6f7573496e766f636174696f6e670f265d0e3c68ee0200045b000861726754797065737400125b4c6a6176612f6c616e672f436c6173733b5b0004617267737400135b4c6a6176612f6c616e672f4f626a6563743b4c000d636f6d706f6e656e744e616d657400124c6a6176612f6c616e672f537472696e673b4c000a6d6574686f644e616d6571007e00037872002b6f72672e6a626f73732e7365616d2e636f72652e44697370617463686572244173796e6368726f6e6f7573f8597006e73beecb0200024c000970726f6365737349647400104c6a6176612f6c616e672f4c6f6e673b4c00067461736b496471007e000578707070757200125b4c6a6176612e6c616e672e436c6173733bab16d7aecbcd5a99020000787000000002767200046c6f6e670000000000000000000000787071007e000a757200135b4c6a6176612e6c616e672e4f626a6563743b90ce589f1073296c0200007870000000027372000e6a6176612e6c616e672e4c6f6e673b8be490cc8f23df0200014a000576616c7565787200106a6176612e6c616e672e4e756d62657286ac951d0b94e08b0200007870000000000000ea607371007e000d000000000000753074000e7370686368614f627365727665727400076f627365727665')
| COMMIT
| SET AUTOCOMMIT TRUE
|
| When you redeploy:
| DELETE FROM TIMERS WHERE TIMERID='1' AND TARGETID='[target=jboss.j2ee:service=EJB3,ear=consultoria.ear,jar=jboss-seam.jar,name=Dispatcher]'
| INSERT INTO TIMERS VALUES('2','[target=jboss.j2ee:service=EJB3,ear=consultoria.ear,jar=jboss-seam.jar,name=Dispatcher]','2007-06-14 18:18:35.732000000',30000,NULL,'aced0005737200356f72672e6a626f73732e7365616d2e636f72652e44697370617463686572244173796e6368726f6e6f7573496e766f636174696f6e670f265d0e3c68ee0200045b000861726754797065737400125b4c6a6176612f6c616e672f436c6173733b5b0004617267737400135b4c6a6176612f6c616e672f4f626a6563743b4c000d636f6d706f6e656e744e616d657400124c6a6176612f6c616e672f537472696e673b4c000a6d6574686f644e616d6571007e00037872002b6f72672e6a626f73732e7365616d2e636f72652e44697370617463686572244173796e6368726f6e6f7573f8597006e73beecb0200024c000970726f6365737349647400104c6a6176612f6c616e672f4c6f6e673b4c00067461736b496471007e000578707070757200125b4c6a6176612e6c616e672e436c6173733bab16d7aecbcd5a99020000787000000002767200046c6f6e670000000000000000000000787071007e000a757200135b4c6a6176612e6c616e672e4f626a6563743b90ce589f1073296c0200007870000000027372000e6a6176612e6c616e672e4c6f6e673b8be490cc8f23df0200014a000576616c7565787200106a6176612e6c616e672e4e756d62657286ac951d0b94e08b0200007870000000000000ea607371007e000d000000000000753074000e7370686368614f627365727665727400076f627365727665')
| SET AUTOCOMMIT FALSE
| INSERT INTO TIMERS VALUES('3','[target=jboss.j2ee:service=EJB3,ear=consultoria.ear,jar=jboss-seam.jar,name=Dispatcher]','2007-06-14 18:20:18.230000000',30000,NULL,'aced0005737200356f72672e6a626f73732e7365616d2e636f72652e44697370617463686572244173796e6368726f6e6f7573496e766f636174696f6e670f265d0e3c68ee0200045b000861726754797065737400125b4c6a6176612f6c616e672f436c6173733b5b0004617267737400135b4c6a6176612f6c616e672f4f626a6563743b4c000d636f6d706f6e656e744e616d657400124c6a6176612f6c616e672f537472696e673b4c000a6d6574686f644e616d6571007e00037872002b6f72672e6a626f73732e7365616d2e636f72652e44697370617463686572244173796e6368726f6e6f7573f8597006e73beecb0200024c000970726f6365737349647400104c6a6176612f6c616e672f4c6f6e673b4c00067461736b496471007e000578707070757200125b4c6a6176612e6c616e672e436c6173733bab16d7aecbcd5a99020000787000000002767200046c6f6e670000000000000000000000787071007e000a757200135b4c6a6176612e6c616e672e4f626a6563743b90ce589f1073296c0200007870000000027372000e6a6176612e6c616e672e4c6f6e673b8be490cc8f23df0200014a000576616c7565787200106a6176612e6c616e672e4e756d62657286ac951d0b94e08b0200007870000000000000ea607371007e000d000000000000753074000e7370686368614f627365727665727400076f627365727665')
| COMMIT
| SET AUTOCOMMIT TRUE
|
| When you redeploy again:
| DELETE FROM TIMERS WHERE TIMERID='2' AND TARGETID='[target=jboss.j2ee:service=EJB3,ear=consultoria.ear,jar=jboss-seam.jar,name=Dispatcher]'
| DELETE FROM TIMERS WHERE TIMERID='3' AND TARGETID='[target=jboss.j2ee:service=EJB3,ear=consultoria.ear,jar=jboss-seam.jar,name=Dispatcher]'
| INSERT INTO TIMERS VALUES('4','[target=jboss.j2ee:service=EJB3,ear=consultoria.ear,jar=jboss-seam.jar,name=Dispatcher]','2007-06-14 18:18:35.732000000',30000,NULL,'aced0005737200356f72672e6a626f73732e7365616d2e636f72652e44697370617463686572244173796e6368726f6e6f7573496e766f636174696f6e670f265d0e3c68ee0200045b000861726754797065737400125b4c6a6176612f6c616e672f436c6173733b5b0004617267737400135b4c6a6176612f6c616e672f4f626a6563743b4c000d636f6d706f6e656e744e616d657400124c6a6176612f6c616e672f537472696e673b4c000a6d6574686f644e616d6571007e00037872002b6f72672e6a626f73732e7365616d2e636f72652e44697370617463686572244173796e6368726f6e6f7573f8597006e73beecb0200024c000970726f6365737349647400104c6a6176612f6c616e672f4c6f6e673b4c00067461736b496471007e000578707070757200125b4c6a6176612e6c616e672e436c6173733bab16d7aecbcd5a99020000787000000002767200046c6f6e670000000000000000000000787071007e000a757200135b4c6a6176612e6c616e672e4f626a6563743b90ce589f1073296c0200007870000000027372000e6a6176612e6c616e672e4c6f6e673b8be490cc8f23df0200014a000576616c7565787200106a6176612e6c616e672e4e756d62657286ac951d0b94e08b0200007870000000000000ea607371007e000d000000000000753074000e7370686368614f627365727665727400076f627365727665')
| INSERT INTO TIMERS VALUES('5','[target=jboss.j2ee:service=EJB3,ear=consultoria.ear,jar=jboss-seam.jar,name=Dispatcher]','2007-06-14 18:20:18.230000000',30000,NULL,'aced0005737200356f72672e6a626f73732e7365616d2e636f72652e44697370617463686572244173796e6368726f6e6f7573496e766f636174696f6e670f265d0e3c68ee0200045b000861726754797065737400125b4c6a6176612f6c616e672f436c6173733b5b0004617267737400135b4c6a6176612f6c616e672f4f626a6563743b4c000d636f6d706f6e656e744e616d657400124c6a6176612f6c616e672f537472696e673b4c000a6d6574686f644e616d6571007e00037872002b6f72672e6a626f73732e7365616d2e636f72652e44697370617463686572244173796e6368726f6e6f7573f8597006e73beecb0200024c000970726f6365737349647400104c6a6176612f6c616e672f4c6f6e673b4c00067461736b496471007e000578707070757200125b4c6a6176612e6c616e672e436c6173733bab16d7aecbcd5a99020000787000000002767200046c6f6e670000000000000000000000787071007e000a757200135b4c6a6176612e6c616e672e4f626a6563743b90ce589f1073296c0200007870000000027372000e6a6176612e6c616e672e4c6f6e673b8be490cc8f23df0200014a000576616c7565787200106a6176612e6c616e672e4e756d62657286ac951d0b94e08b0200007870000000000000ea607371007e000d000000000000753074000e7370686368614f627365727665727400076f627365727665')
| SET AUTOCOMMIT FALSE
| INSERT INTO TIMERS VALUES('6','[target=jboss.j2ee:service=EJB3,ear=consultoria.ear,jar=jboss-seam.jar,name=Dispatcher]','2007-06-14 18:39:02.897000000',30000,NULL,'aced0005737200356f72672e6a626f73732e7365616d2e636f72652e44697370617463686572244173796e6368726f6e6f7573496e766f636174696f6e670f265d0e3c68ee0200045b000861726754797065737400125b4c6a6176612f6c616e672f436c6173733b5b0004617267737400135b4c6a6176612f6c616e672f4f626a6563743b4c000d636f6d706f6e656e744e616d657400124c6a6176612f6c616e672f537472696e673b4c000a6d6574686f644e616d6571007e00037872002b6f72672e6a626f73732e7365616d2e636f72652e44697370617463686572244173796e6368726f6e6f7573f8597006e73beecb0200024c000970726f6365737349647400104c6a6176612f6c616e672f4c6f6e673b4c00067461736b496471007e000578707070757200125b4c6a6176612e6c616e672e436c6173733bab16d7aecbcd5a99020000787000000002767200046c6f6e670000000000000000000000787071007e000a757200135b4c6a6176612e6c616e672e4f626a6563743b90ce589f1073296c0200007870000000027372000e6a6176612e6c616e672e4c6f6e673b8be490cc8f23df0200014a000576616c7565787200106a6176612e6c616e672e4e756d62657286ac951d0b94e08b0200007870000000000000ea607371007e000d000000000000753074000e7370686368614f627365727665727400076f627365727665')
| COMMIT
|
| And so on...
|
As you can see, after your first redeploy, it deletes the timer, and them inserts it again 2 times. When you redeploy again, it deletes the same 2 timers and inserts it 3 times... and so on...
That's odd, as it seems it is doing things right deleting the timer and inserting it again when you redeploy, but it is inserting the timer aways one time more than necessary.
I tried removing the timers from EJBContext but all I got was a NPE. I searched all over the place and did not find any other way to remove the timer... will upgrade to 1.3 if that solves the problem.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054554#4054554
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054554
18Â years, 11Â months
[JBoss jBPM] - Re: JBPM JSF Integrartion
by roccolocko
One way to go its what you did, modify the jbpm.war and include your JSF files in there but then you will only be changing things all the time to fit your needs.
I thing the best way to do an integration is to generate your own war file (yourAplication.war) and communicate that application with the jbpm engine, remember that jbpm is not the jbpm.war, that is only a example of how you can make the jbpm work.
Once you deploy your own application on the deploy folder of the server, yor have access to everything on the jbpm engine, just by using the API.
You have everything there, so for example, if you have a button to save a task on your application, you only need a java class that uses the jbpm API to save the task, variables, and takes the transition you need it to take.
For example(this is what I use):
| public void save(Hashtable taskVariables, String transition)
| {
| this.jbpmContext = JbpmConfiguration.getInstance().getCurrentJbpmContext();
| this.taskMgmtSession = jbpmContext.getTaskMgmtSession();
|
| try
| {
| TaskInstance taskInstance = taskMgmtSession.loadTaskInstance(taskInstanceId);
| System.out.println("ESTA ABIERTA???: " + jbpmContext.getSession().isOpen());
|
| if(taskVariables != null && taskVariables.size() > 0)
| {
| Iterator i = taskVariables.keySet().iterator();
| while(i.hasNext()){
| String key = (String)i.next();
| Object value = taskVariables.get(key);
| taskInstance.setVariable(key, value);
| }
| }
| taskInstance.end(transition);
|
| jbpmContext.save(taskInstance);
|
| }
| }
|
Of course you need to import the correspondent packeges which in my case are:
import org.jbpm.JbpmConfiguration;
import org.jbpm.JbpmContext;
import org.jbpm.db.TaskMgmtSession;
Hope that helps.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054549#4054549
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054549
18Â years, 11Â months
[JBoss Seam] - Re: Do file upload component support jpeg and png only?
by nhpvti
"petemuir" wrote : in fact its because Java2D doesn't support writing to a gif, probably because of licensing issues
It was my first suspicion...
Good news is that it is nevertheless possible and even animated:
"shakenbrain" wrote :
| You'd have to update this to allow for "gif" format types, but that assumes that ImageIO supports writing GIFS. Based on "http://www.gif4j.com/java-gif4j-pro-gif-image-encode-save.htm" you'll need an extra library.
|
|
"petemuir" wrote : png is a superior format to gif
The same said our web design pro. But he said also that older web browsers may have trouble with PNG format. Mail clients consuming HTML emails is another case. I'll ask him to post a question in according forum(s)
Thank you both for your prompt and professional assistance
:-)
More critical is requirement to have animated images.
PNG does not support this.
Hopefully one of animation extensions (MNG or APNG or ANG or ... ) somtime will be widely adopted
http://www.xs4all.nl/~collin/png-eng.html
anonymous wrote :
| * A new controversy has arissen: Unisys now wants to charge every website that uses GIFs that were made with suspect software (i.e. software that has no Unisys license for LZW compression) 5000 US Dollar.
| * The PNG group has started developing an animation format to help replace animated GIFs. This format is called MNG.
http://en.wikipedia.org/wiki/PNG
anonymous wrote : PNG gained some additional popularity in August 1999, after Unisys terminated its royalty-free patent licenses to developers of free software and non-commercial software.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054548#4054548
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054548
18Â years, 11Â months