[Embedded JBoss Development] - Re: ShrinkWrap - Descriptors
by ALRubinger
OK, after the recent Jewish holiday I've had some time to reflect on this stuff. :)
Generally speaking, domain-specific extensions were always part of the plan so I'm pretty psyched that Aslak's already started to dig in here. I've always had some concerns about their implementation however (Aslak's addressed many so far).
1) Keep DSL stuff decoupled from the Archive stuff
I view these as two completely separate concerns. DSL is an API for generating descriptors. Basically an object model from which we can parse into (from a template web.xml from example) or serialize out from (marshalling). As such I'd like to be sure we keep this all cleanly away from the rest of the Archive stuff.
Aslak's already done a pretty good job here by introducing the notion of a "Descriptor". One sticky point is that the descriptor is put into place by default to be this object model thing; if the user calls "setWebXml" then we lose the facility of "addFilter" etc.
I'd instead like to see the addition of a "DescriptorAsset" which may be backed by any descriptor. Then we may have an overloaded WebArchive.setWebXml(WebXmlDescriptorAsset) method. In this setup things like "addServlet" are removed from the Container/Archive classes and kept only in the descriptor.
2) Don't bring in any external dependencies
Currently not an issue in the prototypes on stage. JDK6 JAXB is used, so ... awesome. ShrinkWrap still requires nothing except the JDK.
3) Reinventing the wheel
A sticky point is that we've already done this before, and it's called jboss-metadata. http://anonsvn.jboss.org/repos/jbossas/projects/metadata/trunk/ The problem here is that jboss-metadata:
* Has too many dependencies (jboss-logging, JBossXB, etc)
* Performs actual business logic (more than an object model should)
Just something to be aware of. We can also copy/steal a bunch of code from this project to save us time, and retrofit it as needed.
4) Don't leak this into the user API until it's done
This is more a timing issue. We're gearing up for a release of ShrinkWrap to the community very soon, and the DSL stuff isn't a required feature. So We have to be careful to keep it all hidden until it's complete/working from the user API.
This can be accomplished by keeping API stuff under the "spi" project, and doing a bulk move later.
Also I need to read/understand more about the latest comments in this Thread. My post here is really just taking Aslak's initial post and code samples into account. For instance I'm *still* not seeing the need/purpose behind "specialize". ;)
S,
ALR
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4257641#4257641
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4257641
14 years, 7 months
[JBoss Messaging Development] - Fail to get a remote JMS Session due to NullPointerException
by belcar
Hi all
My JMS client application running on JBoss 4.2.3 fails to create a JMS Session on startup due to a NullpointerException. Threads mentioned below already discuss the issue, but even when trying to change the scoping/loader the issue remains.
I've got a standalone WAR file that connects to the JBM 1.4.4 server from the ServletContextListener.contextInitialized() callback method.
I've tried adding a jboss-web.xml but without success.
13:37:18,980 INFO [StartupListener] ~~ Creating JMS Session ...
| 13:37:18,989 FATAL [StartupListener]
| java.lang.NullPointerException
| at org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.java:87)
| at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
| at org.jboss.jms.client.delegate.ClientConnectionDelegate$createSessionDelegate_6052335267724906805.invokeNext(ClientConnectionDelegate$createSessionDelegate_6052335267724906805.java)
| at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
| at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
| at org.jboss.jms.client.delegate.ClientConnectionDelegate$createSessionDelegate_6052335267724906805.invokeNext(ClientConnectionDelegate$createSessionDelegate_6052335267724906805.java)
| at org.jboss.jms.client.delegate.ClientConnectionDelegate.createSessionDelegate(ClientConnectionDelegate.java)
| at org.jboss.jms.client.JBossConnection.createSessionInternal(JBossConnection.java:269)
| at org.jboss.jms.client.JBossConnection.createSession(JBossConnection.java:91)
<jboss-web>
| <loader-repository>
| com.mycompanyl:archive=ServiceBroker.war
| </loader-repository>
| </jboss-web>
Reference:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=110051&postdays=...
https://jira.jboss.org/jira/browse/JBMESSAGING-980
http://www.jboss.org/community/wiki/ClassLoadingconfiguration
I'm stuck on this and I hope somebody can point me to a solution for this.
Thank you in advance.
Greetz
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4257631#4257631
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4257631
14 years, 7 months