<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><style type="text/css"><!-- #msg DL { border : 1px #006 solid; background-color : #369; padding : 6px; color : #fff; } #msg DT { float : left; width : 6em; font-weight : bold; } #msg DL, #msg DT, #msg UL, #msg LI { font-family : arial,helvetica,sans-serif; font-size : 10pt; } h3 { font-family : arial,helvetica,sans-serif; font-size : 10pt; font-weight : bold; } #msg PRE { overflow : auto; white-space : normal; background-color : #ffc; border : 1px #fc0 solid; padding : 6px; } #msg UL, PRE, .diff { overflow : auto; } #patch h4 { font-family : arial,helvetica,sans-serif; font-size : 10pt; } #patch h4 { padding: 8px; background : #369; color : #fff; margin : 0; } #patch .propset h4, #patch .binary h4 {margin: 0;} #patch pre {padding:0;line-height:1.2em;margin:0;} #patch .diff {background:#eeeeee;padding: 0 0 10px 0;} #patch .propset .diff, #patch .binary .diff {padding: 10px 0;} #patch span {display:block;padding:0 10px;} #patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch .add {background:#ddffdd;} #patch .rem {background:#ffdddd;} #patch .lines, .info {color:#888888;background:#ffffff;} .diff { width : 100%; } #msg DL { border : 1px #006 solid; background-color : #369; padding : 6px; color : #fff; } #msg DT { float : left; width : 6em; font-weight : bold; } #msg DL, #msg DT, #msg UL, #msg LI { font-family : arial,helvetica,sans-serif; font-size : 10pt; } h3 { font-family : arial,helvetica,sans-serif; font-size : 10pt; font-weight : bold; } #msg PRE { overflow : auto; white-space : normal; background-color : #ffc; border : 1px #fc0 solid; padding : 6px; } #msg UL, PRE, .diff { overflow : auto; } #patch h4 { font-family : arial,helvetica,sans-serif; font-size : 10pt; } #patch h4 { padding: 8px; background : #369; color : #fff; margin : 0; } #patch .propset h4, #patch .binary h4 {margin: 0;} #patch pre {padding:0;line-height:1.2em;margin:0;} #patch .diff {background:#eeeeee;padding: 0 0 10px 0;} #patch .propset .diff, #patch .binary .diff {padding: 10px 0;} #patch span {display:block;padding:0 10px;} #patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch .add {background:#ddffdd;} #patch .rem {background:#ffdddd;} #patch .lines, .info {color:#888888;background:#ffffff;} .diff { width : 100%; } --></style> <title>[rhq-project.org rhq] [2729] [RHQ-1360] if an agent plugin doesn't exist in rhq-plugin but an agent asks for it, initiate a scan which will pull down the content from the db to the filesystem</title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>2729</dd> <dt>Author</dt> <dd>mazz</dd> <dt>Date</dt> <dd>2009-01-23 10:35:30 -0600 (Fri, 23 Jan 2009)</dd> </dl> <h3>Log Message</h3> <pre>[RHQ-1360] if an agent plugin doesn't exist in rhq-plugin but an agent asks for it, initiate a scan which will pull down the content from the db to the filesystem</pre> <h3>Modified Paths</h3> <ul> <li><a href="#rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseservercoreCoreServerServiceImpljava">rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CoreServerServiceImpl.java</a></li> </ul> </div> <div id="patch"> <h3>Diff</h3> <a id="rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseservercoreCoreServerServiceImpljava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CoreServerServiceImpl.java (2728 => 2729)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CoreServerServiceImpl.java 2009-01-23 16:24:09 UTC (rev 2728) +++ rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CoreServerServiceImpl.java 2009-01-23 16:35:30 UTC (rev 2729) </span><span class="lines">@@ -283,6 +283,17 @@ </span><span class="cx"> String dir = sc.getConfiguration().getAgentFilesDirectory(); File file_to_stream = new File(dir, file); </span><span class="add">+ + // Make sure file_to_stream exists - its possible another server deployed this + // but our server hasn't had a chance to download it from the database yet. + // If this file does not exist, we need to immediately perform an agent scan + // which will pull down the plugin file from the database. + if (!file_to_stream.exists()) { + log.debug("Agent is asking for a plugin that isn't on file system [" + file_to_stream + + "] - performing plugin scan"); + LookupUtil.getAgentPluginURLDeploymentScanner().scan(); + } + </span><span class="cx"> FileInputStream fis = new FileInputStream(file_to_stream); BufferedInputStream bis = new BufferedInputStream(fis, 1024 * 32); RemoteInputStream in = ServerCommunicationsServiceUtil.remoteInputStream(bis); </span> </pre> </div> </div> </body> </html> |