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

LoadTimeWeaver for WebSphere [SPR-4331] #9010

Closed
spring-projects-issues opened this issue Jan 13, 2008 · 6 comments
Closed

LoadTimeWeaver for WebSphere [SPR-4331] #9010

spring-projects-issues opened this issue Jan 13, 2008 · 6 comments
Labels
has: votes-jira Issues migrated from JIRA with more than 10 votes at the time of import in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

David J. M. Karlsen opened SPR-4331 and commented

Implement a suitable LoadTimeWeaver for use on WebSphere Application Server.
I guess this is important since spring is certified on WebSphere: http://blog.interface21.com/main/2007/06/21/spring-framework-certified-on-websphere/
Being able to use LTW without having to specify any javaagent would ease deployment.


Affects: 2.5.1

Referenced from: commits 9c071e5, f191be5

10 votes, 10 watchers

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

As far as we are aware, WebSphere does not provide an API for ClassLoader-specific instrumentation at this point. We'll revisit this for Spring 3.0, using whatever WebSphere 7.0 will be introducing for its full JPA support (which requires weaving as well).

So for the time being, InstrumentationLoadTimeWeaver seems to be the best supported option on WebSphere.

Juergen

@spring-projects-issues
Copy link
Collaborator Author

David J. M. Karlsen commented

Maybe it's possible to use something of this:
http://rbodkin.blogs.com/ron_bodkins_blog/2005/10/websphere_loadt.html

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

As far as I understand, Ron's plugin is just a replacement for a Java agent - available for JDK 1.4. Any such plugin still needs to be specified in the global server configuration, not applying on a per-application basis...

The JPA SPI contract requires load-time weaving with application-specific ClassFileTransformers too, so any fully Java EE 5 compliant server needs to have ClassLoaders that support this. Spring can use the same "addTransformer" style API for a LoadTimeWeaver then. So with WebSphere 7 at the latest, we should have the runtime facility that we need for supporting a LoadTimeWeaver.

Unfortunately, JPA previews - such as the one in JBoss 4.2 or in the WebSphere 6.1 feature pack - usually do not support pluggability of JPA providers yet (for which they'd need to support application-specific ClassFileTransformers). For that reason, our options for general load-time weaving are limited on those platforms. Using the general spring-agent.jar is effectively the sole option there.

Juergen

@spring-projects-issues
Copy link
Collaborator Author

Michael Vorburger commented

Any plans to do this at least for WAS 7.x? (PS: Could this http://rbodkin.blogs.com/ron_bodkins_blog/2005/10/websphere_loadt.html be of any interest?)

@spring-projects-issues
Copy link
Collaborator Author

Paul Benedict commented

Could it be hacked together using AspectJ?

@spring-projects-issues
Copy link
Collaborator Author

Costin Leau commented

Hi guys,

The LTW for WebSphere 7 is not available in trunk. I have tested it on WebSphere 7.0.0.9 and 7.0.0.13 (that is fix pack 9 and 13) with and without AspectJ.Not sure if you guys are following this but feedback is definitely welcomed especially regarding the various classoading configuration scenarios available.

The LTW is already hooked into the auto-detection process so there's nothing special you need to do except the context:load-time-weaver/ declaration (see the docs for more information).

Note that it's impossible to support a LTW on WebSphere 6 (which ironically delayed this feature as we had no expectations that something has really changed) at least out of the box. I'm not sure whether there are any packs or fixes that address this but with WebSphere 7 available for a while, I think this gives us a good start.

@spring-projects-issues spring-projects-issues added type: enhancement A general enhancement in: core Issues in core modules (aop, beans, core, context, expression) has: votes-jira Issues migrated from JIRA with more than 10 votes at the time of import labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.1 M1 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has: votes-jira Issues migrated from JIRA with more than 10 votes at the time of import in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant