JBoss AS - Sample Interview Question (Senior Level)

We have created a Person class to be stored in JBoss PojoCache, what will happen when we run the following code?

//Person
@org.jboss.cache.pojo.annotation.Replicable
public class Person 
{
    String name;
   public String getName()
   {
      return name;
   }

   public void setName(String name)
   {
      this.name=name;
   }
   
}

//Main
public class CacheTest {
public static void main(String args[]){
PojoCache cache_ = PojoCacheFactory.createCache("replSync-service.xml");
Person mary = new Person(); 
mary.setName("Mary");
cache_.attach("pojo/mary", mary);
cache_.stop();
}
}

  1. Nothing will be stored in cache, since the cache
    has not been started (using cache_.start())
  2. The program will store the Person instance in
    cache and exit gracefully
  3. A PojoCacheException will be thrown
  4. None of the above
Tests in JBoss AS for Seniors

Test Name Difficulty Time (minutes) No. of Questions
JBoss AS Online Test for Seniors JBoss AS Senior 40 20

More Specific Tests in JBoss AS for Seniors

Test Name Difficulty Time (Minutes) No. of Questions
JBoss-AS-Basics Online Test for Seniors JBoss AS - Basics Senior 20 10
JBoss-AS-Cache Online Test for Seniors JBoss AS - Cache Senior 20 10