[jbosstools-issues] [JBoss JIRA] (JBDS-2500) synchronize deployed archive in EAP and JBDS project source files.

Rob Stryker (JIRA) jira-events at lists.jboss.org
Fri Apr 12 19:30:55 EDT 2013


    [ https://issues.jboss.org/browse/JBDS-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766904#comment-12766904 ] 

Rob Stryker edited comment on JBDS-2500 at 4/12/13 7:30 PM:
------------------------------------------------------------

After investigating how tomcat does this, I have the following information:

1) Tomcat server can only modify the 'serve files without deployment' checkbox if the server is stopped
2) When you check the box and save the editor, it copies a custom jar file from inside the tomcat bundle into a metadata location .metadata/.plugins/org.eclipse.wst.server.core/tmp0/server/lib
3) they THEN update .metadata/.plugins/org.eclipse.wst.server.core/tmp0/conf/catalina.properties. This folder is technically the ${catalina.base} location. They modify the catalina.properties file to ensure the server/lib folder in metadata is added to the classpath when the server starts. So basically, this helps the custom jar be run with the server.
4) Then, when the server is started, it has this custom jar on the classpath, and is able to serve files without deploying. 
5) Much of the servers configuration files are stored in the workspace Servers project.  Servers/Tomcat-x.y.z/
6) A change to {workspace_root}/Servers/Tomcat-x.y.z/server.xml like below is made:
{code}
 <Context docBase="DWeb84325" path="/DWeb84325" reloadable="true" source="org.eclipse.jst.j2ee.server:DWeb84325"/></Host>
{code}
7) This seems to basically say that there's a context root, and to find the source, you must use the org.eclipse.jst.j2ee.server source locator, which is part of the custom jar added to the server's classpath copied from the tomcat bundle. 

The contents of this custom jar seems to be two class files. I have been unable to locate the source for it so far.  But, the basic summary seems to be that tomcat is basically writing extensions to the server that are run as part of the server and are completely integrated into the server's internal lifecycle and api. 

                
      was (Author: rob.stryker):
    After investigating how tomcat does this, I have the following information:

1) Tomcat server can only modify the 'serve files without deployment' checkbox if the server is stopped
2) This leads to a custom jar file to be copied from inside the tomcat bundle into a metadata location .metadata/.plugins/org.eclipse.wst.server.core/tmp0/server/lib
3) they THEN update .metadata/.plugins/org.eclipse.wst.server.core/tmp0/conf/catalina.properties  and add this deployed jar file to the classpath
4) Then, when the server is started, it has this custom jar on the classpath, and is able to serve files without deploying. 

The contents of this custom jar seems to be two class files. I have been unable to locate the source for it so far.  But, the basic summary seems to be that tomcat is basically writing extensions to the server that are run as part of the server and are completely integrated into the server's internal lifecycle and api. 
                  
> synchronize deployed archive in EAP and JBDS project source files.
> ------------------------------------------------------------------
>
>                 Key: JBDS-2500
>                 URL: https://issues.jboss.org/browse/JBDS-2500
>             Project: Developer Studio (JBoss Developer Studio)
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: servers
>            Reporter: Gary Hu
>            Assignee: Rob Stryker
>         Attachments: eclipse.png, ibm_rsa.png, jboss_try1.png, jboss_try2.png, Screenshot_Config.jpg
>
>
> Could JBDS provide a functionality that could synchronize the source and deployment in a two way manner. That is, if any change made at the server side after deploying could be pushed back to the source in the JBDS IDE.
> It seems that currently IBM RSA IDE has such feature with IBM WebSphere server. Please check the attached ibm_rsa.png for more details.
> Eclipse also could workaround this with Tomcat server by setting the "working directory" as the project workspace location something like ${workspace_loc:Project}. Please check the attached eclipse.png for more details. It doesn't seem that there's any additional functionality at server side that pushes the changes back to eclipse project. It's just a matter of setting eclipse working directory as the project source path.  However, the JBDS doesn't seem to allow user to set the "Working directory" in this way. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbosstools-issues mailing list