Adding Classes at Run-time
by Jason Lee
I have an odd question. I have a situation where I'm manually opening a
JAR and adding its classes to the ClassLoader. What I'd like to be able
to do is have Weld scan these classes for any relevant annotations and
take the proper actions, just as if the JARs were in the classpath when
the application started. I've been staring at the JavaDocs (build
locally, btw, as I can't find them on the web :| ) but I don't see any
way to request that Weld inspect a given class. Is it there and I'm
missing it? Am I going to have cobble together that functionality? Am
I asking for something that can't be done (right now)? Any nudges in
the right direction would be much appreciated. :)
--
Jason Lee, SCJP
President, Oklahoma City Java Users Group
Senior Java Developer, Sun Microsystems
http://blogs.steeplesoft.com
12 years, 7 months
Re: [weld-dev] Pom's in maven central referring to jboss org nexus :(
by Paul Gier
Maven doesn't have a good solution for this. The choice is either change the poms in our repository or tell people not to put repos in the poms, but Nexus doesn't have a way to enforce this.
Max Rydahl Andersen <max.andersen(a)redhat.com> wrote:
>>> And yes it seems weld-parent explicitly lists repository.jboss.org in its parent pom forcing this repo to be used for resolving dependencies afaics.
>>>
>>> Even if I have nexus configured to control my dependencies it will visit that ;(
>>>
>>> I thought mirroring to maven central would not allow this to happen ?
>>
>> That rule got dropped about a year ago (maybe 18 months) due to the impracticality of it).
>
>And here I thought it was an excellent rule since it forces cleaner artifacts instead of this situation ;(
>
>> I guess this is now transitional, we can start to remove these declarations in updates to POMs as stuff get's moved to central.
>
>Well, reproducible builds are to me more important than lazy pom's ;)
>
>Much better to have a settings.xml committed if its ease of use you want for those building.
>
>> Max, could you make a WELD issue for this?
>
>I've created https://issues.jboss.org/browse/WELD-948
>
>Just to check I searched for other references and found the additional problems:
>
>CDI API: javax/enterprise/cdi-api/1.0-SP4/cdi-api-1.0-SP4.pom
>JBoss EE 6: org/jboss/spec/jboss-javaee-6.0/1.0.0.Final/jboss-javaee-6.0-1.0.0.Final.pom
>RestEasy: org/jboss/resteasy/resteasy-jaxrs-all/2.1.0.GA/resteasy-jaxrs-all-2.1.0.GA.pom (actually have about multiple external repos declared)
>
>Paul - is this really what we want for our mirroring to maven central ? I thought these things had to be cleaned up?
>
>We should get documented how users need to be careful about these - especially if this also leaks into AS7/EAP6 and dependent builds...
>
>/max
>http://about.me/maxandersen
>
>
>
13 years, 5 months
WELD-001408 Injection point has unsatisfied dependencies
by Sebastian E. Ovide
Hi All,
on Glassfish 3.0.1 I'm getting this error which doesn't make sense to me...
org.glassfish.deployment.common.DeploymentException: WELD-001408 Injection
point has unsatisfied dependencies. Injection point: field
com.sebas.SecurityEAO.saltGenerator; Qualifiers:
[@javax.enterprise.inject.Default()]
here the code:
@Stateless
public class SecurityEAO implements Serializable {
@Inject
SaltGenerator saltGenerator;
...
}
public interface SaltGenerator {
...
}
public class SaltGeneratorSecure implements SaltGenerator {
...
}
any ideas ?
--
Sebastian E. Ovide
13 years, 5 months
WELD-001423 Cannot enable the same alternative
by Sebastian E. Ovide
Hi All,
I'm getting this strange error and cannot understand the reason...
WELD-001423 Cannot enable the same alternative bean class class
com.sebas.CurrencyExchangeWebservicexNetImp in beans.xml
here is the code
public class CurrencyExchangerHelper {
@Inject
static CurrencyExchangeService currencyExchangeService;
...
}
public interface CurrencyExchangeService {
...
}
public class CurrencyExchangeMockImp implements CurrencyExchangeService{
...
}
@Alternative
public class CurrencyExchangeWebservicexNetImp implements
CurrencyExchangeService {
...
}
and my beans.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
<alternatives>
<class>com.sebas.CurrencyExchangeWebservicexNetImp</class>
</alternatives>
<decorators/>
<interceptors/>
</beans>
any ideas ?
(running Glassfish 3.0.1)
--
Sebastian E. Ovide
13 years, 5 months
memory leak in guava <r09
by Sebastian Otaegui
Hello guys,
I was reading the jenkins mailing list and someone mentioned a memory leak
in guava.
I saw that weld uses guava so I am sending you this to make you aware in
case you are not.
I haven't looked at the weld-core code, so you may not be affected.
here is the bug and it was fixed in r09
http://code.google.com/p/guava-libraries/issues/detail?id=573&can=1&q=mil...
Best regards
--
Those who do not understand Unix are condemned to reinvent it, poorly.
Any sufficiently recent Microsoft OS contains an ad hoc,
informally-specified, bug-ridden, slow implementation of half of Unix.
13 years, 5 months