Notification of shutdown commencing
by Brian Stansberry
I can't figure out a way to produce a notification of an impending
server shutdown if a user does a soft kill of the server process.
It's easy enough if shutdown is initiated by a management op; the op
handler can trigger the notification. But a soft kill triggers a
shutdown hook registered by the MSC ServiceContainer, and once that
starts, services start stopping semi-randomly and its too late to notify
anyone that that is going to start happening.
The MSC shutdown stuff isn't exposed, so there's no way to tie into
that. Adding another shutdown hook doesn't help as there's no
predictable order of execution.
--
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat
11 years, 8 months
Pull Request Retesting Ability
by Jason T. Greene
FYI,
If you submit a pull request and the test fails due to a possible
intermittent failure or some environmental problem (github was down or
something), instead of rebasing your patch to force a retest, you can
now just ask with a phrase that has "retest this please":
Could you retest this please?
jboss-as-pull-request, you are awesome, now go retest this please!
etc
--
Jason T. Greene
JBoss AS Lead / EAP Platform Architect
JBoss, a division of Red Hat
12 years, 5 months
SIP subsystem - How to map JNDI resources
by JMRecio
Hello, experts,
I started porting Mobicents SIP Servlets framework to AS7, as a
subsystem build on top of on top of 7.1.1.Final, taking advantage of the
WebContextFactory extension.
Port is quite functional already, but I am stuck at one point: sip
servlets do not have access to java:com and java:app JDNI tree, lookup
fails with javax.naming.NameNotFoundException. @Resource mappings work
ok though. HTTP Servlets and EJB can access ok to those parts of the
JNDI tree.
Any hint on where/how JNDI access is setup for HTTP servlets
deployments? I can take it from there.
More details below, including pointers to the soure and a test project
that shows the behaviour on top of the AS7 release.
Any help is much appreciated.
JM
---
Additional details:
- sip subsystem deployer code:
http://code.google.com/p/sipservlets/source/browse/containers/sip-servlet...
- test project showcasing the problem in
http://github.com/josemrecio/test5-as7-sip
build with mvn clean install and deploy on the pre-packaged Mobicents
AS7 release
start AS7 as:
$ bin/standalone.sh -c standalone-sip.xml
-Djavax.servlet.sip.dar=file:///dev/null
- Mobicents AS7 release:
http://sourceforge.net/projects/mobicents/files/Mobicents%20Sip%20Servlet...
- JNDI dump from a SIP Servlet and a HTTP Servlet in the same war and
ear component follows.
Note that HTTP Servlet has access to the full JNDI tree, but SIP Servlet
can't access java:comp or java:app
Dump Jndi view for SIP Servlet:
/ context:
\__com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate TransactionManager
java: context:
\__com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate TransactionManager
javax.naming.NameNotFoundException: java:app
java:global context:
test5-as7-sip-ear
test5-as7-sip-ejb
\__com.chema.ejb.PocheteEjbLocal$$$view18 TheEjb
\__com.chema.ejb.PocheteEjbLocal$$$view18
TheEjb!com.chema.ejb.PocheteEjbLocal
javax.naming.NameNotFoundException: java:comp
Done...
Dump Jndi view for HTTP Servlet:
/ context:
\__com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate TransactionManager
java: context:
\__com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate TransactionManager
java:app context:
\__java.lang.String AppName
\__org.jboss.as.naming.NamingContext env
sip
test5
\__org.mobicents.servlet.sip.message.SipFactoryFacade SipFactory
\__org.mobicents.servlet.sip.core.session.SipSessionsUtilImpl
SipSessionsUtil
\__org.mobicents.servlet.sip.core.timers.TimerServiceImpl TimerService
test5-as7-sip-ejb
\__com.chema.ejb.PocheteEjbLocal$$$view6 TheEjb
\__com.chema.ejb.PocheteEjbLocal$$$view6
TheEjb!com.chema.ejb.PocheteEjbLocal
java:global context:
test5-as7-sip-ear
test5-as7-sip-ejb
\__com.chema.ejb.PocheteEjbLocal$$$view6 TheEjb
\__com.chema.ejb.PocheteEjbLocal$$$view6
TheEjb!com.chema.ejb.PocheteEjbLocal
java:app/sip context:
test5
\__org.mobicents.servlet.sip.message.SipFactoryFacade SipFactory
\__org.mobicents.servlet.sip.core.session.SipSessionsUtilImpl
SipSessionsUtil
\__org.mobicents.servlet.sip.core.timers.TimerServiceImpl TimerService
12 years, 5 months
Preventing merge commits
by Jason T. Greene
If you want to prevent merge commits from ever entering a particular
branch of yours, say master, just do this:
git config branch.master.mergeoptions --ff-only
--
Jason T. Greene
JBoss AS Lead / EAP Platform Architect
JBoss, a division of Red Hat
12 years, 6 months
Limiting Server Thread Usage
by Jason T. Greene
Moving to a new thread.
The big problem we run into with this is that almost every application
of a thread pool that we have needs to be highly tailored to its usage
to get the most optimal performance. So we end up with quite a few
different pools and it becomes difficult to impose a server wide limit.
There however some potential strategies we could take. Although I am
unsure as to how the overall effectiveness would be:
1. Sharing idle threads between pools
2. Force everything to go through a special blocking thread factory via
instrumentation of java.lang.Thread. Any attempt to allocate over the
max would lead to thread reclamation attempts and finally blocking until
a timeout is reached.
3. Some kind of auto-tuning weighting model. If the max total threads is
N, force all thread pools to use a percentage of N, potentially based on
establishing current config value divided by combined total.
One thing I wonder though is if cloud providers are "barking up the
wrong tree"? It seems a better limitation of an application is raw CPU
clock time and max memory usage. How they split that time into threads
doesn't really affect the scalability of the physical server, it's all
virtual process performance (who cares if someone wastes time context
switching?).
On 9/14/11 10:39 AM, Scott Stark wrote:
> The other big cross cutting concern is controlling the total number of
> threads in use by the application server. When running under a
> constrained environment that uses something like pam_limits module to
> control how many process(==java threads) a user can have, it is
> difficult to know what the server max thread usage is right now.
>
--
Jason T. Greene
JBoss AS Lead / EAP Platform Architect
JBoss, a division of Red Hat
12 years, 7 months
logger config per deployment / app
by Ales Justin
Can you already configure loggers per deployment?
e.g. I want org.hibernate.search at trace for my app, but not for the whole AS
If yes, how?
I mean, is there a better way than adding the old TCCL filter hack I once helped to write. :)
12 years, 7 months
maven artifact based distributions/moduels/etc.
by Bill Burke
I've brought this up before, but I'd like to bring it up again. I think
it would be immensely useful to be able to reference maven artifacts
from a modules.xml file. i.e.
<module xmlns="urn:jboss:module:1.1"
name="org.jboss.resteasy.resteasy-jaxrs">
...
<resources>
<resource-root
artifact="org.jboss.resteasy:resteasy-jaxrs:2.3.4.Final"/>
</resources>
<dependencies>
...
</dependencies>
</module>
* First things first, we could ship multiple profiles very easily as all
jar dependencies point to a maven repository. A different profile
becomes 100k instead of 100M.
* Development becomes easier. If I'm coding Resteasy and testing with
AS7, I just modify the AS7 module.xml to reflect the new maven artifact
for resteasy. Then as I iterate on Resteasy, I just build resteasy, and
AS7 automatically picks up the the snapshot (without having to manually
copy jars or re-run AS7 dist scripts).
* If you combines all module.xml files and standalone.xml into one big
monster file/format a bunch of other things start to happen:
- You don't even need a JBoss distribution to run AS7. All you would
need is some small bin.jar and a maven repository.
- You instantly have a cloud-ready provisioning file format
- You instantly have a nice REST format. If you sprinkle in various
Atom links so that you can easily micro manage
- Managing the Fedora/RHEL/RPM poop becomes just managing a local maven
repository.
- You could also have a "jboss" executable that took a standalone.xml
file as a parameter. The "jboss" executable is just a tiny script around
the tiny boot.jar that should rarely change, if ever. This type of
setup, IMO, makes a Fedora distribution feasible
* I think this would make it easier to write a jboss-as7-maven-plugin as
somebody could include a full standalone.xml in their resources
directory much as the jetty-maven-plugin does with web-app/.
* Even better, allow some form of "document inheritance/overrides", then
you can embed specific jboss config/module changes directly within your
pom.xml file.
* Expand this even further and allow maven artifacts to be specified
with JAR, WAR, EAR manifests and be included as deployable elements.
This would allow a operating system wide shared library directly and
allow us full applications and their third-party dependencies to be
managed the same way Sys admins manage any other shared library on the
system.
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
12 years, 7 months
Re: [jboss-as7-dev] Can scroll on CLI GUI add Datasources
by ssilvert@redhat.com
I was planning to tag the fix for 7.2 only. But I can request that it
go into EAP6 if that's feasible.
Stan
On 5/30/2012 12:48 PM, Robb Greathouse wrote:
> Hi,
>
> First thanks.
>
> Second, this was in EAP6 Beta2. Do you know when it will be in the EAP version?
>
> Robb Greathouse
> Partner Enablement
> Middleware Business Unit
> JBoss, a Division of Red Hat
> cellphone 505-507-4906
>
> ----- Original Message -----
>> On 5/30/2012 11:08 AM, Robb Greathouse wrote:
>>> Hi,
>>>
>>> I was preparing video on using CLI. I went to add a Datasource
>>> using the CLI GUI. I found that I could not scroll. And so could
>>> not fill out the form or submit the form to add the datasource.
>>>
>>> This was on a MAC with maximum display pixels selected.
>>>
>>> Robb Greathouse
>>> Partner Enablement
>>> Middleware Business Unit
>>> JBoss, a Division of Red Hat
>>> cellphone 505-507-4906
>>>
>>> _______________________________________________
>>> jboss-as7-dev mailing list
>>> jboss-as7-dev(a)lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>> Hi Rob,
>>
>> Jesper just opened a jira on that yesterday.
>> https://issues.jboss.org/browse/AS7-4919
>>
>> I should have a pull request for the fix later today.
>>
>> Stan
>>
12 years, 7 months