Saturday, June 6, 2015

jar information

Sometimes you need to join jenkins build, git commit with your artifact.
So it is easy to do with


                org.apache.maven.plugins
                maven-ejb-plugin
                2.1
                
                    3.0
                    
                        
                         *****
                            *****
                            ${project.version}
                            *****
                            *****
                            
                            ${BUILD_NUMBER}
                            
                            ${GIT_COMMIT}
                            ${maven.build.timestamp}
                                            
                    
                
            

Tuesday, June 2, 2015

Git for release management


1. Check your branch is from master to be sure no commits would be missed from previous build
git branch --merged your_branch

git branch --no-merged master

2. Make code review via patch file
git diff master your_branch > diff.patch
Очень удобно проверить через GitExtensions






Wednesday, May 20, 2015

Junit vs TestNG

http://www.techwars.io/fight/testng/junit4/
http://www.mkyong.com/unittest/junit-4-vs-testng-comparison/


1. @BeforeClass в Junit static
2. Неудобное использование @DataProvider
3. Порядок выполнения

Использование @DataProvider в Junit с либой junit-dataprovider

junit
junit 1.4.12 test

com.tngtech.java
junit-dataprovider 1.9.2 test
@RunWith(DataProviderRunner.class)
public class DataProviderTest {

    @DataProvider
    public static Object[][] dataProviderAdd() {
        return new Object[][] {
                { 0, 0, 0 },
                { 1, 1, 2 },
        };
    }

    @Test
    @UseDataProvider("dataProviderAdd")
    public void testAdd(int a, int b, int expected) {
        int result = a + b;
        assertEquals(expected, result);
    }
}    

Thursday, March 12, 2015

Multiple readers from JMS topic on Websphere MQ

If I were to do this in WebSphere MQ the solution would be to create an administrative subscription which would result in a single copy of each message on the given topic to be placed onto a queue. Then your multiple subscribers could compete for messages on that queue. 

This way your app could have multiple threads among which the messages are distributed, and at the same time other subscribers independent of this application could dynamically (un)subscribe to the same topic.

Rabbit MQ solution
http://www.rabbitmq.com/tutorials/tutorial-two-java.html

http://support.sas.com/rnd/itech/doc9/dev_guide/messageq/confmult.html

Sunday, February 22, 2015

IS SOA DEAD

http://martinfowler.com/articles/microservices.html

http://www.kai-waehner.de/files/graphics/Apache_Camel_When_to_Use.jpg
http://www.infoworld.com/article/2611494/paas/soa-dead--not-if-you-re-using-paas-for-app-dev.html
http://stackoverflow.com/questions/936400/if-soa-is-dead-whats-replacing-it

Wednesday, February 11, 2015

DB2 partitioning

ALTER TABLE SCHEMA.TABLENAME
ADD PARTITION PART_15 STARTING FROM ('2015-01-02 12:00:00.0') EXCLUSIVE ENDING AT ('2016-01-01 12:00:00.0') EXCLUSIVE