private synchronized void init() throws DatatypeConfigurationException { if (df == null) { df = DatatypeFactory.newInstance(); } try { jc = Utility.getSerializationContext(); } catch (Exception ex) { log.log(Level.FATAL, bundle.getString("JAXBException"), ex); } if (started == null) { GregorianCalendar gcal = new GregorianCalendar(); gcal.setTimeInMillis(System.currentTimeMillis()); started = (gcal); } }
public static String ExportServicePolicy(ServicePolicy pol) { try { JAXBContext jc = Utility.getSerializationContext(); Marshaller m = jc.createMarshaller(); StringWriter sw = new StringWriter(); // org.miloss.fgsms.services.interfaces.policyconfiguration.ObjectFactory pcsfac = new org.miloss.fgsms.services.interfaces.policyconfiguration.ObjectFactory (); m.marshal((pol), sw); String s = sw.toString(); return s; } catch (Exception ex) { Logger.getLogger(Helper.class).log(Level.ERROR, null, ex); } return null; }
public static ServicePolicy ImportServicePolicy(String pol, PolicyType pt) { try { JAXBContext jc = Utility.getSerializationContext();
DatatypeFactory fac = DatatypeFactory.newInstance(); twp.setDataTTL(fac.newDuration(10000000)); Marshaller m = Utility.getSerializationContext().createMarshaller(); StringWriter sw = new StringWriter(); m.marshal(twp, sw);
Unmarshaller um = Utility.getSerializationContext().createUnmarshaller(); results = comm.executeQuery();
Connection con = Utility.getConfigurationDBConnection(); JAXBContext jc = Utility.getSerializationContext(); comm = con.prepareStatement("" + "select * from machineinfo where hostname=? and domaincol=?;");
in.close(); JAXBContext jc = Utility.getSerializationContext(); Unmarshaller u = jc.createUnmarshaller(); ByteArrayInputStream bss = new ByteArrayInputStream(pol.getBytes(Constants.CHARSET));
in.close(); JAXBContext jc = Utility.getSerializationContext();
Unmarshaller um = Utility.getSerializationContext().createUnmarshaller(); results = comm.executeQuery();
Unmarshaller um = Utility.getSerializationContext().createUnmarshaller(); byte[] s = results.getBytes("xmlpolicy");
Unmarshaller um = Utility.getSerializationContext().createUnmarshaller(); byte[] s = results.getBytes("xmlpolicy");
Unmarshaller um = Utility.getSerializationContext().createUnmarshaller(); byte[] s = results.getBytes("xmlpolicy");
Unmarshaller um = Utility.getSerializationContext().createUnmarshaller(); byte[] s = results.getBytes("xmlpolicy");
Marshaller m = Utility.getSerializationContext().createMarshaller(); StringWriter sw = new StringWriter(); m.marshal(policy, sw);
JAXBContext jc = Utility.getSerializationContext();