jboss5.x - Upgrading from DeploymentService to ProfileService in JBoss 5.1.0 GA -


in jboss 5.1 profile service deployment service doing in jboss 4.x.in jboss 4.x using deployment service create datasource "on-the-fly" , wondering if same thing using profile service (since deployment service doesn't exist more in jboss 5.x). know practical guid on using profileservice?

thank ,

regards.

i don't know of guide can provide experience using profile service , few links jboss wiki pages on topic. i'd post more links spam protection doesn't allow me post more two, should find other pages in wiki on profileservice. don't suprised in case don't find much, there isn't more.

there you'll find usefull information profileservice no detailed information available in jboss wiki far can tell.

in order create datasources on fly can use deploymenttemplates (also creating message queues , topics) last link provides information on how use templates not template names , properties. can list them programatically though.

// templates for(string template : mgtview.gettemplatenames()) {      system.out.println("=========================================");      system.out.println("listing properties template: "+template);      deploymenttemplateinfo info = mgtview.gettemplate(template);          for(string prop : info.getproperties().keyset())      system.out.println("- "+prop); } 

in order managementview (mgtview) external java programm can use similiar this:

// set security policy system.setproperty("java.security.policy", "<path_to_policy_file>"); system.setsecuritymanager( new rmisecuritymanager() ) ;  // set initial context properties hashtable<string, string> env = new hashtable<string, string>(); env.put("java.naming.factory.initial", "org.jnp.interfaces.namingcontextfactory"); env.put("java.naming.provider.url","jnp://localhost:1099"); env.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");  ctx = new initialcontext(env);  // login jboss securityclient client = securityclientfactory.getsecurityclient(); client.setsimple("admin", "admin"); client.login();  // profileservice , viewmanager profileservice ps = (profileservice) ctx.lookup("profileservice"); mgtview = ps.getviewmanager(); 

what want java naming conext (initialcontext). in order you'll need security policy (you can use java.policy file located in jboss_home/server/server_dir/conf/),security manager , environment properties context. java.naming.provider.url specifies location of jboss naming service (default port 1099).

usually have authenticate @ point done securityclient.

finally can use context grap profileservice.

at point of anoying stuff done und can start playing around. getviewmanager() returns viewmanager can create datasources on fly , getdeploymentmanager() give deploymentmanager can deploy, undeploy, start, stop applications , other deployments.

the libraries you'll need located in

  • jboss_home/client
  • jboss_home/lib
  • jboss_home/common/lib

i've read several times including jbossall-client.jar in client directory should enough that's not true. need libraries 3 directories far can tell (couldn't without referencing of them @ least). haven't figured out exact jars need though...

important: profileservice in jboss 5 community edition has bugs though got fixed in jboss 6. i'd either suggest using newer jboss version or enterprise edition.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -