[Installation, Configuration & DEPLOYMENT] - Propblems with JBoss AS 5.0.1 Messaging with MySQL
by jochen.reinhardt
Hello,
I'm using MySQL (with InnoDB) as database backend for JBoss. Everything works fine untill I change the messaging hsqldb-persistence-service.xml in server/default/deploy/messaging to use MySQL as database by replacing the file with doc/examples/jms/mysql-persistence-service.xml. This causes deployment errors for PostOffice, as a dependency (ChannelFactory) is not deployed.
<depends optional-attribute-name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</depends>
| <attribute name="ControlChannelName">jbm-control</attribute>
| <attribute name="DataChannelName">jbm-data</attribute>
| <attribute name="ChannelPartitionName">${jboss.partition.name:DefaultPartition}-JMS</attribute>
When I comment out this section, JBoss starts fine. But I wonder if it is safe to do so. I eoncounter these problems on all OSes I am working with - Linux, Windows XP and Windows Server 2003.
I'm sure this is some kind of configuration issue, but I was not able to find out more... Maybe the example files were designed for a previous version of JBoss AS?
Please advise!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217833#4217833
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4217833
17 years, 3 months
[JBoss AOP] - Different jboss-aop.xml files for unit testing
by nizzy
Hi All,
As mentioned in my previous post I'm reviewing AOP for use with unit testing.
I define my jboss-aop.xml in test/META-INF folder in my eclipse project. I have noticed that it is going to be quite probable that poincut definitions are going to cause undesired side-effects.
For instance - if you consider the test code
| @Test
| public void testCreateObject() {
| try {
| man.createObject(ap);
| } catch (Exception e) {
| fail("Test failed since exception was thrown: " + e);
| }
| }
|
| @Test
| public void testCreateObject_MultefileException() {
| try {
| man.createObject(ap);
| fail("Should have thrown MultefileException");
| } catch (Exception e) {
|
| if (!(e instanceof MultefileException)) {
| fail("Test failed since exception was not MultefileException: " + e);
| }
| }
| }
then the jboss-aop.xml
| <bind pointcut="execution(public $typedef{persistenceHelperTypeDef}->new(java.lang.String))">
| <interceptor class="com.ecebs.unittest.aop.interceptor.GenericInterceptor">
| <attribute name="mockObjectName">MockPersistenceHelper</attribute>
| </interceptor>
| </bind>
|
| <typedef name="persistenceHelperTypeDef"
| expr="class($instanceof{com.ecebs.unittest.aop.IPersistenceHelper})
| AND !class(com.ecebs.unittest.aop.mock.*)" />
|
| <aspect class="com.ecebs.unittest.aop.aspect.ExceptionInjector" />
| <bind pointcut="execution(public void com.ecebs.unittest.aop.AOPUnitTestManagerBean->createObject(..))">
| <advice name="throwMultefileException" aspect="com.ecebs.unittest.aop.aspect.ExceptionInjector" />
| </bind>
The first entry in the jboss-aop.xml file mocks-out a persistence helper.
The createObject test would then pass. When I add the subsequent aspect and bind to inject an Exception - every time createObject is called - the first test obviously then fails - which I appreciate is exactly what I would expect to happen given the way I have set this up!!
Is there a way; via the pointcut definitions or by changing which jboss-aop.xml file is used, to overcome such an issue?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217811#4217811
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4217811
17 years, 3 months