Re: [jboss-user] [Beginner's Corner] - Hot deploy problem with properties file
by Pratik Surti
Pratik Surti [http://community.jboss.org/people/pratiksurti] replied to the discussion
"Hot deploy problem with properties file"
To view the discussion, visit: http://community.jboss.org/message/553640#553640
--------------------------------------------------------------
Let's put it in this way:
Properties file which contains key/value pairs for labeling and internationalization of your application. We can say Resource bundle file.
EAR file which contains my application jar files, war files, configuration files which is currently deployed on JBoss AS.
For e.g. my application server is up and running and for displaying a text box label (e.g. User Name) in Flex UI, accepts the value from properties file (Resouce Bundle file).
Now I am making changes to the value present in the property file for any corresponding key (e.g. Your Name instead of User Name) and building the ear file and it is getting hot deployed in JBoss AS.
Now according to the changes made in property file, it should be reflected on Flex UI for the particular text box after hot deploy in JBoss AS which is not happening at my end.
I hope you understand the above scenario.
Also the ref code:
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME,
new Locale(MYEnvironment.getValue("MYUtil", "PART_LOCALE"),localeCountry),Thread.currentThread().getContextClassLoader());
Consider "MYEnvironment.getValue()" part my own dynamic implementation.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/553640#553640]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 11 months
[jBPM] - Lazy loading of sub-process
by Fabio Spiga
Fabio Spiga [http://community.jboss.org/people/Spiga] created the discussion
"Lazy loading of sub-process"
To view the discussion, visit: http://community.jboss.org/message/553601#553601
--------------------------------------------------------------
Hi all,
I have a problem in getting a subprocess reference from the main process instance.
My code is the following:
ProcessInstance processInstance = executionService.startProcessInstanceByKey("RPG");
ExecutionImpl ex_pi = ((ExecutionImpl) processInstance).findActiveExecutionIn("integr_doc");
ProcessInstance sub_pi = ex_pi.getSubProcessInstance();
assertNotNull(sub_pi);
where "integr_doc" is the name of a subprocess
The call to "getSubProcessInstance()" is succesful, but the object "sub_pi" throws an Exception if I try to read any property of it because it was lazy initialized and the session has been closed.
I get the following exception:
org.hibernate.LazyInitializationException <init>
GRAVE: could not initialize proxy - no Session
org.hibernate.LazyInitializationException: could not initialize proxy - no Session
In order to resolve this problem, I have found only one solution: modifying the "jbpm.execution.hbm.xml" in "jbpm.jar" by adding the attribute "lazy=false" to the foreign-key "FK_EXEC_SUBPI".
This is a very awful solution because I had to modify the original library!
If I put a copy of "jbpm.execution.hbm.xml" in the classpath (in order to not modify the original library), JBoss AS try to map jBPM entity beans before the related classes are loaded, so it fails to start.
Is there a way to get a subprocess instance more gracefully?
Thank you in advance and sorry for my long thread...
Fabio
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/553601#553601]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 11 months