[JBoss/Spring Integration] - Re: jboss-spring.xml beans location
by loumaus
mmmhhh
| <bean id="catalogService" class="foo.bar.service.DefaultCatalogService" >
| <property name="catalogDao">
| <ref local="catalogDao"/>
| </property>
| </bean>
|
does not work as well ..
I already removed the autowire="byType" attribute as it did not work neither..
that was the only reason I was asking about the deployer ...
what worries me a bit is that everything seems to startup properly:
| 2007-07-06 17:08:49,866 DEBUG [org.springframework.beans.CachedIntrospectionResults] Not strongly caching class [foo.bar.dao.DefaultCatalogDao] because it is not cache-safe
| 2007-07-06 17:08:49,866 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Eagerly caching bean 'catalogDao' to allow for resolving potential circular references
| 2007-07-06 17:08:49,870 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'entityManagerFactory'
| 2007-07-06 17:08:49,906 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Creating shared instance of singleton bean 'catalogService'
| 2007-07-06 17:08:49,906 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Creating instance of bean 'catalogService' with merged definition [Root bean: class [foo.bar.servic
| e.DefaultCatalogService]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyM
| ethodName=null; defined in URL [jar:file:/home/tmaus/server/jboss-4.0.5.GA/server/default/tmp/deploy/tmp54823catalog.ear-contents/catalog-spring.spring!/META-INF/jboss-spring.xml]]
| 2007-07-06 17:08:49,908 DEBUG [org.springframework.beans.CachedIntrospectionResults] Not strongly caching class [foo-bar.service.DefaultCatalogService] because it is not cache-safe
| 2007-07-06 17:08:49,908 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Eagerly caching bean 'catalogService' to allow for resolving potential circular references
| 2007-07-06 17:08:49,909 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'catalogDao'
| 2007-07-06 17:08:49,909 DEBUG [org.jboss.spring.factory.NamedXmlApplicationContext] Publishing event in context [org.jboss.spring.factory.NamedXmlApplicationContext;hashCode=27471825]: org.springframework.cont
| ext.event.ContextRefreshedEvent[source=org.jboss.spring.factory.NamedXmlApplicationContext: display name [org.jboss.spring.factory.NamedXmlApplicationContext;hashCode=27471825]; startup date [Fri Jul 06 17:08:
| 48 CEST 2007]; root of context hierarchy]
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061354#4061354
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061354
18Â years, 9Â months
[JBoss jBPM] - Re: flexible timers
by justin.zhou
The creation of a new timer is not so obvious from the the jbpm api:
Here is the code:
protected Timer createTimer(ExecutionContext executionContext) {
| Timer timer = new Timer(executionContext.getToken());
| timer.setName(timerName);
| timer.setRepeat(repeat);
| if (dueDate!=null) {
| Duration duration = new Duration(dueDate);
| Date dueDateDate = businessCalendar.add( new Date(), duration );
| timer.setDueDate(dueDateDate);
| }
| timer.setAction(timerAction);
| timer.setTransitionName(transitionName);
| timer.setGraphElement(executionContext.getEventSource());
| timer.setTaskInstance(executionContext.getTaskInstance());
|
| // if this action was executed for a graph element
| if ( (getEvent()!=null)
| && (getEvent().getGraphElement()!=null)
| ) {
| GraphElement graphElement = getEvent().getGraphElement();
| try {
| executionContext.setTimer(timer);
| // fire the create timer event on the same graph element
| graphElement.fireEvent("timer-create", executionContext);
| } finally {
| executionContext.setTimer(null);
| }
| }
|
| return timer;
| }
So what I did instead is reuse the timer created by the system and change the dueDate of my preference. Seems worked to some extent. But I am not sure it is the right way to do. Under heavy volumn, TimerServiceBean can get runtime exception because of treecache errors. And some timers just hang in the timers table and been ignored. I will try to limit the pool size of the session bean to see if make any difference.
Anyway, I think the flexible timers should be configurable from the processdefination and some interface to calculate the dueDate provided for that purpose. Right now, I have to create spring bean for this to happen.
Justin
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061339#4061339
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061339
18Â years, 9Â months
[Security & JAAS/JBoss] - Wierd seucrity login module questions!!
by mskonda
My goal is to encrypt datasouce passwords in our current production system.
I followed the wiki and wrote a class (module) of my own. I've created (almost copied) the SecurityIdentityLoginModule to have properties such as pbePass, algo, salt and iterationCount configured.
I did the following:
- I've added the reference to the policy name in my *-ds.xml(see below)
- I've added the relevant bits in login-config.xml (see below)
- when I deploy I can see that the login module invoked is mine
However, I find these things intriguing:
- Although I have different applicaition-policy definitions for different daatasources, I can only see that my LoginModule being invoked just once! I am not sure why though - can any one explain to me if this is expected?
- Secondly if I have two datasouce definitions, one with XA and other non-XA, I can only see that the LoginModule is invoked just for Non-XA all the times. The XA version, looks like, doesn't do any authentication. I've tried to deploy just a single XA datasource and found that my LoginModule being not invoked. I am not sure why though. Is this expected, if yes, could you give me an explanation, if not, is this a bug?
- third, even if I change the password string to incorrect one deliberately, the second DS deployment doesn't complain!
Can someone throw few pointers, please?
Help/input much appreciated.
Thanks
/M
<<my datasouces>>
--------------------
| <local-tx-datasource>
| <jndi-name>JMSDS</jndi-name>
| <connection-url>jdbc:sybase:Tds:myhost:4100/MyDbMS</connection-url>
| <driver-class>com.sybase.jdbc3.jdbc.SybDataSource</driver-class>
| <use-java-context>true</use-java-context>
| <security-domain>JMSDSEncryptionPolicy</security-domain>
| <check-valid-connection-sql>SELECT @@VERSION</check-valid-connection-sql>
| <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter</exception-sorter-class-name>
| <metadata>
| <type-mapping>Sybase</type-mapping>
| </metadata>
| </local-tx-datasource>
|
| <xa-datasource>
| <jndi-name>JMSXADS</jndi-name>
| <use-java-context>false</use-java-context>
| <security-domain>JMSDSEncryptionPolicy</security-domain>
| <xa-datasource-class>com.sybase.jdbc3.jdbc.SybXADataSource</xa-datasource-class>
| <xa-datasource-property name="DatabaseName">mydb</xa-datasource-property>
| <xa-datasource-property name="ServerName">myserver</xa-datasource-property>
| <xa-datasource-property name="PortNumber">4100</xa-datasource-property>
| <check-valid-connection-sql>SELECT @@VERSION</check-valid-connection-sql>
| <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter</exception-sorter-class-name>
| <metadata>
| <type-mapping>Sybase</type-mapping>
| </metadata>
| </xa-datasource>
|
<<my login-config.xml >>
-----------------------
| <application-policy name = "JMSDSEncryptionPolicy">
| <authentication>
| <login-module code = "com.cmi2.framework.security.SecureLoginModule"
| flag = "required">
| <module-option name = "username">cmi2Trade01</module-option>
| <module-option name = "password">4d85a83e922ac8bed6cfd1f9898f3b42</module-option>
| <module-option name = "pbeAlgo">Blowfish</module-option>
| <module-option name = "pbePass">CMI2 is evolving</module-option>
| <module-option name = "securePropertiesFile">secure.properties.file</module-option>
| <module-option name = "policyName">JMSDSEncryptionPolicy</module-option>
| <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=JMSDS</module-option>
| </login-module>
| </authentication>
| </application-policy>
|
| <application-policy name = "EAIDSEncryptionPolicy">
| <authentication>
| <login-module code = "com.cmi2.framework.security.SecureLoginModule"
|
| flag = "required">
| <module-option name = "username">cmi2Trade01</module-option>
| <module-option name = "password">4d85a83e922ac8bed6cfd1f9898f3b42</module-option>
| <module-option name = "pbeAlgo">Blowfish</module-option>
| <module-option name = "pbePass">CMI2 is evolving</module-option>
| <module-option name = "securePropertiesFile">secure.properties.file</module-option>
| <module-option name = "policyName">CMITrade01EAIDSEncryptionPolicy</module-option>
| <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=CMITrade01EAIDS</module-option>
| </login-module>
| </authentication>
| </application-policy>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061336#4061336
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061336
18Â years, 9Â months