[JBoss Seam] - Re: s:formattedText breaking, and seamspace
by saeediqbal1
I am thinking of putting this method to save the day. Would you guys let me know what would be the best place to put it in ?
public static String stripNonValidXMLCharacters(String in) {
| StringBuffer out = new StringBuffer(); // Used to hold the output.
| char current; // Used to reference the current character.
|
| if (in == null || ("".equals(in))) return ""; // vacancy test.
| for (int i = 0; i < in.length(); i++) {
| current = in.charAt(i); // NOTE: No IndexOutOfBoundsException caught here; it should not happen.
| if ((current == 0x9) ||
| (current == 0xA) ||
| (current == 0xD) ||
| ((current >= 0x20) && (current <= 0xD7FF)) ||
| ((current >= 0xE000) && (current <= 0xFFFD)) ||
| ((current >= 0x10000) && (current <= 0x10FFFF)))
| out.append(current);
| }
| return out.toString();
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083210#4083210
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083210
18 years, 7 months
[JBoss Seam] - Re: EntityQuery bug
by rmemoria
Another bug just found.
The Refresh method doesn't update changes in the Ejbql property.
My EntityQuery has a condition that can't be included as a restriction. It is:
| @Name("mdrCases")
| public class MdrCasesQuery extends EntityQuery {
|
| private boolean allCases;
|
| @Override
| public String getEjbql() {
| String cond = allCases? "": " where (c.endingTreatmentDate is null)";
|
| return "from MdrCase c".concat(cond);
| }
Since it doesn't contain any EL expression, it can't be included as a restriction. So the condition is placed on the fly when the user clicks a button to refresh the page:
<s:decorate template="/layout/edit.xhtml">
| <ui:define name="label">#{messages['patients.allcases']}:</ui:define>
| <h:selectBooleanCheckbox value="#{mdrCases.allCases}"></h:selectBooleanCheckbox>
| </s:decorate>
|
| <h:commandButton action="#{mdrCases.refresh}" value="#{messages['form.search']}" styleClass="button" />
|
The problem is that after the refresh method is called the Ejbql is not rebuild.
I saw that in Query.refresh method, if I make a change like:
public void refresh()
| {
| clearDataModel();
|
| // INCLUDE THIS LINE HERE
| parsedEjbql = null;
| }
recompile and regenerate SEAM, it works just fine.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083202#4083202
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083202
18 years, 7 months
[JBoss Messaging] - Re: JMSMessageID in Messaging cluster
by aslak
As far as the JMS 1.1 Specification goes on the topic:
----------------------------
3.4.3 JMSMessageID
The JMSMessageID header field contains a value that uniquely identifies each
message sent by a provider.
...
A JMSMessageID is a String value which should function as a unique key for
identifying messages in a historical repository. The exact scope of uniqueness is
provider defined. It should at least cover all messages for a specific installation
of a provider where an installation is some connected set of message routers.
...
3.4.5 JMSCorrelationID
A client can use the JMSCorrelationID header field to link one message with
another. A typical use is to link a response message with its request message.
...
Since each message sent by a JMS provider is assigned a message ID value, it is
convenient to link messages via message ID.
...
In some cases, an application (made up of several clients) needs to use an
application-specific value for linking messages.
...
----------------------------
I'm not 100% sure, but I think the text 'a specific installation of a provider where an installation is some connected set of message routers'
could be hinting at a cluster?
The specification is clear that a MessageID is suppose to uniquely identify a Message. By changing the MessageID
it no longer identifies the original Message. It now identifies a new Message, unknown to the sender.
Common Practice...
The two common correlation patterns are:
- Correlation ID Pattern
The receiver copies the request Correlation ID to the response Correlation ID.
- Message ID Pattern
The receiver copies the request Message ID to the response Correlation ID.
I think it would be wrong of the JMS provider to force the use of one over the other.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083201#4083201
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083201
18 years, 7 months