[JBoss Tools] - Hibernate tools for Hibernate 4.x
by Marcel Stör
Marcel Stör [https://community.jboss.org/people/marcelstoer] created the discussion
"Hibernate tools for Hibernate 4.x"
To view the discussion, visit: https://community.jboss.org/message/752813#752813
--------------------------------------------------------------
What's the status of Hibernate tools for Hibernate 4.x?
h5. Problem
After upgrading to Hibernate 4.x the hibernate3-maven-plugin 3.0 failed. It uses hibernate-tools 3.2.4.GA internally. I could work around the issues by adding an explicit dependency to Hibernate 3.6 like so
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>3.6.10.Final</version>
</dependency>
</dependencies>
This, however, has negative side-effects because new Hibernate 4 features are not present while running hbm2ddl.
Thanks to the new data type auto-registration in Hibernate 4 (put to work by Usertype for Joda Time data types) we were able to remove all @Type(type = "org.jadira.usertype.dateandtime.joda.PersistentDateTime") annotations from our entities. Now while running hbm2ddl in Maven "works" the generated schema doesn't contain proper data type declarations because Hibernate 3.6 doesn't know about Joda Time.
h5. Hibernate tools on Github
I saw that there's some action on https://github.com/hibernate/hibernate-tools/ https://github.com/hibernate/hibernate-tools/. How likely is it that building the latest 4.0.0 SNAPSHOT from there myself will fix the above mentioned issues?
Cheers,
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/752813#752813]
Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 5 months
[Beginner's Corner] - Basic Authentication Logout in EAP6
by Alok Mishra
Alok Mishra [https://community.jboss.org/people/alokmp] created the discussion
"Basic Authentication Logout in EAP6"
To view the discussion, visit: https://community.jboss.org/message/751463#751463
--------------------------------------------------------------
I am using EAP 6 to login to web application using the following configuration.
On accessing the web application jboss automatically gives an inbuilt popup which asks for
credentials and it allows to login successfully.
Now I want to logout of the web application but could not figure out a way to do so.
Please suggest any hints.
1. *Standalone.xml (In JBoss à Standalone à Configuration ) …dev*
2. *Domain.xml (In JBoss à Domain à Configuration) …production*
Add a security-domain under below mentioned tag along with already present security domains.
Right Below ……
<subsystem xmlns="urn:jboss:domain:security:1.1">
<security-domains>
This was added.
<security-domain name="configAppSecurityDomain" cache-type="default">
<authentication>
<login-module code="RealmUsersRoles" flag="required">
<module-option name="usersProperties" value="${jboss.server.config.dir}/mgmt-users.properties"/>
<module-option name="rolesProperties" value="${jboss.server.config.dir}/mgmt-roles.properties"/>
<module-option name="realm" value="ManagementRealm"/>
<module-option name="unauthenticatedIdentity" value="nobody" />
<module-option name="password-stacking" value="useFirstPass" />
</login-module>
</authentication>
</security-domain>
For domain server (QA and Production) the location would be "${jboss.domain.config.dir}
1. *Web.xml (of Sovereign Config Web App)*
<security-constraint>
<web-resource-collection>
<web-resource-name>ConfigWebApp</web-resource-name>
<description>Configuration Application</description>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>*configAppUserRole*</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>ManagementRealm</realm-name>
</login-config>
<security-role>
<role-name>* configAppUserRole* </role-name>
</security-role>
1. *jboss-web.xml*
Add this file with the below contents next to web.xml in the Sovereign Config Web App.
<?xml version='1.0' encoding='UTF-8' ?>
<jboss-web>
<security-domain>java:/jaas/configAppSecurityDomain</security-domain>
</jboss-web>
1. *mgmt-users.properties*
Add a user in the mgmt-user.properties file (using the add-user.bat script from jboss à bin). Make sure the realm is ManagementRealm.
1. *mgmt-roles.properties*
Add the role *configAppUserRole* to above create user.
*(In JBoss à Standalone à Configuration) dev environment*
*(In JBoss à Domain à Configuration) production environment*
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/751463#751463]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 5 months
[Beginner's Corner] - jboss autostart script
by gasper jeric
gasper jeric [https://community.jboss.org/people/gjerich] created the discussion
"jboss autostart script"
To view the discussion, visit: https://community.jboss.org/message/753403#753403
--------------------------------------------------------------
hello
this maybe help someone. I modified ex jboss_init_redhat.sh script to work it for jboss 7.1
#!/bin/sh
#jboss home
JBOSS_HOME=${JBOSS_HOME:-"/opt/jboss"}
#make sure java is in your path
JAVAPTH=${JAVAPTH:-"/usr/local/jdk/bin"}
#define the classpath for the shutdown class
JBOSSCP=${JBOSSCP:-"$JBOSS_HOME/bin/jboss-cli.sh --connect command=:shutdown"}
#define the script to use to start jboss
JBOSSSH=${JBOSSSH:-"$JBOSS_HOME/bin/standalone.sh"}
#define what will be done with the console log
JBOSS_CONSOLE=${JBOSS_CONSOLE:-"/dev/null"}
JBOSS_CMD_START="cd $JBOSS_HOME/bin; $JBOSSSH"
JBOSS_CMD_STOP=${JBOSS_CMD_STOP:-"$JBOSSCP"}
if [ -z "`echo $PATH | grep $JAVAPTH`" ]; then
export PATH=$PATH:$JAVAPTH
fi
if [ ! -d "$JBOSS_HOME" ]; then
echo JBOSS_HOME does not exist as a valid directory : $JBOSS_HOME
exit 1
fi
#echo JBOSS_CMD_START = $JBOSS_CMD_START
case "$1" in
start)
cd $JBOSS_HOME/bin & echo starting...
if [ -z "$SUBIT" ]; then
eval $JBOSS_CMD_START >${JBOSS_CONSOLE} 2>&1 &
else
$SUBIT "$JBOSS_CMD_START >${JBOSS_CONSOLE} 2>&1 &"
fi
;;
stop)
if [ -z "$SUBIT" ]; then
$JBOSS_CMD_STOP & echo stopping...
else
$SUBIT "$JBOSS_CMD_STOP"
fi
;;
restart)
$0 stop
$0 start
;;
*)
echo "usage: $0 (start|stop|restart|help)"
esac
*usage*:
* sudo service jboss start
* sudo service jboss stop
* sudo service jboss restart
or this way:
* sudo /etc/init.d/jboss start
* sudo /etc/init.d/jboss stop
* sudo /etc/init.d/jboss restart
all comments apreciated
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/753403#753403]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 5 months
[Beginner's Corner] - Balancer (name) and LBGroup (name) in JBoss 7
by Willem Noorduin
Willem Noorduin [https://community.jboss.org/people/willemnoorduin] created the discussion
"Balancer (name) and LBGroup (name) in JBoss 7"
To view the discussion, visit: https://community.jboss.org/message/753335#753335
--------------------------------------------------------------
When I implement a number of clusters I end up with something like:
h1. Node app1-server (ajp://server:8109):
http://nlptc27b16.nlptc27.post.tnt/mcm?nonce=683623c6-ff2c-4a4c-abd7-a0ff... Enable Contexts http://nlptc27b16.nlptc27.post.tnt/mcm?nonce=683623c6-ff2c-4a4c-abd7-a0ff... Disable Contexts
Balancer: mycluster,LBGroup: ,Flushpackets: Off,Flushwait: 10000,Ping: 10000000,Smax: 1,Ttl: 60000000,Status: OK,Elected: 0,Read: 0,Transferred: 0,Connected: 0,Load: 0
h2. Virtual Host 1:
h3. Contexts:
/app1, Status: ENABLED Request: 0 http://nlptc27b16.nlptc27.post.tnt/mcm?nonce=683623c6-ff2c-4a4c-abd7-a0ff... Disable
h3. Aliases:
default-host
localhost
example.com
h1. Node app2-server (ajp://server:8309):
http://nlptc27b16.nlptc27.post.tnt/mcm?nonce=683623c6-ff2c-4a4c-abd7-a0ff... Enable Contexts http://nlptc27b16.nlptc27.post.tnt/mcm?nonce=683623c6-ff2c-4a4c-abd7-a0ff... Disable Contexts
Balancer: mycluster,LBGroup: ,Flushpackets: Off,Flushwait: 10000,Ping: 10000000,Smax: 1,Ttl: 60000000,Status: OK,Elected: 0,Read: 0,Transferred: 0,Connected: 0,Load: 0
All is working perfectly, but I aspect the value of Balancer of LBGroup the name of the cluster (which I use in the Proxy statements):
<Location /app1 >
ProxyPass balancer://cluster1/app1 stickysession=JSESSIONID|jsessionid nofailover=On
ProxyPassReverse balancer://cluster1/app1
</Location>
<Location /app2 >
ProxyPass balancer://cluster2/app2 stickysession=JSESSIONID|jsessionid nofailover=On
ProxyPassReverse balancer://cluster2/app2
</Location>
Now I know mycluster is a default. My question is: where in the standalona-ha.xml must I set the name of the cluster and the LBGroup name. I do not see it anywhere/
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/753335#753335]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 5 months