[EJB/JBoss] - 4.0.4GA : Hook for deployment / EJB application startup ?
by soeren
Hi.
I'm just wondering if there is any possibility to hook up the "application deployed" event to some code, i.e. have a callback for this event.
I have an EJB-application which needs some action taken immediately after it is started, like initializing interfaces, preparing a scheduler using Quartz, maintaining some kind of internal cache for a faster start of clients and so on.
It looks like the EJB standard has nothing available for this? What about JBoss specific, is there any "best practice" for this use case?
I mean, this must be a pretty common case, every "self grown" server application normally has a lot of startup things that happen so I can't believe it's not available in the EJB world ,-))
An if the startup hook is there: What about shutdown (thanks)?
Thanks in advance,
Soeren Gerlach
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981841#3981841
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981841
19 years, 5 months
[JBoss jBPM] - Re: BPEL beta2 - wait activity
by wugf
Sorry for causing the confusion.
Let me make it simple: (in my test, the invoke itself is very fast and takes much less than 1 second)
First, 1 wait activity
| <wait for="'PT5S'" />
| <invoke ? />
|
or
| <invoke ? />
| <wait for="'PT5S'" />
|
They work.
Second, 2 wait activities
| <wait for="'PT5S'" />
| <wait for="'PT5S'" />
| <invoke ? />
|
or
| <invoke ? />
| <wait for="'PT5S'" />
| <wait for="'PT5S'" />
|
They work.
Third, 2 wait activities, but one before and one after the invoke, this does NOT work
| <wait for="'PT5S'" />
| <invoke ? />
| <wait for="'PT5S'" />
|
It timed out after 60 seconds (while both client timeout and responseTimeout were set at 60 seconds). (In my test, the invoke itself is very fast and takes much less than 1 second)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981839#3981839
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981839
19 years, 5 months
[JBoss Seam] - Submitting using SelectOneRadio
by monkeyden
I'm not sure where this should be posted, as it's in a grey area.
I'm using the following reference to submit using a SelectOneRadio.
http://wiki.apache.org/myfaces/JavascriptWithJavaServerFaces
Everything works as promised in the example (the listener method is called) but I have one other requirement. I need to value of the selected radio button to be passed to my listener method. My locationsByState() listener is traversing a cached list of SelectItems, to return the ones that have a description value of whatever @RequestParameter selectedState is. The problem is, selectedState is always null. I think I'm misunderstanding what happens when the commandLink is processed. I'm assuming the value would be submitted when the commandButton is programatically "clicked."
I have set it up in the Seam action as follows (staticLocations is a globally cached list of locations):
@RequestParameter
| private String selectedState;
|
| public List<SelectItem> locationsByState(){
| List<SelectItem> locationsByState = new ArrayList<SelectItem>();
| loadLocations();
| for(int i=0;i<staticLocations.size();i++){
| SelectItem current = staticLocations.get(i);
| //selectedState is always null
| if(current.getDescription().trim().equals(selectedState)){
| locationsByState.add(current);
| }
| }
| return locationsByState;
| }
|
|
In the view, radioSubmit() is generating a JS event for "hiddenLink", to call the listener method. Again, everything works exactly as expected.
<h:selectOneRadio value="#{editProfileAction.selectedState}" onmouseup="radioSubmit('hiddenLink');" styleClass="bodyCopy">
| <f:selectItem itemLabel="MA" itemValue="MA"/>
| <f:selectItem itemLabel="ME" itemValue="ME"/>
| <f:selectItem itemLabel="NH" itemValue="NH"/>
| <f:selectItem itemLabel="RI" itemValue="RI"/>
| <f:selectItem itemLabel="VT" itemValue="VT"/>
| </h:selectOneRadio>
|
| <t:commandLink id="hiddenLink" forceId="true"
| style="display:none; visibility:hidden;"
| action="#{editProfileAction.locationsByState}">
| </t:commandLink>
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981836#3981836
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981836
19 years, 5 months