JNDI name rules
by David M. Lloyd
Historically we've allowed lots of crazy binding setups, from
unqualified names to non-java: names to java:/ names. In EE 6 we have
these nice namespaces now, and we've previously talked about adding a
java:jboss namespace as well.
So I'd like to propose the following naming rules:
- "java:/foo/bar" is transformed to "java:jboss/user/foo/bar"
- "foo/bar" is transformed to "java:jboss/user/foo/bar"
- "java:foo/bar" is invalid
This will allow people to continue using their odd legacy names but
still provide predictable semantics.
Thoughts?
--
- DML
13 years, 8 months
[PATCH] Export javax.xml.stream.api from javaee.api
by Mark McLoughlin
This fairly straightforward WAR:
http://markmc.fedorapeople.org/rhevm-api-mock.war
includes RESTEasy, Spring and uses JAX-B.
Test using:
$> wget -O - --http-user=foo --http-password=bar --header='Accept: application/xml' http://localhost:8080/rhevm-api-mock/
resteasy-jaxb-provider pulls in stax-api, but we exclude it from the WAR
in order to avoid this error with EAP5:
java.lang.LinkageError: loader constraint violation: when resolving field
"DATETIME" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader)
of the referring class, javax/xml/datatype/DatatypeConstants, and the class loader
(instance of <bootloader>) for the field's resolved type, javax/xml/namespace/QName,
have different Class objects for that type
(A similar error is seen under AS7 if stax-api is included)
However, we see this error under AS7:
Servlet.service() for servlet Resteasy threw exception: java.lang.ClassNotFoundException:
javax.xml.stream.XMLStreamException from [Module "deployment.rhevm-api-mock.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:184) [:1.0.0.Beta17]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:357) [:1.0.0.Beta17]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:329) [:1.0.0.Beta17]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:306) [:1.0.0.Beta17]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:100) [:1.0.0.Beta17]
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.createMarshaller(JAXBContextImpl.java:768) [jaxb-impl-2.1.12.jar:]
Now, some of the packages in stax-api are already exported by the
javax.api module:
<path name="javax/xml/datatype"/>
<path name="javax/xml/namespace"/>
and re-exported to web apps via javaee.api.
This patch includes the rest of the stax-api packages in the javaee.api
exports by exporting javax.xml.stream.api from there.
An alternate apparoach would be to fold javax.xml.stream.api into
javax.api completely.
---
.../resources/modules/javaee/api/main/module.xml | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/build/src/main/resources/modules/javaee/api/main/module.xml b/build/src/main/resources/modules/javaee/api/main/module.xml
index 0d71380..b354415 100644
--- a/build/src/main/resources/modules/javaee/api/main/module.xml
+++ b/build/src/main/resources/modules/javaee/api/main/module.xml
@@ -52,6 +52,7 @@
<module name="javax.xml.bind.api" export="true"/>
<module name="javax.xml.registry.api" export="true"/>
<module name="javax.xml.soap.api" export="true"/>
+ <module name="javax.xml.stream.api" export="true"/>
<module name="javax.xml.ws.api" export="true"/>
<!-- This one always goes last. -->
--
1.7.4.2
13 years, 8 months
Installing a JDBC driver as a deployment
by Heiko Braun
(Referring to http://community.jboss.org/wiki/DataSourceConfigurationinAS7#Installing_a...)
How is this supposed to work?
I manage to install the driver as a deployment and then what?
It's not listed as a driver but seems to be installed successfully.
1) deployment of the driver
[localhost:9999 /] deploy /Users/hbraun/Desktop/mysql-connector-java-5.1.6.jar
undefined
[localhost:9999 /] deploy /Users/hbraun/Desktop/mysql-connector-java-5.1.6.jar
'mysql-connector-java-5.1.6.jar' is already deployed (use -f to force re-deploy).
2) check installed driver
[localhost:9999 /] /profile=default/subsystem=datasources:read-children-names(child-type=jdbc-driver)
{
"outcome" => "success",
"result" => ["com.h2database.h2"],
"compensating-operation" => undefined
}
13 years, 8 months
Removal of a deployment from a sg only possible if all hosts are up at :remove time ?
by Heiko W.Rupp
Hi,
I had a .war deployed on a server-group that spans two boxes.
Switched the slave box off.
Tried to remove the deployed war, got
{
"outcome" => "failed",
"result" => {"host-failure-descriptions" => [("pintsize" => [
("java.lang.RuntimeException" => "Failed to execute operation "),
("java.net.ConnectException" => "Operation timed out")
])]}
}
My understanding was so far, that this request is somehow queued on the DC and
delivered to the (slave) HC when this comes online again.
Is such a queueing planned for the future? What other ways to get rid of the
deployment do I have in a scenario where the slave will never come up again
(e.g. hardware defect without a good backup)
Heiko
--
Reg. Adresse: Red Hat GmbH, Technopark II, Haus C,
Werner-von-Siemens-Ring 14, D-85630 Grasbrunn
Handelsregister: Amtsgericht München HRB 153243
Geschaeftsführer: Brendan Lane, Charlie Peters, Michael Cunningham, Charles Cachera
13 years, 8 months
deploying a war - jboss-classloading.xml
by denstar
Hi Folks!
With AS5 I'd put something like this:
<?xml version="1.0" encoding="UTF-8"?>
<classloading xmlns="urn:jboss:classloading:1.0" name="cfdistro"
domain="DefaultDomain" export-all="NON_EMPTY" import-all="true">
</classloading>
into WEB-INF/jboss-classloading.xml
But with AS7 that doesn't seem to work. Deploying as an EAR seemed to
be a bit better, but still didn't get me the isolation that I need, I
guess.
Is there a way to configure the classloading in AS7?
Is there maybe a way to create a jboss module out of a war? Seems
like there's classloading config stuff for modules, and that modules
are the tao of AS7...
Or maybe I should just be messing with jboss-web? The Beta3 of it
looks pretty similar to what I'm used to.
I'm familiar with a lot of the custom jboss-related discriptors for
classloading/configuration options for AS5, as I'm not a big fan of
having to modify the container configs to get an app to deploy, and
enjoyed being able to ship a standard ear/war that (by including a
couple of custom jboss config files), "just worked" on jboss too.
Although I don't mind doing modules and getting all OSGI and whatnot
(I do eclipse dev too), I'd really like to have a WAR or EAR that
folks can just drop in to container X.
Sorry for all the questions. I'm not even sure this is the right
place for me to be asking 'em.
I'm mostly trying to get my bearings w/AS7, I guess. I think I've
looked at most the docs in the wiki relating to it, but any
information is appreciated.
:den*
--
Philosophers are very severe towards other philosophers because they
expect too much.
George Santayana
13 years, 8 months
Important note for MSC Service authors
by David M. Lloyd
When writing MSC service implementations, your start() and stop()
methods must never block. This means these methods must not:
- Establish or use network connections
- Wait for network connections
- Sleep
- Wait on a condition
- Wait on a count down latch
- Call any method which may do any of the above
- Wait for termination of a thread pool or other service
- Wait for another service to change state!
If your service start/stop involves any of these tasks, you must use the
asynchronous start/stop mechanism (context.asynchronous()) and do one of
the following:
- Initiate your task in start()/stop(), and utilize a callback (NIO,
ThreadPoolExecutor.terminated(), etc.) to call context.complete() when
your start/stop completes instead of blocking
- Delegate your blocking task to a thread pool (Executor) which calls
context.complete() when done
- Use proper dependencies instead of explicitly waiting for services in
your start/stop
Failure to do so can cause startup delays and can even lock up the MSC
state machine! If you are unsure what the best approach is for your
problem, ping me in #jboss-as7 or #jboss-msc and I'll help you out.
--
- DML
13 years, 8 months
Deployment -- why marker files?
by Howard Gao
Hi,
In AS7 it uses a bunch of 'Marker files' to control and indicate a
deployment. Comparing to previous AS 4 I found this is not so
convenient. For example if I want to deploy an EJB jar I need to drop it
to the /deployments dir and create a .dodeploy marker file. And if my
EJB failed to deploy the marker file changed to .fail mark file. In a
debug process this deployment can be repeated many times, each time a
.dodeploy has to be manually added. And that's for a single EJB. If I
have 5 EJB jars deployed I need file marker files manually created.
In AS 4 I just drop it and done. I wonder what's the good reason for
those marker files? From a user's point of view, for what other purposes
could it be to drop something to the deployments directory than for
deploying it right away?
Thanks
Howard
13 years, 8 months
handy general purpose classes in org.jboss.as.cli
by André Dietisheim
Hi
I started working with dmr nodes and spotted some very handy classes in
org.jboss.as.cli
* Operation classes in org.jboss.as.cli.operation
* Util class in org.jboss.as.cli
Wouldn't it make sense to have them publicly available (ex. in a
dmr-util module)?
Thanks
André
13 years, 8 months