-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Paul,
On 6/27/14, 8:34 AM, Paul Taylor wrote: > I have a simple WAR based web application that uses lucene created > indexes to provide search results in a xml format, the location of > the indexes (outside of the war) are referred in the web.xml. > > It works fine locally but I want to deploy it using Elastic > Beanstalk within Amazon Webservices but for it to work I need the > data files within the war, then I can allow EB to create new > instances when load balancing/scaling and it will work because the > data fields are included in the war at deployment time. I have > checked that EB does unjar the war so that when my code comes to > use the files they will be real files not still contained within > the War. > > With that in mind where could i put the data files so they not > considered by tomcat as java classes , and supplementary question > how do I modify my pom file to do this with maven What? Java won't try to load random files as .class files. Are you launching Lucene from within the startup process of your webapp? I don't see any support for loading Lucene indexes from within a ZIP file (e.g. WAR, JAR) so you might have to bootstrap the following when deploying: 1. Know where your files are within the WAR 2. In a ServletContextListener -- perhaps the one that actually sets-up Lucene -- do the following: a. Unpack each file of your index into ${tmpdir}/lucene (or whatever) b. Configure Lucene with an IndexReader that looks at ${tmpdir}/lucene 3. Clean-up after yourself during undeploy - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTrb79AAoJEBzwKT+lPKRYGKQP/Ax0lk/Ic52pW53Y6djnLfYv 6G+o8DDKTDiqc9TA+0UEsq6TbHyQWUvtWuhNFsCYQTKYCzo50Wr+7VqUjs+kBL4w d8yKXgeJPsYlx+wCAQ7sQd6tgwDntKRrwKWX6FaHeLcE4kOc/pQpYHDDx+aOzaEW WZdFPb5v/S2emI49dFPFs2HC/O5oLLObuc5oluugCHK8N40FyNHr8yKpzhf3oOtD +s08DiaIbCDt5sYNOrUYxxhWtTE5rA+t0br4js52Zhz2wPWOnG881PzY9aO0BLfi riDgRhMUTG1MveosvHEE9YpqmE6XKJiwC3v3He8H6Pf021CBMBY1cBfyRPr2Rvbi pLNdptiAouW/g/0MvKEtZe2h54p3GwJKE3oFHWCEPeuTddFB1FnVFDBF9ibBwiAs 4ncHy0MpToGvC/FHSPwvha30UWCP33f8FL+emXwNOFo9L+rBHyE4l5QqlBQLDA7t JMbq8C8lt/wfA05NP+PEFjvdF52tgi51xOcc5h6L/MkVA6MGOj6DSeZ4sooJEDB0 DCKukEK6gI0zAW7Nfk5l60DQ/0oSV0InTGmyJYB21ICPOcs8GUBfrH00PQNHNNWX CGQ7PAV5IYEjCRvuDeHxvqYLT8ZHulWnzfzf2IedpQ6pTD/EOMMaUkoy3c9F7ssy 5pZLjlX3V3Y/wuo7HdKX =wH2V -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org