How to write contains/suggestion/match query using ATG RQL?

There are times when you may have to write contains query to support a suggestion drop-down or standard search functionality. ATG Object Oriented Query Language (RQL) supports contains query with the help of simple RQL API. QueryBuilder.createPatternMatchQuery(QueryExpression, QueryExpression, Integer) would help you fire a contains query against your relational data store.

Continue reading…

 

BlockingQueue in Java – How to implement producer-consumer design using BlockingQueue?

Java 5 util.concurrent package provides a very useful class named “BlockingQueue” to implement producer-consumer design. In java 1.4 world developers used to use wait and notify mechanism to implement the same design. BlockingQueue class made code more readable and reduced the chances of bug in the code. In the below given example, we have a […]
Continue reading…

 

Oracle Endeca – Keyword search in Endeca using presentation API.

Sample client which connect to an Oracle Endeca MDEX server and make keyword search. Query will be applied with nid zero and the search term will be searched against all searchable keys in the index. This client connect to MDEX installed in localhost at default port 15000.

Continue reading…

 

How to print the JBoss JNDI tree?

Even though JBoss comes with JMX console which gives you the graphical view of JNDI tree sometime you might need to print the JNDI tree to look at the absolute path of your boud resources. Here is an example program that can be used to print JBoss JNDI tree.

Continue reading…

 

How to convert native character to unicode and unicode to native?

Java provides a simple tool named native2ascii to convert native to ASCII and ASCII to native. Native characters are represented in ASCII using its Unicode equivalent. You can find the native2ascii tool in the JAVA_HOME/bin To convert native to ascii you can use the below given command. /local/opt/java/bin/native2ascii -encoding utf8 source-file target-file source file should […]
Continue reading…

 

How to create java maven project in Eclipse?

In this post we will talk about creating java maven project. Steps involved in creating java maven project. 1. Lunch eclipse. Click “File->New->Maven Project” menu item. 2. In the new maven project dialog, select “create a simple project” check box and click “Next” button. 3. Give appropriate “Group Id”, “Artifact Id”, “Version” and “Packaging Type”. […]
Continue reading…