Mutli threaded Using Spring XML

Hi Experts,
I am very new to Spring and I am trying to make thread pool using Spring (.xml). Using Core Java I was to write a Java class but in spring I need you ppl help.
I have a Java class one, two three and four.
I want to execute Java class one, two and three in parallel. Once this parallel task is done I need to execute Java class four.
How can I write the xml file for this. Please help me in this.
Regards,
Kalai

Who says you can write XML to do that?
In any case if you want to find some Spring way to do it, read the online Spring manual. Its quite complete you know. If it isn't in there, you probably cannot do it and you'll have to find some other way, like write some code.

Similar Messages

  • Using Spring JMS DefaultMessageListenerContainer within Oracle CEP

    Hi everyone,
    I need to use a DefaultMessageListenerContainer Spring bean (from spring-jms.jar), have the wlevs bean factory to assemble it (it depends from a POJO) and set it as a property of an Adapter bean.
    How do I do it?
    I tried to put the spring-jms.jar into the xbootclasspath but it depends from spring-core.jar. If i put spring-core.jar into the xbootclasspath, the server dies screaming.
    Documentation says i can use legacy Spring beans within an OCEP application, well how do i do it? Can anyone tell me the right steps to do?

    Thanks for the answer :), i just had to import the appropriate packages into the MANIFEST.MF, put all the classes referring to spring-jms into the bundle and away i went.
    The application starts, listens to the JMS destination (an Oracle AQ queue) and dequeues messages correctly.
    I still have a problem when i try to suspend/uninstall the application from the OCEP visualizer.
    The JMS listener is encapsulated into an OCEP ResumableBean/SuspendableBean. It gets created and started (with a call to DefaultMessageListenerContainer.start()) within the beforeResume() method. I hoped that putting a call to DefaultMessageListenerContainer.shutdown() within the suspend() method would do the trick but... the undeployment hangs for a while, then the following is printed on stdout:
    ####<13-gen-2011 17.09.15 CET> <Error> <org.springframework.osgi.extender.internal.util.concurrent.RunnableTimedExecution> <> <myServer> <[ACTIVE] ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <> <> <1294934955875> <BEA-000000> <Closing runnable for context OsgiBundleXmlApplicationContext(bundle=cepcc-adapter-test-aq, config=osgibundle:/META-INF/spring/*.xml) did not finish in 10000ms; consider taking a snapshot and then shutdown the VM in case the thread still hangs>
    ####<13-gen-2011 17.09.15 CET> <Notice> <Deployment> <> <myServer> <[ACTIVE] ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <> <> <1294934955895> <BEA-2045001> <The application bundle "cepcc-adapter-test-aq" was undeployed successfully>
    ####<13-gen-2011 17.09.29 CET> <Warning> <Spring> <> <myServer> <Timer-5> <> <> <> <1294934969426> <BEA-2047008> <Exception encountered while stopping application "cepcc-adapter-test-aq": java.lang.IllegalStateException: BundleContext is no longer valid
    java.lang.IllegalStateException: BundleContext is no longer valid
         at org.eclipse.osgi.framework.internal.core.BundleContextImpl.checkValid(BundleContextImpl.java:1047)
         at org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(BundleContextImpl.java:694)
         at org.springframework.osgi.service.importer.support.internal.support.ServiceWrapper.getService(ServiceWrapper.java:99)
         at org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor$ServiceLookUpCallback.doWithRetry(ServiceDynamicInterceptor.java:107)
         at org.springframework.osgi.service.importer.support.internal.support.RetryTemplate.execute(RetryTemplate.java:83)
         at org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor.lookupService(ServiceDynamicInterceptor.java:430)
         at org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor.getTarget(ServiceDynamicInterceptor.java:415)
         at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)
         at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
         at $Proxy371.unregisterMBean(Unknown Source)
         at com.bea.wlevs.spring.MBeanRegistrationBeanPostProcessor.destroy(MBeanRegistrationBeanPostProcessor.java:145)
         at com.bea.wlevs.spring.ApplicationContextLifecycle.onContextClosedEvent(ApplicationContextLifecycle.java:261)
         at com.bea.wlevs.spring.ApplicationContextLifecycle.onApplicationEvent(ApplicationContextLifecycle.java:149)
         at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
         at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
         at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
         at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
         at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:819)
         at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.doClose(AbstractOsgiBundleApplicationContext.java:197)
         at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$501(AbstractDelegatedExecutionApplicationContext.java:69)
         at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$2.run(AbstractDelegatedExecutionApplicationContext.java:214)
         at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
         at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.normalClose(AbstractDelegatedExecutionApplicationContext.java:210)
         at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.close(DependencyWaiterApplicationContextExecutor.java:379)
         at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.doClose(AbstractDelegatedExecutionApplicationContext.java:236)
         at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:794)
         at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$3.run(ContextLoaderListener.java:807)
         at org.springframework.osgi.extender.internal.util.concurrent.RunnableTimedExecution$MonitoredRunnable.run(RunnableTimedExecution.java:60)
         at org.springframework.scheduling.timer.DelegatingTimerTask.run(DelegatingTimerTask.java:66)
         at java.util.TimerThread.mainLoop(Timer.java:512)
         at java.util.TimerThread.run(Timer.java:462)
    >
    I also tried a call to DefaultMessageListenerContainer.setTaskExecutor passing it an anonymous class like this:
    container.setTaskExecutor(new TaskExecutor() {
    @Override
    public void execute(Runnable task) {
    logger.debug("Submitting runnable task");
    executorPool.submit(task);
    where executorPool is an instance field of the OCEP bean initialized like this: executorPool = Executors.newFixedThreadPool(8);
    Anyway the result is the same, when i perform the uninstall from the OCEP visualizer the application is undeployed, but with the same painful message.
    Any hint on what i'm doing wrong?
    Thanks in advance!
    Edited by: javawarrior2003 on 13-gen-2011 17.29

  • How to force simple tags and null attributes to appear when using SQL/XML?

    Hello everybody:
    I'm developing a non-schema based XMLType view.
    When the XML document is generated, i noticed two things I need to manage in order to achieve the desired result:
    1. Oracle generates a <tag></tag> pair for each XMLELEMENT defined; in my case, some tags need to appear as <tag/>... how do I do? Is it possible when using schema based XMLType views? Is it possible while using a non-schema approach?
    2. When using XMLATTRIBUTE('' AS "attribute") or XMLATTRIBUTE(NULL AS "attribute"), no one attribute with label "attribute" and null value appears at the output; how do I force to Oracle DB to render those attributes which are with no values (needed to render those attributes as another parsing code will await for all the items)?
    3. Some tip about how to route the output to an XML text disk file will be appreciated.
    Thanks in advance.
    Edited by: Enyix on 26/02/2012 11:21 PM
    Edited by: Enyix on 26/02/2012 11:22 PM

    Hello odie_63, thanks for your reply:
    Reasons why needed single tags are these two next: Needed to generate a single XML file from 50,000,000 rows, where the XML ouput matches not only row data but another default values for another elements and attributes (not from database but using strings and types with default values); by using start and end tag, the generated file is as much twice bigger than using single tags; second, needed a very precise presentation for all the document.
    For generating that document, currently focus is based on using a batch process relying on Spring Batch with using a single JDBC query where a join happens between two tables. From my point of view, that approach uses: database resources, network resources, disk resources, and processing resources, including the price of making the join, sending to network, creating objects, validating, and making the file (Expending too much time generating that XML file). That processs currently is in development.
    I think possibly another approach is delegating the complete generation of that file to the database using its XML capabilities. My current approach following your recomendations is to generate a clob where I will put all the XML and putting it into a table. It leads me to another issues: Considering limitations on memory, processing and disk space, needed to append a single row-as-xml into the clob as soon as possible, and putting the clob inside the field as soon as possible, or putting the clob inside the field, and appending into it as the data is generated; so How do I manage the process in order to achieve that goals?. Seen these issues aren't related to my original question, so I'll open a new post. Any help will be apreciated.
    Thanks again in advance.

  • Validate xslt against JDK5 so we can remove the 'Use SAP XML Toolkit' flag

    We are working on PI7.1 and have hit an issue with an XSLT mapping. We were getting an error when testing that said:
    TransformerException during XSLT processing:
    javax.xml.transform.TransformerException: com.sun.org.apache.xalan.internal.xsltc.TransletException: com.sun.org.apache.xalan.internal.xsltc.TransletException: java.io.FileNotFoundException
    We found a few threads on SDN pointing us to using the 'Use SAP XML Toolkit' flag, which we'd not even noticed before. Ticking this flag did get us around the problem. Further investigation suggested to us, however, that this flag will not be available in future releases, so I guess our best solution would be to try and resolve the issues in our mapping against the current version of java (JDK5). When we use other tools such as XMLSPY they do not detect a problem with the XSLT. Can anyone point me to a tool that would enable us to validate our XSLT file against JDK5, which will provide us with error messages that will enable us to fix the error and therefore remove the 'Use SAP XML Toolkit' flag?
    thanks,
    Malcolm.

    > Can anyone point me to a tool that would enable us to validate our XSLT file against JDK5, which will provide us with error messages that will enable us to fix the error and therefore remove the 'Use SAP XML Toolkit' flag?
    I am sorry to have to say that even inside SAP nobody can answer this question.
    In principle it will work when it is pure XSLT 1.1 but some commands from XSLT 2.0 might work also.

  • How to use Spring MVC instead of assembler.jsp in endeca 3.1.0

    Hi ,
    I am new to Endeca . I want to use spring MVC instead of assembler.jsp .Some body please help
    me how can i do it. Wht all i have to do to achieve it.
    Thanks
    Mark

    Hi Mark,
    When using the 3.1 Assembler in your application, you can use either the jar file directly or set up the Assembler as an HTTP service and process the XML or JSON responses. Neither of these approaches conflicts with using Spring in your application.
    Sean

  • Exception in thread "main" org.xml.sax.SAXParseException:

    Hi everybody,
    I had a code which is running good in the output till error comes,i want to remove that error in xml file and replace with blanck(or null value) by using string function.
    It will be a great help if some body could modify my code .
    import javax.xml.bind.Validator;
    import javax.xml.parsers.*;
    import org.xml.sax.SAXException;
    import org.xml.sax.XMLReader;
    import org.xml.sax.helpers.DefaultHandler;
    import java.util.jar.Attributes;
    import java.io.File;
    class Reading extends DefaultHandler
    public static void main(String args[])throws Exception
    SAXParserFactory spf = SAXParserFactory.newInstance();
    SAXParser sp = spf.newSAXParser();
    File file=new File("C://raj.xml");
    sp.parse(file,new Reading());
    /*XMLReader xmlr=sp.getXMLReader();
    xmlr.setContentHandler(new Reading());
    xmlr.parse("first.xml");*/
    private Object args;
    public void startElement(String uri,String localName,String qName,
    Attributes attributes)
    System.out.println(qName);
    public void characters(char []ch,int start,int length)
    String str=new String(ch,start,length);
    System.out.print(str);
    public void endElement(String uri,String localName,String qName)
    System.out.println(qName);
    // Get a validator from the schema.
    //Validator validator = schema.newValidator();
    /*String file;
    try {
    Object validator;
         Object source;
         ((Object) validator).validate(source);
    System.out.println(file + " is valid.");
    catch (SAXException ex) {
    System.out.println(file + " is not valid because ");
    System.out.println(ex.getMessage());
    /* Object args;
              if (args.length != 1) {
    System.err.println("Exception in thread "main" org.xml.sax.SAXParseException: The entity "content_ppov_1704781_1091806592456" was referenced, but not declared.");
    System.exit(1);
    //public boolean equalsIgnoreCase(String anotherString)
    //String s="content_ppov_1704781_1091806592456";
    //String s1="null";
    //Object error = null;
    //Stringreplace(content_ppov_1704781_1091806592456,null);
    //return null;
    //System.out.println("");
    //private void Stringreplace(Object error, Object object) {
         // TODO Auto-generated method stub
    /* Object internal;
         private String file;
         // Let's suppose that lines in the underlying input stream are known
    // to be no greater than 80 characters long.
         // Emit an error message, and delete the resource:
                   String msg = file+ "content_ppov_1704781_1091806592456";
                   //void getServer().errlog(this, msg);
                   delete();
                        private void delete() {
                             // TODO Auto-generated method stub
                        private void errlog(Reading reading, String msg2) {
                             // TODO Auto-generated method stub
    and my raj.xml file is like this
    <div>This is a data .</div>]]>
    </TEXT>
    </content>
    &content_1234789; // this line of error is comming
    </content>
    thanks in advance.
    The error message displaying on console is
    Exception in thread "main" org.xml.sax.SAXParseException: The entity "content_ppov_1704781_1091806592456" was referenced, but not declared.
         at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1213)
         at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromEntity(DefaultEntityHandler.java:601)
         at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1264)
         at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
         at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
         at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
         at javax.xml.parsers.SAXParser.parse(SAXParser.java:331)
         at runner.Reading.main(Reading.java:18)

    The error is in your XML input, not in your Java code. Probably the XML doesn't declare its encoding, so the parser assumes that it is encoded in UTF-8. And probably it contains some character (like an accented letter, for example) that is not part of the UTF-8 encoding. So contact the person who created the XML -- which is not well-formed XML, by the way -- and get them to fix it. It's possible that declaring the encoding as ISO8859-1 might work, but it might not. All depends on what the invalid character is.

  • Problem with Using Spring IoC and Web Start

    Greetings Everyone,
    I have a small Swing app that runs using spring to load its dependencies. I can run it from a single signed jar file locally, and I setup my .jnlp file to try it with Web Start.
    Unfortunately, I get the following:
    java.security.AccessControlException: access denied (java.lang.RuntimePermission accessDeclaredMembers)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
         at java.security.AccessController.checkPermission(AccessController.java:546)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
         at java.lang.SecurityManager.checkMemberAccess(SecurityManager.java:1662)
         at java.lang.Class.checkMemberAccess(Class.java:2157)
         at java.lang.Class.getDeclaredMethods(Class.java:1790)
         at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:429)
         at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:412)
         at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:363)
         at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:296)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:745)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:448)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
         at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:881)
         at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:597)
         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:366)
         at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
         at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
         at org.chibgrant.main.MainPOE.main(MainPOE.java:31)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.javaws.Launcher.executeApplication(Launcher.java:1321)
         at com.sun.javaws.Launcher.executeMainClass(Launcher.java:1267)
         at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:1066)
         at com.sun.javaws.Launcher.run(Launcher.java:116)
         at java.lang.Thread.run(Thread.java:619)
    I am running build 1.6.0_13-b03. Anyone run into this before?
    Thanks for any insights...!

    I suspect you may have solved this yourself by now, but in case not.
    I've recently created a desktop application that uses Spring and is launched via Java Web Start and I did have a problem getting it to launch via Web Start until I modified my code to ensure the classloader setup is done before any Spring methods are called.
    i.e.
        // This is needed for Java Web Start compatibility.
        UIManager.getLookAndFeelDefaults().put("ClassLoader", Loader.class.getClassLoader());In may application this code is invoked in the class that starts my application (Loader) before I load anything via Spring.
    Cheers,
    Stephen.

  • Can I cluster a web app that uses Spring and iBATIS?

    I have a web app that uses Spring and iBATIS. It runs great on a single server. I am now trying to get it to run in a cluster. I went through the code and made all the classes serializable. Also, I added the distributable tag to the web.xml. I then deployed it to two clustered app servers.
    When I logon and use the web app, everything goes well. Then, as a test, I determine which app server is being used and stop the web app on it. As I try to continue my session, the following exceptions are generated from the other node:
    java.lang.IllegalArgumentException: No SqlMapClient specified.
    The exception is being thrown from the Spring code. Is there something else I need to do to get Spring and iBatis to work in a clustered environment.
    Also, I see a lot of references to Terracotta as a clustering solution. Will Terracotta work with Oracle App Server?

    Thanks for the response.
    I think my session information is being shared. I've configured the default application in my OC4J configured for peer-to-peer clustering. Before I did this, if I shut down the instance I was using, it would fail-over to the other application server but my session would be gone and I would be forced to logon again. But once I was logged on, everything ran smoothly.

  • Execute C# in PowerShell: errors with " using System.XML "

    Hi , I'm trying to execute C# code in Power Shell 2.0 .
    My problem is for the references  at the beginning of the code:
    $code = @"
    using System;
    using System.Collections;
    using System.IO;
    using System.Linq;
    using System.Xml;
    using System.Xml.Linq;
       public class Program
            static void Main()
            {  /* the code wich works*/
    Add-Type  -TypeDefinition $code -Language "CSharpVersion3"
    Powershell give me an error saying that " The type or namespace Linq doesn't exist" , and the same for Xml. I have Visual studio express 2013 .
    How can add or import correctly those references? or what is my error?

    Hi Rebegg,
    As this issue is related to Visual Studio, I suggest you create a new thread on Visual Studio forum, more experts will assist you with this issue.
    Visual Studio forum:
    http://social.msdn.microsoft.com/Forums/en-US/home?category=visualstudio
    In addition, about this issue, you have to add your  assemblies to your PowerShellsession before you can reference them to you C# Code, you can use the script like:
    $Assem = (
    ...add referenced assemblies here...
    $Source = @"
    ...add C# source code here...
    Add-Type -ReferencedAssemblies $Assem -TypeDefinition $Source -Language CSharp
    Here are some similar posts for your reference:
    http://ruudvanderlinden.com/2010/10/19/running-inline-c-with-custom-assemblies-in-powershell-2-0/
    http://powershell.com/cs/media/p/133.aspx
    http://blogs.technet.com/b/stefan_gossner/archive/2010/05/07/using-csharp-c-code-in-powershell-scripts.aspx
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Toplink project using sessions.xml

    Hi All
    Can i avoid using the Toplink sessions.xml. i.e. can i some how run my application with out using the sessions.xml, passing the login information and toplink java project class as runtime parameters.
    I use Toplink 10.0.3 with Oracle database.
    Thanks in advance,

    You do not have to use sessions.xml. It is provided as a convenience mechanism for configuring the session through the SessionManager. It includes configuration beyond what is in the project definition for some of the runtime/deployment details:
    - different login (if required)
    - external transaction controller
    - logging
    - session event listeners
    - cache synchronization
    All of these can alternatively be configured in you application code and the project can be generated from the Mapping Workbench (XML or Java Class) or hand written.
    Project project = XMLProjectReader.read("TS_ExampleProject.xml", Thread.currentThread().getContextClassLoader());
    Server server = project.createServerSession();
    server.logMessages();
    // configure connection pool usage
    // configure external tx controller
    server.login();
    Doug

  • Enable Windows Feature using Unattended.xml

    Hi All
    Is it possible to enable a windows feature (ex. Search) using unattended.xml while running task-sequence. I am aware that we can do it using DISM but wanted to know if this can be done using XML.
    Please let me know.
    Thank you.
    Regards
    Regards Ram

    Thanks much Jason.
    I also found the a
    thread explaining the same. I couldn't find this yesterday :( 
    Regards Ram

  • Not able to run validation using validation.xml & validator-rules.xml

    Hello Friends,
    I am not able to run validation using validation.xml & validator-rules.xml.
    Entire code in running prefectly but no error messages are prompted.
    Following is my code:
    File Name : struts-config.xml
    <struts-config>
    <!-- Form Beans Configuration -->
    <form-beans>
    <form-bean name="searchForm"
    type="com.solversa.SearchForm"/>
    </form-beans>
    <!-- Global Forwards Configuration -->
    <global-forwards>
    <forward name="search" path="/search.jsp"/>
    </global-forwards>
    <!-- Action Mappings Configuration -->
    <action-mappings>
    <action path="/search"
    type="com.solversa.SearchAction"
    name="searchForm"
    scope="request"
    validate="true"
    input="/search.jsp">
    </action>
    </action-mappings>
    <!-- Message Resources Configuration -->
    <message-resources
    parameter="ApplicationResources"/>
    <!-- Validator Configuration -->
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames"
    value="/WEB-INF/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    </plug-in>
    </struts-config>
    <br> File Name : <b> validation.xml </b>
    <form-validation>
    <formset>
    <form name="searchForm">
    <field property="name" depends="minlength">
    <arg key="label.search.name" position = "0"/>
    <arg1 name="minlength" key="${var:minlength}" resource="false"/>
    <var>
    <var-name>minlength</var-name>
    <var-value>5</var-value>
    </var>
    </field>
    <field property="ssNum" depends="mask">
    <arg0 key="label.search.ssNum"/>
    <var>
    <var-name>mask</var-name>
    <var-value>^\d{3}-\d{2}-\d{4}$</var-value>
    </var>
    </field>
    </form>
    </formset>
    </form-validation>
    <br> File Name : <b> SearchForm.java </b>
    package com.jamesholmes.minihr;
    import java.util.List;
    import org.apache.struts.validator.ValidatorForm;
    public class SearchForm extends ValidatorForm
    private String name = null;
    private String ssNum = null;
    private List results = null;
    public void setName(String name) {
    this.name = name;
    public String getName() {
    return name;
    public void setSsNum(String ssNum) {
    this.ssNum = ssNum;
    public String getSsNum() {
    return ssNum;
    public void setResults(List results) {
    this.results = results;
    public List getResults() {
    return results;
    <br> File Name : <b> SearchAction.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public final class SearchAction extends Action
    public ActionForward execute(ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception
    EmployeeSearchService service = new EmployeeSearchService();
    ArrayList results;
    SearchForm searchForm = (SearchForm) form;
    // Perform employee search based on what criteria was entered.
    String name = searchForm.getName();
    if (name != null && name.trim().length() > 0) {
    results = service.searchByName(name);
    } else {
    results = service.searchBySsNum(searchForm.getSsNum().trim());
    // Place search results in SearchForm for access by JSP.
    searchForm.setResults(results);
    // Forward control to this Action's input page.
    return mapping.getInputForward();
    <br> File Name : <b> EmployeeSearchService.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    public class EmployeeSearchService
    /* Hard-coded sample data. Normally this would come from a real data
    source such as a database. */
    private static Employee[] employees =
    new Employee("Bob Davidson", "123-45-6789"),
    new Employee("Mary Williams", "987-65-4321"),
    new Employee("Jim Smith", "111-11-1111"),
    new Employee("Beverly Harris", "222-22-2222"),
    new Employee("Thomas Frank", "333-33-3333"),
    new Employee("Jim Davidson", "444-44-4444")
    // Search for employees by name.
    public ArrayList searchByName(String name) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees.getName().toUpperCase().indexOf(name.toUpperCase()) != -1) {
    resultList.add(employees[i]);
    return resultList;
    // Search for employee by social security number.
    public ArrayList searchBySsNum(String ssNum) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees[i].getSsNum().equals(ssNum)) {
    resultList.add(employees[i]);
    return resultList;
    <br> File Name : <b> Employee.java </b>
    package com.solversa;
    public class Employee
         private String name;
         private String ssNum;
         public Employee(String name, String ssNum) {
         this.name = name;
         this.ssNum = ssNum;
         public void setName(String name) {
         this.name = name;
         public String getName() {
         return name;
         public void setSsNum(String ssNum) {
         this.ssNum = ssNum;
         public String getSsNum() {
         return ssNum;
    Pls help me out.
    Not able to prompt errors.

    Hello Friends,
    I am not able to run validation using
    validation.xml & validator-rules.xml.
    Entire code in running prefectly but no error
    messages are prompted.
    Following is my code:
    File Name : struts-config.xml
    <struts-config>
    <!-- Form Beans Configuration -->
    <form-beans>
    <form-bean name="searchForm"
    type="com.solversa.SearchForm"/>
    ans>
    <!-- Global Forwards Configuration -->
    <global-forwards>
    <forward name="search" path="/search.jsp"/>
    global-forwards>
    <!-- Action Mappings Configuration -->
    <action-mappings>
    <action path="/search"
    type="com.solversa.SearchAction"
    name="searchForm"
    scope="request"
    validate="true"
    input="/search.jsp">
    tion>
    </action-mappings>
    <!-- Message Resources Configuration -->
    <message-resources
    parameter="ApplicationResources"/>
    <!-- Validator Configuration -->
    <plug-in
    className="org.apache.struts.validator.ValidatorPlugI
    ">
    <set-property property="pathnames"
    value="/WEB-INF/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    >
    </struts-config>
    <br> File Name : <b> validation.xml </b>
    <form-validation>
    <formset>
    <form name="searchForm">
    <field property="name" depends="minlength">
    <arg key="label.search.name" position = "0"/>
    <arg1 name="minlength" key="${var:minlength}"
    resource="false"/>
    <var>
    <var-name>minlength</var-name>
    <var-value>5</var-value>
    </var>
    </field>
    <field property="ssNum" depends="mask">
    <arg0 key="label.search.ssNum"/>
    <var>
    <var-name>mask</var-name>
    <var-value>^\d{3}-\d{2}-\d{4}$</var-value>
    </var>
    </field>
    /form>
    </formset>
    form-validation>
    <br> File Name : <b> SearchForm.java </b>
    package com.jamesholmes.minihr;
    import java.util.List;
    import org.apache.struts.validator.ValidatorForm;
    public class SearchForm extends ValidatorForm
    private String name = null;
    private String ssNum = null;
    private List results = null;
    public void setName(String name) {
    this.name = name;
    public String getName() {
    return name;
    public void setSsNum(String ssNum) {
    this.ssNum = ssNum;
    public String getSsNum() {
    return ssNum;
    public void setResults(List results) {
    this.results = results;
    public List getResults() {
    return results;
    <br> File Name : <b> SearchAction.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public final class SearchAction extends Action
    public ActionForward execute(ActionMapping
    mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception
    EmployeeSearchService service = new
    EmployeeSearchService();
    ArrayList results;
    SearchForm searchForm = (SearchForm) form;
    // Perform employee search based on what criteria
    was entered.
    String name = searchForm.getName();
    if (name != null && name.trim().length() > 0) {
    results = service.searchByName(name);
    else {
    results =
    service.searchBySsNum(searchForm.getSsNum().trim());
    // Place search results in SearchForm for access
    by JSP.
    searchForm.setResults(results);
    // Forward control to this Action's input page.
    return mapping.getInputForward();
    <br> File Name : <b> EmployeeSearchService.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    public class EmployeeSearchService
    /* Hard-coded sample data. Normally this would come
    from a real data
    source such as a database. */
    ivate static Employee[] employees =
    new Employee("Bob Davidson", "123-45-6789"),
    new Employee("Mary Williams", "987-65-4321"),
    new Employee("Jim Smith", "111-11-1111"),
    new Employee("Beverly Harris", "222-22-2222"),
    new Employee("Thomas Frank", "333-33-3333"),
    new Employee("Jim Davidson", "444-44-4444")
    // Search for employees by name.
    public ArrayList searchByName(String name) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if
    (employees.getName().toUpperCase().indexOf(name.toU
    pperCase()) != -1) {
    resultList.add(employees[i]);
    return resultList;
    // Search for employee by social security number.
    public ArrayList searchBySsNum(String ssNum) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees[i].getSsNum().equals(ssNum)) {
    resultList.add(employees[i]);
    return resultList;
    <br> File Name : <b> Employee.java </b>
    package com.solversa;
    public class Employee
         private String name;
         private String ssNum;
         public Employee(String name, String ssNum) {
         this.name = name;
         this.ssNum = ssNum;
         public void setName(String name) {
         this.name = name;
         public String getName() {
         return name;
         public void setSsNum(String ssNum) {
         this.ssNum = ssNum;
         public String getSsNum() {
         return ssNum;
    Pls help me out.
    Not able to prompt errors.
    Hi,
    Your error message are not displaying because u does not made Message-Resoucrce property file (Resource Bundle) when you make it .
    give it entry in
    struts-config.xml
    <message-resources parameter="ApplicationResources" />
    and
    define key and corresponding error message to key in this ApplicationResources i.e
    #Error Resources
    label.search.ssNum=Plz Enter correct ssNum

  • How to send job postings to multiple third party sites using the XML output

    Dear Friends,
    We are Implementing Irecruitment for our client, Client requirement is how can we send job postings to multiple third party sites using the XML output from i-Recruitment
    With regards
    Surya
    .

    Can you be more specific about your Requirement. In General, Please navigate to iRecruitment Recruiter Responisbility.
    Then Select, Setup > Recruiting Sites. Here, you can configure your Third Party Websites information and attach stylesheets. The default mode oracle sends the vacancy information is HR-XML Format.
    If you would like to select more sites information select "Add Another Row".
    Then, you can see this information while "New Vacancy Creation Process".
    iRecruiter.
    Edited by: iRecruiter on Oct 18, 2009 7:43 AM

  • HOW TO: Use the XML parser in Oracle 8.1.7

    I am trying to figure out how to use the xml parser provided in oracle 8.1.7. all i want to do is parse a xml report that is defined using a schema, and place the data into the proper tables. i am totally unfamiliar with the xml parser and how it works. i have done some reading on the subject, but seem to be getting some conflicting infromation about which utilites i need and how to invoke them. can someone please tell me what utilities i need, how to invoke them, and what i need to do to get a xml document to parse and insert to a table? I would greatly appreciate any help anybody could offer. thanks.

    You can parse the XML Document with XML Parser and place the data into database using XSU(XML SQL Utility).
    Both of these are included in XDK for Java at:
    http://otn.oracle.com/tech/xml/xdk_java
    The following document could also help:
    Oracle9i XML Developer's Guide--XDK [PDF] at http://otn.oracle.com/tech/xml/doc.html

  • Can I Use a XML file as Managed Resource?

    Hi,
    I have a XML file which has all employee details.
    Can I use that XML file as a Resource in IDM?
    If so please let me know the steps to do.
    Please help me in this regard.
    Thanks
    RMS

    No.
    Since the XML file you have has custom tags, there is not a way for IDM to understand it's contents.
    IDM does offer a "Simulated" resource, which is an XML based resource, but it has a defined structure. You might be able to alter your XML to match what the Simulated Resource expects, or better yet, get it into a database and use the database table adapter.

Maybe you are looking for

  • Superdrive: Cd reader and Burner works but DVD's won't read

    Hey, anyone have any ideas? My CD burner and player work great, I burn off of it all the time. However if I try to insert a DVD it makes noises, like it's trying to read but spits it back out. I tried resenting it but nothing is working. Anyone have

  • Mail app crashes with large mailbox (25k+ messages)

    When connected to an exchange account, large mailboxes, whether split across multiple folders or all in the inbox, cause the mail app to crash occasionally. Nothing is lost, but it is not behavior I am comfortable with and I want to know if there is

  • Zen Xtra Code 10 problem

    I have a 60gb Nomad Jukebox Zen Xtra (not sure what order those words belong in ). I'm running Windows 7 64 bit. Last week this worked fine, plug it in, navigate it like I would a harddri've. Now I plug it in and it tells me that it's an MTP device a

  • Need help getting app onto ipod touch

    my computer recently died on me so i've got a lend of my friends laptop at the moment. i authorised the computer to my ipod and then purchased a few apps but it wont let me put the apps i downloaded on my friends laptop (using my account of course) o

  • Odd sound from 24-inch LED in sleep mode

    Hello. I got the new 24-inch LED Cinema Display about a week ago. Looks awesome. Noticed an odd sound though that comes from the display when my MacBook Pro goes in sleep mode and only then. It's not extremely loud but is high pitched and is emanatin