Access Package properties from EJB(this howto is deprecated)Tag(s): DEPRECATED


   Properties properties = new Properties();
   properties.put("org.omg.CORBA.ORBClass", "com.sybase.CORBA.ORB");
   ORB orb = ORB.init(((String []) (null)), properties);
   com.sybase.jaguar.system.Repository repository =
       com.sybase.jaguar.system.RepositoryHelper.narrow
         (orb.string_to_object("Jaguar/Repository"));

   jagProp = repository.lookup("Package", "YourPackageName");

   String returnValue = "";

   int i = jagProp.length;
   for(int j = 0; j < i; j++){
     if(jagProp[j].name.equals(propertyValue)){
        returnValue = jagProp[j].value;
        break;
        }
     }
   return returnValue;

blog comments powered by Disqus