[Management, JMX/JBoss] - MBean redeploy bug?
by Doug.Palmer
I have a problem with the following in an MBean:
| package decs2.deployment;
|
| import javax.xml.bind.*;
| import org.jboss.deployment.*;
| import fuse.data.process_definition.*;
|
| public class DecsDeployer extends SubDeployerSupport implements DecsDeployerMBean
| {
| private static final String[] DEFAULT_ENHANCED_SUFFIXES = new String[]{"900:-process.xml"};
|
| public DecsDeployer()
| {
| setEnhancedSuffixes(DEFAULT_ENHANCED_SUFFIXES);
| }
|
| public void create(DeploymentInfo deploymentInfo) throws DeploymentException
| {
| try
| {
| JAXBContext jc = JAXBContext.newInstance("fuse.data.process_definition");
| }
| catch(Exception e)
| {
| throw new DeploymentException(e);
| }
| }
| }
|
Obviously the MBean does more than this but cutting it down to this shows the problem.
I package the MBean and it's interface in a jar file; I also include the fuse package in the jar file and a -service.xml file. If I deploy the jar file then everything works fine and my MBean works as expected. However, if I:
1. Deploy my MBean.
2. Call create on my MBean
3. Redeploy my MBean
4. Call create on my MBean
The second call to create fails because JAXBContext can't find the classes for the package 'fuse'. Is there a stage I have missed or is there a bug with MBean redeployment?
Regards
Doug
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966725#3966725
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966725
19 years, 8 months
[Security & JAAS/JBoss] - Re: Active Directory and LdapExtLoginModule?
by sreeni.gali
Hi ,
I am trying to use the ActiveDirectory with "LdapExtLoginModule" for authentication and authorization ..It's not working at all and tried with several options.
Pls see the my configuration files.
login-config.xml
------------------
<application-policy name="JawJaasDbRealm">
<login-module code="org.jboss.security.auth.spi.LdapExtLoginModule" flag="required" >
<module-option name="java.naming.factory.initial">com.sun.jndi.ldap.LdapCtxFactory</module-option>
<module-option name="java.naming.provider.url">ldap://151.111.195.26:389/</module-option>
<module-option name="java.naming.security.authentication">simple</module-option>
<module-option name="java.naming.security.principal">LDAPBrowse(a)ad.dot.state.mn.us</module-option>
<module-option name="java.naming.security.credentials">ldapbrowse</module-option>
<!-- bGRhcGJyb3dzZQ== -->
<module-option name="bindDN">LDAPBrowse(a)ad.dot.state.mn.us</module-option>
<module-option name="bindCredential">ldapbrowse</module-option>
<module-option name="baseCtxDN">DC=ad,DC=dot,DC=state,DC=mn,DC=us</module-option>
<module-option name="baseFilter">(sAMAccountName={0})</module-option>
<module-option name="rolesCtxDN">DC=ad,DC=dot,DC=state,DC=mn,DC=us</module-option>
<module-option name="roleFilter">(sAMAccountName={0})</module-option>
<module-option name="roleAttributeID">memberOf</module-option>
<module-option name="roleAttributeIsDN">true</module-option>
<module-option name="roleNameAttributeID">cn</module-option>
<module-option name="defaultRole">OFCVO_RGCIP_Inventory</module-option>
<module-option name="roleRecursion">-1</module-option>
<module-option name="searchScope">SUBTREE_SCOPE</module-option>
</login-module>
</application-policy>
------------------------------
web-security.xml
---------------
<security-constraint>
<web-resource-collection>
<web-resource-name>
JAW Application protected Admin pages and actions.
</web-resource-name>
Require users to authenticate.
<url-pattern>/admin/*</url-pattern>
</web-resource-collection>
<auth-constraint>
Allow Manager role to access Admin pages and actions.
<role-name>OFCVO_RGCIP_Inventory</role-name>
<!-- <role-name>MnDOT Chg Access</role-name>
<role-name>Public WitiUserTest</role-name>
-->
</auth-constraint>
</security-constraint>
<!-- <security-role>
JAW Managers
<role-name>MnDOT Chg Access</role-name>
</security-role>
<security-role>
JAW Guest User (unsecured)
<role-name>Public WitiUserTest</role-name>
</security-role>
-->
<security-role>
JAW Guest User (unsecured)
<role-name>OFCVO_RGCIP_Inventory</role-name>
</security-role>
<login-config>
<auth-method>FORM</auth-method>
<realm-name>JawJaasDbRealm</realm-name>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/loginError.jsp</form-error-page>
</form-login-config>
</login-config>
--------------------------------
jboss-web.xml file
----------------
<jboss-web>
<security-domain>java:/jaas/JawJaasDbRealm</security-domain>
<!-- Resource Environment References -->
<!--
For additional resouce-env-ref tags add a merge file called jbossweb-resource-env-ref.xml
-->
<!-- Resource references -->
<!--
For additional resouce-ref tags add a merge file called jbossweb-resource-ref.xml
-->
<resource-ref>
<res-ref-name>jms/CreditCheckQueue</res-ref-name>
<jndi-name>queue/CreditCheckQueue</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>jms/MyXAQueueConnectionFactory</res-ref-name>
<jndi-name>java:/JmsXA</jndi-name>
</resource-ref>
<!-- EJB References -->
<!--
For additional ejb-ref tags add a merge file called jbossweb-ejb-ref.xml
-->
<!-- EJB Local References -->
<!--
For additional ejb-local-ref tags add a merge file called jbossweb-ejb-local-ref.xml
-->
<ejb-local-ref>
<ejb-ref-name>ejb/InventoryFacadeLocal</ejb-ref-name>
<local-jndi-name>InventoryFacadeLocal</local-jndi-name>
</ejb-local-ref>
</jboss-web>
---------
It's just throwing the error page and asking to try once again.
i don't see much information in the log apart from the below one.
---------------------
2006-08-22 09:53:00,096 DEBUG [org.jboss.security.plugins.JaasSecurityManagerService] Created securityMgr=org.jboss.security.plugins.JaasSecurityManager@1fd245f
2006-08-22 09:53:00,096 DEBUG [org.jboss.security.plugins.JaasSecurityManager.JawJaasDbRealm] CachePolicy set to: org.jboss.util.TimedCachePolicy@5f00f9
2006-08-22 09:53:00,096 DEBUG [org.jboss.security.plugins.JaasSecurityManagerService] setCachePolicy, c=org.jboss.util.TimedCachePolicy@5f00f9
2006-08-22 09:53:00,096 DEBUG [org.jboss.security.plugins.JaasSecurityManagerService] Added JawJaasDbRealm, org.jboss.security.plugins.SecurityDomainContext@138ef1d to map
--------------
Please it's very urgent and please help me out what's missing ...
Thanks Advance.
bye
Sreeni Gali
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966724#3966724
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966724
19 years, 8 months
[JBossCache] - Re: Blob balancer using cache - concept help
by zambak
"manik.surtani(a)jboss.com" wrote : Using the file cache loader in this manner will not work, since the file cache loader serialises the attribute map of the node into a single file. Your webserver will not be able to parse and serve up this file.
|
| Perhaps this approach may help:
|
| 1) Single, JDBC based cache loader
| 2) Uploading an image will result in the servlet converting the file to a byte[] and putting this in cache (so it gets stored in the db)
| 3) Register a cache listener on the cache, which when a node is created, your cache listener writes the byte[] to your filesystem in a specified place, in the file format specified.
| 4) Since the cache will replicate it's contents, this will trigger cache listeners on each instance in your cluster, so the file is created on the filesystems on each cluster node.
Thanks for the info. I will try this approach.
Some concerns though....
1) Since image will be uploaded and stored in the DB via admin part, can I use the same BLOB column when I configure JDBC based cache loader. I mean are the BLOBs compatible (as in case with File cache loader the map is serialized so image file and cached file are not the same, is it same true for JDBC loader?) If they are not compatible, then I am going to have to waste some DB space (duplicate BLOBS in DB one BLOB is app specific, one is for cache right?)....
2) In order to evict an item when a new image with a same name is uploaded (an update) will I need to have a listener perform this action logic?
If I understand this correctly, the listener would add/remove/update blobs in the cache every time admin action adds/removes/updates an image. Then we rely on cache achitecture to propagate same behavior across the cluster.
So we have add/update/remove image (in admin)
1) store/restore/reupdate image as a BLOB in DB (depending on concern outlined in #1)
2) add image as byte[] to cache
3) action in #2 will notify the listeners on all nodes and recreate/remove image from byte[] onto a disk
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966722#3966722
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966722
19 years, 8 months
[Clustering/JBoss] - Re: Does clustering require traffic over 1098 as well as 118
by bstansberry@jboss.com
Thanks for asking; we resolved this on our support portal and I forgot to post the result here.
The issue is the RMI stub for the HA-JNDI service. Clients that connect to HA-JNDI use RMI as the transport, so each server running HA-JNDI creates an RMI stub for use in communicating with that server. When a client contacts the HA-JNDI service and downloads a proxy for that service, the proxy includes the RMI stubs for *all* the servers in the cluster. The presence of these stubs is what allows the proxy to fail over from one server to another if needed.
So, say you have a 3 server cluster, A, B and C. A client contacts C (e.g. at port 1100) and downloads an HA-JNDI proxy. The proxy includes separate RMI stubs for A, B and C.
How does C have a stub for A and B? When C joins the cluster, it fetches A and B's stubs, and sends its stub to A and B.
The traffic Anne was seeing was the normal traffic of an RMI stub communicating back to its origin server for the purpose of maintaining a "lease" on the RMI server object. This "lease" is used by RMI's distributed garbage collection; without it the RMI server object could be gc'd. By default, this communication happens when the stub is first deserialized, and every 5 minutes thereafter. This communication is part of standard RMI stub behavior; it's not something JBoss wrote.
The communication occurred on 1098 because that's the RMI port they had configured for HA-JNDI. By default in current versions of the AS, this port is 1101.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966721#3966721
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966721
19 years, 8 months
[Persistence, JBoss/CMP, Hibernate, Database] - JBoss 4.0.2, EJB QL and Left join problem
by SchlauFuchs
Hi all,
I'm currently hanging in a EJB QL which doesn't do what I expect.
This is the query:
| java.util.Collection findAllBySubNetwork(SubNetworkLocal subNetwork, long date)
| SELECT OBJECT(o) FROM ChargingPoint AS o, IN(o.history) AS h
| WHERE h.isActive = true
| AND h.beginDate <= ?2 AND (h.endDate IS NULL OR h.endDate > ?2)
| AND (h.downstreamSubNetwork = ?1 OR h.upstreamSubNetwork = ?1)
| ORDER BY o.identifier
I clear words, I'm looking for an object whose history object is valid and where the history's downstreamSubNetwork and/or upstreamSubNetwork equals to my parameter.
This is a simple left join from SQL perspective. Not as simple is because the subnetworks are objects, so it must create a secondary left join from history to subnetwork.
The resulting SQL statement for MySQL looks as this:
SELECT t0_o.PK, t0_o.IDENTIFIER
| FROM UMSPEISE_PUNKTE t0_o,
| CHARGING_POINT_HIST t1_h,
| TEIL_NETZE t2_h_downstreamSubNetwork,
| TEIL_NETZE t3_h_upstreamSubNetwork
| WHERE
| ((t1_h.IS_ACTIVE = 1 AND t1_h.BEGIN_DATE <= ?
| AND (t1_h.END_DATE IS NULL OR t1_h.END_DATE > ?)
| AND ((t2_h_downstreamSubNetwork.PK=?) OR (t3_h_upstreamSubNetwork.PK=?))
| AND t1_h.FK_DOWNSTREAM_SUB_NETWORK=t2_h_downstreamSubNetwork.PK
| AND t1_h.FK_UPSTREAM_SUB_NETWORK=t3_h_upstreamSubNetwork.PK))
| AND t0_o.PK=t1_h.FK_CP_HISTORY_HEAD
| ORDER BY t0_o.IDENTIFIER ASC;
As far as it looks to me in the bold marked lines JBoss made an inner join of my EJB QL statement. In result I can't see rows/objects) where one of history's FK_UPSTREAM_SUB_NETWORK or FK_DOWNSTREAM_SUB_NETWORK is NULL.
Using JBoss 4.02, J2EE 1.4, MySQL 4.1.10-nt.
Is this a bug of Jboss or do I have to improve my EJB QL statement? Suggestions?
Thank you for help!
Kai
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966716#3966716
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966716
19 years, 8 months