This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

difference in services.xml between .aar and unpacked file in Axis2?

Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I'm a little confused by a difference I've run into between unpacked files and .aar archives deployed in Axis2 on Tomcat.

I went through a tutorial on database web services where you implement theServiceLifeCycle to establish and/or close a database connection at the time the service is loaded. (Here's the link to the tutorial if you're interested, though it's probably not necessary to follow this post...)

I wanted to use the service archiver wizard plugin for eclipse, so I used it to generate the .aar file. Then I unzipped it (by renaming the extension from .aar to .zip) and editied services.xml in the WEB-INF directory to make sure the class that implements servcelifecycle is referenced and loaded when the service launches.

So far, so good. The application worked. However, when I zipped the file and renamed it to .aar (which I think is legit - a .aar, as far as I understand, is just an archive of the .class files and some configuration files), the directory that worked when unpacked threw and exception - "services.xml" not found.

Is a different mechanism invoked when Axis2 encounters a .aar file instead of an unpacked file? It's exactly the same directory, just zipped with a .aar extension.

Oh, in case it helps - if I do this but *don't* alter the services.xml file, this error doesn't occur (however, in that case, I wouldn't be able to configure the ServiceLifCycle implementation class.

Any ideas about what's going on here?

The fastest and most reliable components of any system are those that are not there. Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!