Credit card jargon

PAN – the card number BIN – the first 6 digits of the card number, which identifies the issuer of the card   CVV –  It is on the back of your card. Normally it has 3 digits.  Providing your CVV number to an online merchant proves that you actually have the physical credit or …

Credit card jargon Read More »

Library dependency V.S. Remote API dependency in SOA

Pros of Library Dependency: Simplicity in terms of implementation. In java, all you need is Maven. There is no need for any RPC serialiser or RPC middleware.  Simplicity in terms of deployment. You will need less applications than the RPC approach. Each application requires investment of auto-deployment, monitoring, hardware resources, and load balancing in some …

Library dependency V.S. Remote API dependency in SOA Read More »

You can have small grooming sessions instead of a big one

You don’t have to have a big grooming session to analyse all the user stories for next sprint.  That will be tiresome since it takes long, and people won’t like it.   Instead you can break them into small ones, like a one-hour session everyday for a few days while you are still going on …

You can have small grooming sessions instead of a big one Read More »

Tomcat gets stuck during start up?

It takes more than 5 minutes for your tomcat to startup.  You think it’s your application’s program. But when you download a clean Tomcat (of the same version) can run it without dropping in any of your applications, it still gets stuck.  It may be caused by this: https://wiki.apache.org/tomcat/HowTo/FasterStartUp#Entropy_Source According to my just wasted 2 …

Tomcat gets stuck during start up? Read More »

Call Java compiler programatically

You don’t need to add any dependency private static void doCompile(File sourceDir) throws SomeException { System.out.println(“Compiling started”); JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); DiagnosticCollector diagnostics = new DiagnosticCollector(); StandardJavaFileManager fileManager = compiler.getStandardFileManager(diagnostics, null, null); Collection files = FileUtils.listFiles(sourceDir, new String[] { “java” }, true); Iterable compilationUnits = fileManager.getJavaFileObjectsFromFiles(files); List compilerOptions = Arrays.asList(“-source”, “1.6”, “-target”, “1.6”); JavaCompiler.CompilationTask task …

Call Java compiler programatically Read More »

Propagate data change from RDBMS to Solr

Basically, you will use solr’s DataImportHandler to do the importing. Hit http://solr-server:port/solr/db/dataimport?command=full-import to do a full import. Hit http://solr-server:port/solr/dataimport?command=delta-import to do a delta import So, what’s the delta? This is configured in some data-config.xml: deltaQuery=”select id from item where last_modified > ‘${dih.last_index_time}'” So it requires the table on your database must have a column called …

Propagate data change from RDBMS to Solr Read More »