[Management, JMX/JBoss] - Re: [deploymentinfo] and temporary files
by sengsational
"dimitris(a)jboss.org" wrote : There is (almost) nothing wrong with this. It's a jdk bug on windows. The tmp files are locked by the classloaders using them, and they will only deleted by jboss when it restarts.Thanks for the quick reply. I was just fretting over not getting the benefit of hot deploy. Since it not available for jar files on Windows, I'm not leaving anything on the table, so to speak.
I've got jboss-4.0.1RC2 and Java version: 1.4.2_07. This isn't critical, but it doesn't seem to delete the tmp files when it restarts. But no matter, really, since I've got to go to the server to restart JBoss anyway, its easy enough to wipe the temp files myself.
I put this at the end of shutdown bat (just a random IP - no native 'sleep' on Windows):
| rem wait a few seconds
| ping -n 1 -w 5000 192.168.234.234
| erase "C:\jboss-4.0.1RC2\server\default\tmp\deploy\*.*" /s /Q
|
--Dale--
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008757#4008757
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008757
19 years, 2 months
[EJB 3.0] - Example of Database Locking
by JamesWoodward
Hi,
I've trawled through the forums and can't find a solution to what must be a common problem.
I have 2 clients that each access their own SFSBs. They pass a list of Order objects to the SFSB. For each order, the SFSB makes a call to another SFSB which allocates a transaction id, which it reads, increments and updates in a legacy database table.
I can't seem to find the correct approach.
If I don't have a @Version column, then the same transaction id is allocated more than once, which isn't acceptable.
If I do have a @Version column, then I get various exceptions thrown (OptimisticLockException, StaleObjectStateException, GenericJDBC Exception) none of which seem to allow recovery.
Basically, I want one process to wait for the other to complete. Which I would do outside EJB with a synchronized block, or with pessimistic locking.
Is there an example of how to do this?
Thanks In Advance,
James
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008755#4008755
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008755
19 years, 2 months
[JBoss Seam] - How to use si:selectItems with an object that has a String i
by lawrieg
Hi,
I'm a Seam newbie and I'm trying to get my head around si:selectItems and the Seam application framework.
My CustomerType object has a String id so when I initially tried to use si:selectItems without creating and specifying a converter I got an exception:
<h:selectOneMenu value="#{ customerHome.instance.customerType}" id="customerType">
| <si:selectItems value="#{customerTypes.resultList}" var="customerType" label="#{customerType.name}" noSelectionLabel="Please Select..." />
| </h:selectOneMenu>
javax.faces.convert.ConverterException: javax.faces.application.FacesMessage@154fe9c com.mycomp.myapp.CustomerType
| at org.jboss.seam.selectitems.ui.BasicEntityConverter.getIdAsString(BasicEntityConverter.java:61)
| at org.jboss.seam.selectitems.jsf.EntityConverter.convertToString(EntityConverter.java:36)
| at org.jboss.seam.selectitems.jsf.SelectItemsConverter.getAsString(SelectItemsConverter.java:131)
| at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getConvertedStringValue(RendererUtils.java:544)
| ...
|
| Caused by: java.lang.NullPointerException
| at org.jboss.seam.selectitems.ui.BasicEntityConverter.getIdAsString(BasicEntityConverter.java:59)
| ... 43 more
So I then created a CustomerTypeSelectItemsConverter which extends SelectItemsConverter:
@Name("customerTypeSelectItemsConverter")
| public class CustomerTypeSelectItemsConverter extends org.jboss.seam.selectitems.jsf.SelectItemsConverter {
|
| @Override
| protected Object convertToObject(FacesContext arg0, UIComponent arg1, String arg2)
| throws ConverterException {
| return arg2;
| }
|
| @Override
| protected String convertToString(FacesContext arg0, UIComponent arg1, Object arg2)
| throws ConverterException {
| return ((CustomerType)arg2).getId();
| }
|
| }
and changed my facelets code:
<h:selectOneMenu value="#{customerHome.instance.customerType}" converter="#{customerTypeSelectItemsConverter}" id="customerType">
| <si:selectItems value="#{customerTypes.resultList}" var="customerType" label="#{customerType.name}" noSelectionLabel="Please Select..." />
| </h:selectOneMenu>
|
This gets my drop down list displaying correctly but gives me a validation error "value is not valid" when I try to save. I presume this means that I should be returning a CustomerType object (rather than the CustomerType object's id) from CustomerTypeSelectItemsConverter's convertToObject() method?
Am I on the right lines now?
If so, what is the correct way for me to obtain the CustomerType object? Should I somehow be getting the List from the Seam Application Framework EntityQuery object ("customerTypes") that was used to populate the si:selectItems tag and then iterating the List to find find the CustomerType with the specified id? Or is there a better way?
Any help would be greatly appreciated as I can't find any examples which match my problem and I'm struggling to find any answers...
Thanks,
Lawrie
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008752#4008752
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008752
19 years, 2 months