Giter VIP home page Giter VIP logo

woinject's Introduction

๐Ÿš€ About Me

I'm a seasoned full-stack developer with over 20 years of experience designing JVM-based web applications. I've worked on a wide range of projects, from mission-critical software for the pharmaceutical industry to e-commerce payments that are used by thousands of users daily. I am passionate in creating software that is simple to use and easy to read and maintain. I'm also a big advocate of test-driven development. In addition to my technical skills, I have experience leading and managing small teams of developers, fostering collaboration, and achieving project goals efficiently. Being a perfectionist, I am constantly looking for new methods to improve my abilities and knowledge. When I'm not working, I enjoy spending time with friends and family, traveling, and reading books.

๐Ÿ‘ฏ Skills

My expertise spans a diverse range of programming languages, including:

  • Java
  • Clojure / ClojureScript
  • JavaScript
  • Kotlin
  • Scala
  • C

๐Ÿ”ง Core Competencies

Over the years, I've cultivated a comprehensive skillset, encompassing:

  • Software Testing and Test-Driven Development
  • Object-Oriented Programming
  • Functional Programming
  • Software Architecture and Modularization
  • Service-Oriented Architectures
  • Application Profiling and Optimization
  • User Experience

๐Ÿ› ๏ธ Projects

I've led the development of several open-source projects, including:

I'm also a contributor on the following open-source projects:

๐Ÿ“ซ Connect With Me

Feel free to reach out to me at [email protected] to discuss potential collaborations. I'm also on X (formely Twitter) and LinkedIn.

woinject's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

alextu vgadreau

woinject's Issues

Injectable Application alternative class?

It would be appreciated if the InjectableApplication class code be placed into a separate service class, so that the developer doesn't have to extend InjectableApplication. This is because it is likely that the Application class is already extending a custom Application class.

Cheers,
Matt

WOInject seems to break ERXApplication.stopPreviousDevInstance()

I didn't even realise Wonder had this feature until a couple of days ago: if you're in development mode, launch an app instance on a fixed port, and then later launch another app instance on the same port, Wonder's default behaviour is for the second instance to stop the first (via the stop direct action) and then carry on launching. I had never seen this behaviour before (I regularly see "Address already in use"), and I set out to investigate why.

It seems to be the case that adding WOInject to a Wonder project prevents the catch block here from ever executing:

@Override
public WOAdaptor adaptorWithName(String aClassName, NSDictionary<String, Object> anArgsDictionary) {
	try {
		return super.adaptorWithName(aClassName, anArgsDictionary);
	} catch (NSForwardException e) {
		Throwable rootCause = ERXExceptionUtilities.getMeaningfulThrowable(e);
		if ((rootCause instanceof BindException) && stopPreviousDevInstance()) {
			return super.adaptorWithName(aClassName, anArgsDictionary);
		}
		throw e;
	}
}

Instead of calling stopPreviousDevInstance(), an InjectableApplication logs the exception and then terminates. To reproduce:

  1. Create a test app from the ERXApplication archetype.
  2. Launch first and second instances to a fixed port, confirming that second stops first.
  3. Convert to InjectableApplication and add ApplicationRunner.
  4. Launch first and second instances to a fixed port, confirming that second dies with BindException.

I can't quite see where the exception is being swallowed, and why we don't make it back to the catch block in adaptorWithName().

Error loading com.apple.* classes

The Javassist loader delegates system classes loading to the parent ClassLoader. However, classes from Apple JDK are not included in the delegation list.

Typos in dependency declaration in documentation

The documentation front page has a couple of tiny typos in the dependency declaration:

<dependency>
    <groupid>com.woinject</groupid>
    <artifactid>woinject</artifactid>
    <version>1.2</version>
</dependency>

Obviously those elements should be groupId and artifactId. Easily corrected, but it does prevent copy & paste!

Problem running with Java 8

Hi Henrique,

It seems like there is an issue with woinject on Java 8. We upgraded our server to Java 8 this weekend and my only app using wounit doesn't want to start. Are you aware of this problem?

Thanks a lot!

Martin

Exception in thread "main" java.lang.Error: Cannot initialize the application to take advantage of WOInject features.
at com.woinject.WOInject.init(WOInject.java:89)
at com.app.AppRunner.main(AppRunner.java:8)
Caused by: java.lang.RuntimeException: java.io.IOException: invalid constant type: 18 at 15
at javassist.CtClassType.getClassFile2(CtClassType.java:204)
at javassist.CtClassType.subtypeOf(CtClassType.java:304)
at javassist.CtClassType.subtypeOf(CtClassType.java:319)
at javassist.CtClassType.subtypeOf(CtClassType.java:315)
at javassist.CtClassType.subtypeOf(CtClassType.java:315)
at javassist.compiler.MemberResolver.compareSignature(MemberResolver.java:235)
at javassist.compiler.MemberResolver.lookupMethod(MemberResolver.java:107)
at javassist.compiler.MemberResolver.lookupMethod(MemberResolver.java:84)
at javassist.compiler.TypeChecker.atMethodCallCore(TypeChecker.java:711)
at javassist.compiler.TypeChecker.atCallExpr(TypeChecker.java:688)
at javassist.compiler.JvstTypeChecker.atCallExpr(JvstTypeChecker.java:157)
at javassist.compiler.ast.CallExpr.accept(CallExpr.java:46)
at javassist.compiler.CodeGen.doTypeCheck(CodeGen.java:242)
at javassist.compiler.CodeGen.compileExpr(CodeGen.java:229)
at javassist.compiler.CodeGen.atReturnStmnt2(CodeGen.java:598)
at javassist.compiler.JvstCodeGen.atReturnStmnt(JvstCodeGen.java:425)
at javassist.compiler.CodeGen.atStmnt(CodeGen.java:363)
at javassist.compiler.ast.Stmnt.accept(Stmnt.java:50)
at javassist.compiler.CodeGen.atStmnt(CodeGen.java:351)
at javassist.compiler.ast.Stmnt.accept(Stmnt.java:50)
at javassist.compiler.Javac.compileStmnt(Javac.java:569)
at javassist.CtBehavior.insertBefore(CtBehavior.java:721)
at javassist.CtBehavior.insertBefore(CtBehavior.java:701)
at com.woinject.WOInject.init(WOInject.java:73)
... 1 more
Caused by: java.io.IOException: invalid constant type: 18 at 15
at javassist.bytecode.ConstPool.readOne(ConstPool.java:1044)
at javassist.bytecode.ConstPool.read(ConstPool.java:984)
at javassist.bytecode.ConstPool.(ConstPool.java:125)
at javassist.bytecode.ClassFile.read(ClassFile.java:770)
at javassist.bytecode.ClassFile.(ClassFile.java:114)
at javassist.CtClassType.getClassFile2(CtClassType.java:191)
... 24 more

Classloader issue when using WOBootstrap.jar

When building a woa with wobootstrap.jar embedded, we get the following exception :

Caused by: javassist.NotFoundException: com.webobjects.foundation._NSUtilities
at javassist.ClassPool.get(ClassPool.java:450)
at com.woinject.WOInject.init(WOInject.java:66)
... 6 more

The current workaround is to build without wobootstrap.jar, but the launching generates a huge command line with the whole classpath appended

Cannot inject Session scoped objects in Direct Actions

The WOSession scope gets the current Session object through the ERXSession.session() method. This method may return null if the existing session hasn't been restored yet.

In this case, the session should be restored by the WOSession scope itself.

Custom ClassLoader causes problem in runtime

The WOInject custom ClassLoader causes security exception and class loading problems. Example:

The encryption error:
java.lang.SecurityException: JCE cannot authenticate the provider BC
at javax.crypto.Cipher.getInstance(DashoA13_..)
at org.bouncycastle.openpgp.PGPEncryptedDataGenerator$PubMethod.addSessionInfo(Unknown
Source)
at org.bouncycastle.openpgp.PGPEncryptedDataGenerator.open(Unknown Source)
at org.bouncycastle.openpgp.PGPEncryptedDataGenerator.open(Unknown Source)
at com.resurgences.xdi.invs.INVSService.encryptFile(INVSService.java:1571)
(...)
Caused by: java.util.jar.JarException: Class is on the bootclasspath
at javax.crypto.SunJCE_c.a(DashoA13_..)
at javax.crypto.SunJCE_b.b(DashoA13_..)
at javax.crypto.SunJCE_b.a(DashoA13_..)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.