|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
3rd party ClassLoaderHello, We’ve
started encrypting our java code, which requires it to be loaded through
a 3rd party ClassLoader. We’ve gotten the Tomcat webapps
(jsp and servlets) to work by modifying the context.xml to include a custom
WebAppClassloader. However, this does not seem to work with the axis2
services. I’ve read quite a lot about how there are different loaders,
but have missed the documentation that says how to configure the
ClassLoader. I am currently hoping that there is a setting that may be
added to the axis2.xml. Any help
would be appreciated. Thank you. Charles
H. Seeley Jr. TMW Systems
Inc. Optimization
Group, Sr. Software Developer office:
972-671-0045 x 2815 fax:
972-231-9916 Proprietary
Information of TMW Systems © 2009 |
|
|
Re: 3rd party ClassLoaderHi,
If you want to use third party libs inside your service, you just need to create a directly called "lib" inside your service and add all your jar files into it. Then Axis2 will do the right thing. So with this the structure of the aar would be like following; MyService.aar META-INF services.xml lib lib1.jar lib2.jar Thanks, Deepal > > Hello, > > We’ve started encrypting our java code, which requires it to be loaded > through a 3^rd party ClassLoader. We’ve gotten the Tomcat webapps (jsp > and servlets) to work by modifying the context.xml to include a custom > WebAppClassloader. However, this does not seem to work with the axis2 > services. I’ve read quite a lot about how there are different loaders, > but have missed the documentation that says how to configure the > ClassLoader. I am currently hoping that there is a setting that may be > added to the axis2.xml. > > Any help would be appreciated. > > Thank you. > > */Charles H. Seeley Jr./* > > *TMW Systems Inc.* > > Optimization Group, Sr. Software Developer > > office: 972-671-0045 x 2815 > > fax: 972-231-9916 > > cseeley@... > > Proprietary Information of TMW Systems © 2009 > -- Thank you! http://blogs.deepal.org http://deepal.org |
|
|
RE: 3rd party ClassLoaderpackage org.apache.axis2.spring.SpringServiceTest { setup() or main() method AxisService service = createSpringService(springServiceName, new RawXMLINOutMessageReceiver(), "org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier", "springAwareService", springOperationName); createSpringAppCtx(service.getClassLoader()); UtilServer.deployService(service); public void createSpringAppCtx(ClassLoader cl) throws Exception { ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext( new String[] { "/spring/applicationContext.xml" }, false); ctx.setClassLoader(cl); ctx.refresh(); } </snip> } Martin Gainty ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Subject: 3rd party ClassLoader Date: Fri, 6 Nov 2009 11:51:48 -0500 From: CSeeley@... To: axis-user@... Hello,
We’ve started encrypting our java code, which requires it to be loaded through a 3rd party ClassLoader. We’ve gotten the Tomcat webapps (jsp and servlets) to work by modifying the context.xml to include a custom WebAppClassloader. However, this does not seem to work with the axis2 services. I’ve read quite a lot about how there are different loaders, but have missed the documentation that says how to configure the ClassLoader. I am currently hoping that there is a setting that may be added to the axis2.xml.
Any help would be appreciated.
Thank you.
Charles H. Seeley Jr. TMW Systems Inc. Optimization Group, Sr. Software Developer office: 972-671-0045 x 2815 fax: 972-231-9916
Proprietary Information of TMW Systems © 2009
Bing brings you maps, menus, and reviews organized in one place. Try it now. |
|
|
RE: 3rd party ClassLoaderThanks for the replies.
Here's where we've placed our code. \webapps\axis2\WEB-INF\services\TestService.aar \webapps\axis2\WEB-INF\lib\TestBusiness.jar The TestService web service calls a business class in the TestBusiness.jar. This works properly when the classes are left unencrypted. Once we encrypt the classes in these two files (*.class becomes *.classx), the standard ClassLoaders are unable to find the classes. In regular Tomcat WebApps we can configure the context to use a custom WebAppClassLoader which knows to look for the *.classx files and decrypt them before loading them. Modifying \webapps\axis2\META-INF\context.xml did not have the same affect in axis2 as it did in regular webapps. <Context> <Loader loaderClass="com.CustomWebAppClassLoader" useSystemClassLoaderAsParent="false" /> </Context> ----------------------------- Regarding creating a service. I've seen this mentioned in a few places, but don't understand. Where would I put code that created a service. You can't put code that creates your service in your service. Although I suppose you could spawn another service. I feel like I'm missing something simple. Thank you. Charles H. Seeley Jr. TMW Systems Inc. Optimization Group, Sr. Software Developer office: 972-671-0045 x 2815 fax: 972-231-9916 cseeley@... Proprietary Information of TMW Systems (c) 2009 -----Original Message----- From: Deepal jayasinghe [mailto:deepalk@...] Sent: Friday, November 06, 2009 11:15 AM To: axis-user@... Subject: Re: 3rd party ClassLoader Hi, If you want to use third party libs inside your service, you just need to create a directly called "lib" inside your service and add all your jar files into it. Then Axis2 will do the right thing. So with this the structure of the aar would be like following; MyService.aar META-INF services.xml lib lib1.jar lib2.jar Thanks, Deepal > > Hello, > > We've started encrypting our java code, which requires it to be loaded > through a 3^rd party ClassLoader. We've gotten the Tomcat webapps (jsp > and servlets) to work by modifying the context.xml to include a custom > WebAppClassloader. However, this does not seem to work with the axis2 > services. I've read quite a lot about how there are different loaders, > but have missed the documentation that says how to configure the > ClassLoader. I am currently hoping that there is a setting that may be > added to the axis2.xml. > > Any help would be appreciated. > > Thank you. > > */Charles H. Seeley Jr./* > > *TMW Systems Inc.* > > Optimization Group, Sr. Software Developer > > office: 972-671-0045 x 2815 > > fax: 972-231-9916 > > cseeley@... > > Proprietary Information of TMW Systems (c) 2009 > -- Thank you! http://blogs.deepal.org http://deepal.org |
| Free embeddable forum powered by Nabble | Forum Help |