com.philemonworks.selfdiagnose.check
Class CheckJNDIBinding
java.lang.Object
com.philemonworks.selfdiagnose.DiagnosticTask
com.philemonworks.selfdiagnose.check.CheckJNDIBinding
- All Implemented Interfaces:
- Serializable
public class CheckJNDIBinding
- extends DiagnosticTask
CheckJNDIBinding is a task to check whether the naming server has a JNDI binding for a given name.
<checkjndibinding name="jdbc/mydb"/>
<checkjndibinding name="jdbc/mydb" class="mypackage.DataSource"/>
<checkjndibinding name="jdbc/mydb" class="mypackage.DataSource" url="localhost:900" factory="someFactory"/>
Stores the value found into the (optional) specified variable.
- Author:
- E.M.Micklei
- See Also:
- Serialized Form
Methods inherited from class com.philemonworks.selfdiagnose.DiagnosticTask |
createResult, getComment, getDefaultReportTemplate, getRequestor, getTaskName, getVariableName, hasComment, isReportResults, run, run, setComment, setReportResults, setRequestor, setVariableName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CheckJNDIBinding
public CheckJNDIBinding()
getDescription
public String getDescription()
- Return the description of this task.
- Specified by:
getDescription
in class DiagnosticTask
- Returns:
- String the description
initializeFromAttributes
public void initializeFromAttributes(Attributes attributes)
- Description copied from class:
DiagnosticTask
- This method is sent from the SelfDiagnoseHandler when a configuration is being processed. Use the passed
attributes to initialize the receiver.
If a variable parameter is passed then store it.
- Overrides:
initializeFromAttributes
in class DiagnosticTask
- Parameters:
attributes
- org.xml.sax.Attributes
setUp
public void setUp(ExecutionContext ctx)
throws DiagnoseException
- Description copied from class:
DiagnosticTask
- Override this method to verify that task parameters are initialized/set correctly.
- Overrides:
setUp
in class DiagnosticTask
- Parameters:
ctx
- ExecutionContext
- Throws:
DiagnoseException
hasContextFactorySpecified
public boolean hasContextFactorySpecified()
hasValueClassSpecified
public boolean hasValueClassSpecified()
run
public void run(ExecutionContext ctx,
DiagnosticTaskResult result)
throws DiagnoseException
- Description copied from class:
DiagnosticTask
- Run the task. If an error is detected then raise a DiagnoseException.
Otherwise use the result object to the report any messages when a run is completed.
- Specified by:
run
in class DiagnosticTask
- Parameters:
ctx
- ExecutionContextresult
- DiagnosticTaskResult
- Throws:
DiagnoseException
getInitalContextFactory
public String getInitalContextFactory()
- Returns:
- String initalContextFactory
getNamingServerURL
public String getNamingServerURL()
- Returns:
- String namingServerURL
getValueClassName
public String getValueClassName()
- Returns:
- String
setInitalContextFactory
public void setInitalContextFactory(String string)
- Parameters:
string
-
setNamingServerURL
public void setNamingServerURL(String string)
- Parameters:
string
-
setValueClassName
public void setValueClassName(String class1)
- Parameters:
class1
-
getJndiName
public String getJndiName()
- Returns:
- String jndiName
setJndiName
public void setJndiName(String string)
- Parameters:
string
-
Copyright © 2012. All Rights Reserved.