David, When i create a instance i want to enable it (so that start-on boot gets enabled). But i am not able to find in Java API (Instance Class) no option to enabled the start up on boot option. Please let me know is there any way in java api to enable start on boot option.
Rgds Srinivas David Powell wrote: > Srinivas, > > I'm happy to see you're finding the Java SCF API useful. > > > >>Can anyone in the group can review my java implementation (Enclosed >>SMFUtil.java) of creating services and instances using API's downloaded >>from http://opensolaris.org/os/project/vpanels/javascf/. >> >>Also creating services using Java API's does not create restarters so >>the services if started using enable -t option causes the service to go >>to uninitialized state. So for this we export the service details using >>svccfg export <svcname> and again import the xml using svccfg import >><svcname>, then the SMF creates restarters and the start of service >>causes the service to go to online state. Please let us know if it is >>something wrong i am doing in using the java API or is there any bug in >>the Java API. >> >> > > Keep in mind that the supported interface for creating services is to > use 'svccfg import'. Creating a service from scratch consists of > several steps, and I don't think we document those steps in detail > anywhere. It should be possible to implement all those steps using > the Java API (just as svccfg implements those steps using libscf), > but it is up to the consumer of the Java API to make sure they are > performing all the necessary steps. > > Have you tried manually creating a service from within svccfg using > the add, addpg, and setprop commands? Did that work? Is your Java > implementation producing the same results? > > At some point in the future, we may provide higher-level Java > interfaces to make service creation easier; we don't have such > interfaces today, though. > > Dave > > >