Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some Enhancements for buildwar command #7

Open
timtasse opened this issue Aug 14, 2015 · 2 comments
Open

some Enhancements for buildwar command #7

timtasse opened this issue Aug 14, 2015 · 2 comments

Comments

@timtasse
Copy link

hi,

i play a little bit with the new buildwar command and found some errors in the generated web.xml.

  1. it creates a webapp 2.3 web.xml it's a little bit outdated 2.5 or 3.0 seems more state of the art:
    replace the DOCTYPE and insert web-app starting tag like this for 3.0:
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
  2. the files.prefix context-param has no value, this is not allowed
  3. the listener class has a load-on-startup tag, this is not allowed for listener only in servlets allowed
  4. eventually it's better to insert the JNDI config direct in the war file META-INF/context.xml
  5. in buildwar.py, do_copy_media und do_copy_static read the URL entries from settings.py and then joined it with os.path.join, but when the second parameter starts with '/' on MacOS it not joins, see PythonDoc

thx

@beachmachine
Copy link
Owner

Hi!

Thanks for your suggestions. I've included all of them, except 4. Including JNDI config in META-INF/context.xml means that this configuration is for the Django application only - which is working without JNDI anyway. I only see advantages in using JNDI on Django with a server wide configuration, so that several applications can share a database connection.

@timtasse
Copy link
Author

timtasse commented Sep 4, 2015

hi,

the advantage of using JNDI-config in the war is the better portability between application servers and using the connection pooling from the appserver. pooling over appserver can then monitored with JMX or psi-probe or whatever. an additional parameter for including the context.xml would be nice, not all want such a feature but the possibility would be nice.

@beachmachine beachmachine reopened this Sep 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants