Java Doc for AbsJWebContainerServiceImpl.java in  » J2EE » JOnAS-4.8.6 » org » objectweb » jonas » web » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » JOnAS 4.8.6 » org.objectweb.jonas.web 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.objectweb.jonas.service.AbsServiceImpl
   org.objectweb.jonas.web.AbsJWebContainerServiceImpl

All known Subclasses:   org.objectweb.jonas.web.jetty50.JettyJWebContainerServiceImpl,  org.objectweb.jonas.web.catalina55.CatalinaJWebContainerServiceImpl,
AbsJWebContainerServiceImpl
abstract public class AbsJWebContainerServiceImpl extends AbsServiceImpl implements JWebContainerService,AbsJWebContainerServiceImplMBean(Code)
This abstract class provides an implementation for a dynamic JWebContainerService service.
author:
   Florent Benoit
author:
   Ludovic Bert (J2EE 1.3)
author:
   Nicolas Van Caneghem (exploded ear)
author:
   Michel-Ange Anton (contributor)

Inner Class :public class WebLoaderHolder

Field Summary
final public static  StringAUTOLOADDIR
    
final public static  StringCLASS
    
final public static  StringDESCRIPTORS
    
final protected static  StringINEAR_WORK_WEBAPPS_DIR_SUFFIX
     The name of the property used in work directory for EAR webapps (in ear case).
final protected static  StringJONAS_BASE
     The name of the JONAS_BASE directory.
final public static  StringPARSINGWITHVALIDATION
    
final protected static  StringSINGLE_WORK_WEBAPPS_DIR_SUFFIX
     The name of the property used in work directory for single webapps (not ear case).
final protected static  StringWEBAPPS_DIR
     The name of the webapps directory.
final protected static  StringWORK_DIR
     The name of the working directory.
final protected static  StringWORK_WEBAPPS_DIR
     The name of the working apps directory.


Method Summary
public  voiddeployWars(Context ctx)
     Deploy the given wars of an ear file with the specified parent classloader (ejb classloader or ear classloader).
protected  voiddoInit(Context ctx)
     Initialize the service.
abstract protected  voiddoRegisterWar(Context ctx)
     Create the environment and delegate the operation to the implementation of the web container.
protected  voiddoStart()
     Start the service.
protected  voiddoStop()
     Stop the service.
abstract protected  voiddoUnRegisterWar(Context ctx)
     Delegate the unregistration to the implementation of the web container.
public  ListgetAutoloadDirectories()
     Return the list of "autoload" directories for web applications.
public  URLClassLoadergetClassLoader(URL warURL, String earAppName, ClassLoader parentLoader)
     Return the class loader of the given warURL.
public  ClassLoadergetContextLinkedClassLoader(URL warURL)
    
public  IntegergetCurrentNumberOfWars()
    
abstract public  StringgetDefaultHost()
     Return the Default host name of the web container.
abstract public  StringgetDefaultHttpPort()
     Return the Default HTTP port number of the web container (can be null if multiple HTTP connector has been set).
abstract public  StringgetDefaultHttpsPort()
     Return the Default HTTPS port number of the web container (can be null if multiple HTTPS connector has been set).
public  ListgetDeployableWars()
     Return the list of installed web applications ready to deploy.
public  ListgetDeployedWars()
     Return the list of all loaded web applications.
public  ListgetInstalledWars()
     Return the list of installed web applications.
protected static  LoggergetLogger()
    
protected  MBeanServergetMbeanServer()
    
protected  ContainerNaminggetNaming()
    
public  StringgetServerName()
    
public  StringgetServerVersion()
    
protected  URLgetUnpackDir(URL warURL, String earAppName)
     Return the URL where warURL has been unpacked.
public  WargetWar(URL url)
     Get the war identified by its URL (.war).
Parameters:
  url - the URL of the war to get.
public  SetgetWarNames()
     This method is added temporarily.
public  StringgetWebappsDirectory()
     Return the WebApps directory.
public  booleanisWarLoaded(String fileName)
     Test if the specified filename is already deployed or not
Parameters:
  fileName - the name of the war file.
public  voidregisterWarMBean(String fileName)
     Register a WAR by delegating the operation to the registerWar() method.
public  voidremoveCache(ClassLoader earClassLoader)
     Make a cleanup of the cache of deployment descriptor.
protected  voidsetServerName(String serverName)
    
protected  voidsetServerVersion(String serverVersion)
    
public  voidunDeployWars(URL[] urls)
     Undeploy the given wars of an ear file with the specified parent classloader (ejb classloader or ear classloader).
public  voidunRegisterWarMBean(String fileName)
     Unregister a WAR by delegating the operation to the unRegisterWar() method.
abstract protected  voidupdateServerInfos()
    

Field Detail
AUTOLOADDIR
final public static String AUTOLOADDIR(Code)
Web service configuration properties : Autdeployed the files in these directories



CLASS
final public static String CLASS(Code)
Web service configuration properties : Implementation of the web container



DESCRIPTORS
final public static String DESCRIPTORS(Code)
Web service configuration properties : Files deployed



INEAR_WORK_WEBAPPS_DIR_SUFFIX
final protected static String INEAR_WORK_WEBAPPS_DIR_SUFFIX(Code)
The name of the property used in work directory for EAR webapps (in ear case).



JONAS_BASE
final protected static String JONAS_BASE(Code)
The name of the JONAS_BASE directory.



PARSINGWITHVALIDATION
final public static String PARSINGWITHVALIDATION(Code)
Web service configuration properties : Xml parsing with validation



SINGLE_WORK_WEBAPPS_DIR_SUFFIX
final protected static String SINGLE_WORK_WEBAPPS_DIR_SUFFIX(Code)
The name of the property used in work directory for single webapps (not ear case).



WEBAPPS_DIR
final protected static String WEBAPPS_DIR(Code)
The name of the webapps directory.



WORK_DIR
final protected static String WORK_DIR(Code)
The name of the working directory.



WORK_WEBAPPS_DIR
final protected static String WORK_WEBAPPS_DIR(Code)
The name of the working apps directory.





Method Detail
deployWars
public void deployWars(Context ctx) throws JWebContainerServiceException(Code)
Deploy the given wars of an ear file with the specified parent classloader (ejb classloader or ear classloader). (This method is only used for the ear applications, not for the web applications).
Parameters:
  ctx - the context containing the configuration to deploy the wars.
This context contains the following parameters :
- urlsthe list of the urls of the wars to deploy.
- earURL the URLof the ear application file.
- parentClassLoader the parentclassLoader of the wars.
- earClassLoader the ear classLoaderof the j2ee app.
- altDDs the optional URI of deploymentdescriptor.
- contextRoots the optional context root of thewars.

throws:
  JWebContainerServiceException - if an error occurs during thedeployment.



doInit
protected void doInit(Context ctx) throws ServiceException(Code)
Initialize the service.
Parameters:
  ctx - the configuration context of the service.
throws:
  ServiceException - if the initialization failed.



doRegisterWar
abstract protected void doRegisterWar(Context ctx) throws JWebContainerServiceException(Code)
Create the environment and delegate the operation to the implementation of the web container.
Parameters:
  ctx - the context which contains the configuration in order todeploy a WAR.
throws:
  JWebContainerServiceException - if the registration of the WARfailed.



doStart
protected void doStart() throws ServiceException(Code)
Start the service.
throws:
  ServiceException - if the startup failed.



doStop
protected void doStop() throws ServiceException(Code)
Stop the service.
throws:
  ServiceException - if the stop failed.



doUnRegisterWar
abstract protected void doUnRegisterWar(Context ctx) throws JWebContainerServiceException(Code)
Delegate the unregistration to the implementation of the web container.
Parameters:
  ctx - the context which contains the configuration in order toundeploy a WAR.
throws:
  JWebContainerServiceException - if the unregistration failed.



getAutoloadDirectories
public List getAutoloadDirectories()(Code)
Return the list of "autoload" directories for web applications. The list of all "autoload" directories



getClassLoader
public URLClassLoader getClassLoader(URL warURL, String earAppName, ClassLoader parentLoader) throws JWebContainerServiceException(Code)
Return the class loader of the given warURL. Unpack the associated war and build the loader if it's not in the cache.
Parameters:
  warURL - the url of the war we want to get the loader
Parameters:
  earAppName - the name of the ear application containing the war. Maybe null in non ear case.
Parameters:
  parentLoader - the ejb class loader of the ear. May be null in nonear case. the class loader of the given warURL.
throws:
  JWebContainerServiceException - if the process failed.



getContextLinkedClassLoader
public ClassLoader getContextLinkedClassLoader(URL warURL)(Code)

Parameters:
  warURL - the URL of the webapp Returns the ClassLoader used to link a JNDI environnment to a webapp



getCurrentNumberOfWars
public Integer getCurrentNumberOfWars()(Code)
current number of wars deployed in the JOnAS server



getDefaultHost
abstract public String getDefaultHost() throws JWebContainerServiceException(Code)
Return the Default host name of the web container. the Default host name of the web container.
throws:
  JWebContainerServiceException - when it is impossible to get theDefault Host.



getDefaultHttpPort
abstract public String getDefaultHttpPort() throws JWebContainerServiceException(Code)
Return the Default HTTP port number of the web container (can be null if multiple HTTP connector has been set). the Default HTTP port number of the web container.
throws:
  JWebContainerServiceException - when it is impossible to get theDefault Http port.



getDefaultHttpsPort
abstract public String getDefaultHttpsPort() throws JWebContainerServiceException(Code)
Return the Default HTTPS port number of the web container (can be null if multiple HTTPS connector has been set). the Default HTTPS port number of the web container.
throws:
  JWebContainerServiceException - when it is impossible to get theDefault Https port.



getDeployableWars
public List getDeployableWars() throws Exception(Code)
Return the list of installed web applications ready to deploy. The list of deployable web applications
throws:
  Exception - if the list can't be retrieved



getDeployedWars
public List getDeployedWars()(Code)
Return the list of all loaded web applications. The list of deployed web applications



getInstalledWars
public List getInstalledWars() throws Exception(Code)
Return the list of installed web applications. The WAR files or the directories with expanded web application are searched in JONAS_BASE/webapps and all webapps directories 'autoload'. The list of WAR files or the directories with expanded webapplication found
throws:
  Exception - if the list can't be retrieved



getLogger
protected static Logger getLogger()(Code)
Returns the logger.



getMbeanServer
protected MBeanServer getMbeanServer()(Code)
Returns the mbeanServer.



getNaming
protected ContainerNaming getNaming()(Code)
Returns the naming.



getServerName
public String getServerName()(Code)
Gets the name of the server which is the web container the name of the server which is the web container



getServerVersion
public String getServerVersion()(Code)
Gets the version of the server which is the web container the version of the server which is the web container



getUnpackDir
protected URL getUnpackDir(URL warURL, String earAppName) throws JWebContainerServiceException(Code)
Return the URL where warURL has been unpacked.
Parameters:
  warURL - the URL of the war
Parameters:
  earAppName - EAR Application name (can be null if not in EAR case) the URL where warURL has been unpacked.
throws:
  JWebContainerServiceException - when it is impossible to retrievethe unpacked URL.



getWar
public War getWar(URL url)(Code)
Get the war identified by its URL (.war).
Parameters:
  url - the URL of the war to get. the war indentified by its URL, or null if the war is not found.



getWarNames
public Set getWarNames()(Code)
This method is added temporarily. It will disapear when Wars will have their associated MBeans (when Wars will become manageable) the names of the wars currently deployed in the JOnAS server



getWebappsDirectory
public String getWebappsDirectory()(Code)
Return the WebApps directory. The WebApps directory



isWarLoaded
public boolean isWarLoaded(String fileName)(Code)
Test if the specified filename is already deployed or not
Parameters:
  fileName - the name of the war file. true if the war is deployed, else false.



registerWarMBean
public void registerWarMBean(String fileName) throws RemoteException, JWebContainerServiceException(Code)
Register a WAR by delegating the operation to the registerWar() method. This is used for JMX management.
Parameters:
  fileName - the name of the war to deploy.
throws:
  RemoteException - if rmi call failed.
throws:
  JWebContainerServiceException - if the registration failed.



removeCache
public void removeCache(ClassLoader earClassLoader)(Code)
Make a cleanup of the cache of deployment descriptor. This method must be invoked after the ear deployment by the EAR service.
Parameters:
  earClassLoader - the ClassLoader of the ear application to removefrom the cache.



setServerName
protected void setServerName(String serverName)(Code)

Parameters:
  serverName - The serverName to set.



setServerVersion
protected void setServerVersion(String serverVersion)(Code)

Parameters:
  serverVersion - The serverVersion to set.



unDeployWars
public void unDeployWars(URL[] urls)(Code)
Undeploy the given wars of an ear file with the specified parent classloader (ejb classloader or ear classloader). (This method is only used for the ear applications, not for the war applications).
Parameters:
  urls - the list of the urls of the wars to undeploy.



unRegisterWarMBean
public void unRegisterWarMBean(String fileName) throws RemoteException, JWebContainerServiceException(Code)
Unregister a WAR by delegating the operation to the unRegisterWar() method. This is used for JMX management.
Parameters:
  fileName - the name of the war to undeploy.
throws:
  RemoteException - if rmi call failed.
throws:
  JWebContainerServiceException - if the unregistration failed.



updateServerInfos
abstract protected void updateServerInfos()(Code)
Update info of the serverName and serverVersion



Methods inherited from org.objectweb.jonas.service.AbsServiceImpl
abstract protected void doInit(Context ctx) throws ServiceException(Code)(Java Doc)
abstract protected void doStart() throws ServiceException(Code)(Java Doc)
abstract protected void doStop() throws ServiceException(Code)(Java Doc)
public String getDomainName()(Code)(Java Doc)
public String getJonasServerName()(Code)(Java Doc)
public String getName()(Code)(Java Doc)
public void init(Context ctx) throws ServiceException(Code)(Java Doc)
public boolean isStarted()(Code)(Java Doc)
public void setName(String name)(Code)(Java Doc)
public void start() throws ServiceException(Code)(Java Doc)
public void stop() throws ServiceException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.