[Beginners Corner] - Stopping and starting EARs from the JMX console
by negora
Hello:
I've been checking the Wiki documentation and also searching these forums in order to find information about this issue, but every answer seemed to be more general and didn't focused on EARs in concrete.
Checking the documentation of the JMX console I've been able to restart web applications (contained into WARs) and also independent EJBs. Everything worked fine. However, playing for an hour with the JMX console I haven't been able to find anything related restart whole EARs (and thus, remap entity classes, etc.)
I've always performed the reload operation either hiding and un-hiding the EAR file/folder (making a batch file which renamed it with one point as first character and then removed it) or using the GNU program "touch" on the descriptor file of the EAR, updating its timestamp (on Windows too, thanks to the GnuWin32 project). Basically I forced the hot redeployment in both cases. However I believe that using the JMX console is more... Convenient and elegant.
Thanks to JBoss 5 I've recently tested the new Administration Console, which allows me to perform this task. However, I still wanna know if the JMX console can do the same, since I use JBoss 4 on production.
Can anyone help me? Thank you very much in advance.
PD: On the Wiki I read http://www.jboss.org/community/wiki/RedeployFromTheJMXConsole, but the list appears to be empty in my case.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250773#4250773
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250773
16 years, 8 months
[JBoss and NetBeans] - Re: Configuring JBoss 5.0.0.GA in NetBeans 6.5
by negora
I'm also facing the same problem on NetBeans v. 6.7.1 when developing an Enterprise Application which contains an EJB Module. This is because for the JBoss 5 series many common libraries were moved to the "common/lib" folder of the server root, instead of keeping them on every instance "lib" folder.
Until the NetBeans developers fix it I believe that the only solution is to import some of the JARs inside of the "common/lib" folder (or all them if you don't wanna have head aches). You don't need anything else, only that JARs.
I always did this by hand, for every project, since I didn't know that there were a feature to make "libraries" into NetBeans which can be used on every project, without the need of selecting the JARs every time. Once I discovered this (yeah, I'm still a rookie and didn't know this :P ), I made one "library" called "jboss-common" and added the required JARs. Now, on every new project I only have to select this library from the existing ones and it's done.
I believe that NetBeans should change the name to this feature and call it "Collections of libraries" or "Groups of libraries", because it doesn't consist in making Java libraries, but building lists of libraries which we want to import in a sudden, in just one click.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250769#4250769
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250769
16 years, 8 months
[Installation, Configuration & DEPLOYMENT] - Exception on ear deployment
by gt384u
I am currently running into a situation where on starting my application on JBoss 4, deployment fails as follows:
| 2009-08-20 21:30:13,527 DEBUG [org.jnp.interfaces.NamingContext] Failed to connect to 10.0.100.232:1099
| javax.naming.CommunicationException: Failed to connect to server 10.0.100.232:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 10.0.100.232:1099 [Root exception is java.net.ConnectException: Connection refused]]
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:269)
| at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1385)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:594)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:132)
| at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:88)
| at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:130)
| at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:155)
| at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:93)
| at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:105)
| at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:197)
| at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:184)
| at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1203)
| ...
|
because a necessary JNDI resource (a JMS queue) cannot be located because the remote JBoss instance being queried is down due to it also being restarted.
Is there a way to configure JBoss so that JNDI lookup attempts are performed over a longer period of time during startup so that I have a chance of catching the remote machine once it has come back up?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250764#4250764
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250764
16 years, 8 months
[Security & JAAS/JBoss] - Re: JBoss 4.2.3 and Security Annotations
by bacooper81
Ok, I'm able to authenticate users logging into the app now, but as soon as I put @SecurityDomain on a session bean, I get the following error when I make a call to a method on that bean:
javax.ejb.EJBAccessException: Authentication failure
Please let me know if you have any idea what I'm doing wrong. Thanks.
session bean:
| @Stateless
| @SecurityDomain("castOfShadows")
| public class ContentManagerBean implements ContentManager {
|
| @PersistenceContext(unitName = "castOfShadows")
| protected EntityManager entityManager;
|
|
| public List<Content> findContentByType(ContentType contentType) {
| ...
| }
|
| }
|
jboss-web.xml
| <?xml version='1.0' encoding='UTF-8' ?>
| <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN"
| "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
|
| <jboss-web>
| <security-domain>java:/jaas/castOfShadows</security-domain>
| </jboss-web>
|
jboss.xml
<?xml version="1.0"?>
| <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.2//EN"
| "http://www.jboss.org/j2ee/dtd/jboss_4_2.dtd">
| <jboss>
| <security-domain>java:/jaas/castOfShadows</security-domain>
| </jboss>
|
login-config.xml
| <?xml version='1.0'?>
| <!DOCTYPE policy PUBLIC
| "-//JBoss//DTD JBOSS Security Config 3.0//EN"
| "http://www.jboss.org/j2ee/dtd/security_config.dtd">
|
| <policy>
|
| ...
|
| <application-policy name = "castOfShadows">
| <authentication>
| <login-module
| code="org.jboss.security.auth.spi.UsersRolesLoginModule"
| flag = "required">
| <module-option
| name="usersProperties">
| props/shadows-web-users.properties
| </module-option>
| <module-option
| name="rolesProperties">
| props/shadows-web-roles.properties
| </module-option>
| </login-module>
| </authentication>
| </application-policy>
|
|
| </policy>
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250763#4250763
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250763
16 years, 8 months
[JNDI/Naming/Network] - Exception when looking up remote JNDI resource
by gt384u
I am currently running into a situation where on starting my application on JBoss 4, deployment fails as follows:
| 2009-08-20 21:30:13,527 DEBUG [org.jnp.interfaces.NamingContext] Failed to connect to 10.0.100.232:1099
| javax.naming.CommunicationException: Failed to connect to server 10.0.100.232:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 10.0.100.232:1099 [Root exception is java.net.ConnectException: Connection refused]]
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:269)
| at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1385)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:594)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:132)
| at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:88)
| at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:130)
| at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:155)
| at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:93)
| at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:105)
| at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:197)
| at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:184)
| at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1203)
| ...
|
because a necessary JNDI resource (a JMS queue) cannot be located because the remote JBoss instance being queried is down due to it also being restarted.
Is there a way to configure JBoss so that JNDI lookup attempts are performed over a longer period of time so that I have a chance of catching the remote machine once it has come back up?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250762#4250762
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250762
16 years, 8 months