Friday, September 25, 2009

IBM FileNet Content Manager-Designer 4.5

Whoa, today I also presented two tests:
  • F040G - IBM FileNet P8 Prerequisite Skills
  • F042G - IBM FileNet P8 Platform Administration 4.5
And this is the result:


I passed both of them, and now I have an "IBM FileNet Content Manager-Designer 4.5" certification. The prerequisite skills test was new, but the Administration test was almost like the 4.0 test so there wasn't really big difference and the questions were very similar. Now the "IBM" brand appears in the certificate title, before it was something like "FCP... " and personally I like it better this was since the impact of seeing IBM in the certification name is way bigger.

FCP Content Manager-Developer 4.0

I just presented and passed the FCP Content Manager Developer 4.0 certification! If you already have some experience programming for the CE then test is reasonably easy (honestly, I'm not that experienced so the test didn't feel relaxed for me), a lot of the questions are about the specific APIs for doing certain actions (for example, one question that I remember is "Which one of the following methods is used to retrieve the current version of a document with multiple versions?", so you have to remember the specific method for many questions.

I think 50% of the questions are about API specifics, and the other 50% are about concepts related to the APIs



That's an screenshot of my certificate =) . Now my goal is to get a FileNet Process Manager administrator certification, but I won't present that certification but until next year.

Sunday, September 13, 2009

SQL - TRUNCATE statement

What do you do when you want to delete all rows from a table?

I do this: DELETE FROM my_table;

When you don't provide a WHERE condition, all the rows are deleted from the given table. That's correct and it's simple, and works.

Today I found about the TRUNCATE statement, I've heard about it but I had never used it in any project. TRUNCATE is a better alternative to the DELETE statement when you are sure that you don't want your data back:
  • The transaction log isn't used (depends on the database implementation, but if something is logged it should be minimal).
  • TRUNCATE locks the full table while DELETE typically locks each row at a time, so the deletion can be really faster with TRUNCATE.
  • All pages are deleted with TRUNCATE (no empty pages are left)
The syntax for the TRUNCATE statement is:
TRUNCATE TABLE my_table;

TRUNCATE is defined by the SQL standard, but there many details left to each vendor to decide. So far my two of my three common RDBMS that I use implement it: Oracle and SQL Server implement TRUNCATE, and I was surprised to find that DB2 does not support TRUNCATE under Windows and Linux (but seems like the mainframe version does support it).

Each time I need to clean up my test/dev databases, I'll try to use TRUNCATE, I don't know if I'll want to use it in production level databases.

Sunday, August 30, 2009

Now I'm a FCP Content Manager Administrator 4.0

The certification test was actually very easy, I could have passed the test with less effort, but in the end it's not a waste of time to learn more =)

Sunday, August 23, 2009

Windows/Linux - Identifying used ports

  1. Use netstat utility to identify ports used.
  2. Netstat formats are as follows:
    • Windows: netstat -a -p tcp
    • Linux: netstat -a -n -p –t

Windows - Providing an alias for an IP address

  1. Locate the Windows hosts file at C:\windows\system32\drivers\etc.
  2. Use Notepad only to open the hosts file.
  3. Create a new line or choose an empty line.
  4. Type the IP address that you want to map with an alias.
  5. Press the Tab key once.
  6. Type the desired alias.
  7. Save your changes.
Open a command line window, ping the alias that you provided before and you'll see a response from the server (given that the server is network accessible).

Monday, August 17, 2009

Connecting to FileNet P8 using the Content Engine APIs

//This simple code is actually commonly used, almost "as is" when connecting to an object store,
//there are still few improvements you could do, but it's OK to start testing your connection to a
//FileNet P8 domain. I almost took this code exactly from a training session that I
//had for FileNet P8 4.0 Content Engine development


import java.util.Iterator;

import javax.security.auth.Subject;

import com.filenet.api.collection.ObjectStoreSet;
import com.filenet.api.core.Connection;
import com.filenet.api.core.Domain;
import com.filenet.api.core.Factory;
import com.filenet.api.core.ObjectStore;
import com.filenet.api.util.UserContext;

public class CEConnection{

public Connection getCEConnection(){
Connection connection = Factory.Connection.getConnection("iiop://myServer:2809/FileNet/Engine");
Subject subject = UserContext.createSubject(connection, "administrator", "password", null);
UserContext userContext = UserContext.get();
userContext.pushSubject(subject);
return connection;
}

public Domain getDomain(Connection connection){
String domainName = "P8domain";
Domain domain = Factory.Domain.fetchInstance(connection, domainName, null);
System.out.println("Domain name: "+domain.get_Name());
return domain;
}

public void getObjectStores(Domain domain){
ObjectStoreSet objectStoreSet = domain.get_ObjectStores();
ObjectStore objectStore;
Iterator objectStoreIterator = objectStoreSet.iterator();
System.out.println("Available object stores: ");
while(objectStoreIterator.hasNext()){
objectStore = (ObjectStore)objectStoreIterator.next();
System.out.println("*"+objectStore.get_DisplayName());
}
}

public ObjectStore getObjectStore(Domain domain, String objectStoreName){
ObjectStore objectStore = null;
objectStore = Factory.ObjectStore.fetchInstance(domain, objectStoreName, null);
return objectStore;
}

public static void main(String[] args) {
try {
CEConnectionEDU connectionEDU = new CEConnectionEDU();
Connection connection = connectionEDU.getCEConnectionEDU();
Domain domain = connectionEDU.getDomainEDU(connection);
connectionEDU.getObjectStoresEDU(domain);
System.out.println(connectionEDU.getObjectStoreEDU(domain, "MyObjectStore").get_DisplayName());
} catch (Exception e) {
e.printStackTrace();
}

}
}

Sunday, August 16, 2009

My blog for software programming stuff

Well, I have decided to start this blog exclusively for posting about my own experiences as a software programmer, and as way to keep track of my own findings and interesting stuff I collect from the web or that I find by myself when solving the problems I need to solve in my work or when doing software programming for fun.

Don't expect to make sense from my posts, I could say it's mainly for my own use in order to track my own things, but if it's useful to you, feel free to check it.

Best regards!