[JBoss Messaging] - Re: Messaging Persistence and Multiple JBoss Instances
by timfox
"rtm333" wrote : Tim,
|
| Thanks for your reply.
|
| Actually, we do not give any unique ids to the server instances. Where and how could this be done?
|
|
|
This is done in messaging-service.xml:
| <constructor>
| <!-- ServerPeerID -->
| <arg type="int" value="0"/>
| <!-- DefaultQueueJNDIContext -->
| <arg type="java.lang.String" value="/queue"/>
| <!-- DefaultTopicJNDIContext -->
| <arg type="java.lang.String" value="/topic"/>
| </constructor>
|
The ServerPeerID needs to be unique for every node.
anonymous wrote :
|
| To clarify, I'm not talking about some form of clustering. We are using several independent "instances" of JBoss, that are mapped to different ports by the ServiceBindingManager. The instances share a common Sybase database for persisting JMS messages.
|
|
In this case each instance needs to use its own set of tables.
You're best bet is to use a different schema for each server (you can do this in Oracle not sure about Sybase)
anonymous wrote :
| In the meantime we have explored this issue in two directions:
|
| 1. Using an instance specific sybase-persistence-service.xml, that adds a server id column to all JMS persistence tables and uses a (hard-coded) server id in all SQL statements for selections/updates.
|
Sounds prone to error, why not just set up different schemas?
anonymous wrote :
| 2. Usage of Apache Derby: This creates an individual copy of the persistence database in each instance's data directory. There are two problems with this approach:
|
| a) JDBC type LONGVARBINARY (used for storing message content) is not compatible to Derby type BLOB, but only to "LONG VARCHAR FOR BIT DATA" with a maximum length of 32700 bytes.
|
|
Can you not change the sql properties in the pm config to get this to work?
anonymous wrote :
|
| b) In method org.jboss.messaging.core.plugin.JDBCPersistenceManager.getBytes(ResultSet rs, int columnIndex) the method rs.getBinaryStream() is invoked twice on the same column (line 4250). This is considered an error by Derby. Workaround: change the second usage to use the first result (i), recompile and use the generated jboss-messaging.jar in jboss-messaging.sar.
|
|
Thanks.
Currentlty we don't officially support Derby but if there is sufficient demand we will make all the necessary changes and put it through the QA process to get it to work.
If you like, you could add a feature request for this in JIRA?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037043#4037043
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037043
19 years
[JBoss Messaging] - Re: Servlet as a topic listener
by timfox
Firstly I agree with genman that what you're trying to do sounds like an awful hack.
I also notice from your stack trace that you're using the JMS JCA resource adapter which is normally available at java:JmsXA when inside the app server. The resource adapter is correctly noticing that you're not closing connections in your code (i.e. a bug).
Also, when using the JCA adapter you can't use methods like setMessageListener, as per the spec.
What's probably happening is that when running "standalone" you are not using the JCA resource adapter - just the straight jms connection factory - which will not report you not closing connections, and will allow you to use the full JMS API.
If you want this to work inside the app server make sure you don't use the JMS resource adapter.
But I would first advise you to rethink your architecture - since this all seems quite hackish to me, and looking up a connection factory, creating s connection, creating a subscriber, getting message and closing connection every time, is not going to be fast.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037042#4037042
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037042
19 years
[JBoss Seam] - <h:selectManyListbox> Creating problem
by m.shinde
Hi
I used <h:selectManyListbox> in the JSF and I am able to see list of groups in the list box. But when I select one or more than one groups I am not able to get those values in the seam - Ejbs Action class.
E.g JSF Code
<h:selectManyListbox value="#{register.gruppen}" id="gruppen">
<si:selectItems value="#{groupValues}" var="groups" label="#{groups.name}" config="#{mySelectItemsConfig}" />
<si:convertEntity entityClass="de.bonprix.vip20.model.entity.Gruppe"/>
</h:selectManyListbox>
E.g EJb Code to get values of selected group.
@In(required = false)
@Out(required = false)
private List gruppen;
.... setter and getter method.
I am tried by giving String[] instead of List also.
when I submit the page I am getting gruppen null.
Please Suggest!.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037041#4037041
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037041
19 years