UML 2 JMS Component Representation

时间:2018-01-15 18:11:37

标签: architecture uml

I'm working on a application that uses several jms resources like Queues and Topics, and i'm currently doing the UML of the design, and i'm not sure about the best way of represent the relation between a publisher and consumer/subscriber in a component diagram when JMS technologies are involved, looking over the internet i found some examples but they are quite different, some represent the queues or topcis as individual components others just as interfaces.

So my doubt is, ¿Which is the correct way in UML 2.0 of represent the use of a JMS Resource like a queue or a topic from both perspectives, publisher and consumer/subscriber?

Thanks in advance.

1 个答案:

答案 0 :(得分:2)

正如您已经看到的,没有一种解决方案。我更喜欢UML建模风格,它专注于应用程序的各个方面。因此,可能的方法是使用端口对应用程序建模,以模拟组件之间的连接(或者也可能在类之间 - 仅在相关的位置)。然后使用实际使用的消息队列细化端口,并省略对JMS类的直接依赖性。这种端口改进在SysML建模中更常见,但对于这些东西非常方便,并且在UML中也是可能的。

此外,模拟从应用程序包到库的包依赖关系,但是可以省略从实现类到JMS的依赖关系。如果你想建模所有的依赖关系,那么建议使用不同的图表,一个主要显示你的方面,一个显示库的依赖关系。