[JBoss Messaging] - Distributed Topics
by seriousFun
Hi all,
I have a small problem with distributed queues. I am using JBoss AS 5.0.1.GA.
What I want is to send the message to all the topics with the same JNDI Names on the cluster nodes. I have set the clustered property of the topics to true but doesn't help. Is there a way to do it?
My code:
on one node I create the InitialContext
InitialContext context = new InitialContext();
| Object tmp = context.lookup(JndiName);
| ConnectionFactory cf = (ConnectionFactory) tmp;
| Connection connection = cf.createConnection();
| Session session = connection.createSession(false, QueueSession.AUTO_ACKNOWLEDGE);
| Destination destination = (Destination) context.lookup(TOPIC);
|
|
Topic config:
| <mbean code="org.jboss.jms.server.destination.TopicService"
| name="jboss.messaging.destination:service=Topic,name=JMS_TOPIC" xmbean-dd="xmdesc/Topic-xmbean.xml">
| <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
| <depends>jboss.messaging:service=PostOffice</depends>
| <attribute name="JNDIName">tst/JMS_TOPIC</attribute>
| <attribute name="Clustered">true</attribute>
| </mbean>
|
|
with this configuration I have the message sent only to the topic on the local node, but not to the topics on the other nodes in the cluster.
Any help is appreciated.
Thank you
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217934#4217934
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4217934
17 years, 3 months
[EJB 3.0] - Re: NewBie @OneToOne question
by delarue
"Wolfgang Knauf" wrote : Hi,
|
| I think that the "name" attribute of the "@JoinColumn" denotes the column name in your "User" table. The "referencedColumn" should be the name of the primary key column in your child table.
|
Ok, I understand better. I found my id and columns back ...
With this form, the sql generates a constraint with a random name for the foreign key. On the trace of jboss, I see something like :
| alter table .Car add index FK107B4B78C84CE (USER_ID), add constraint FK107B4B78C84CE foreign key (USER_ID) references .User (id)
|
Is there a way of naming the foreign key : USER_CAR_FK instead of FK107B4B78C84CE ?
Since the design was done in the database and not in the EJB annotation.
Is it possible to have a strict mapping between a sql schema and a EJB annotation ?
anonymous wrote :
| But normally the @OneToOne annotation should work without any @JoinColumn annotations. The server will choose defaults for the column names. So, start with the easiest solution and remove the @JoinColumn annotation ;-).
|
| Hope this helps
|
| Wolfgang
This helps a lot ;))) I'll follow your suggestion for small apps, but for big apps, I have to replicate the database schema, thus I try that.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217929#4217929
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4217929
17 years, 3 months