Opinion: best way to do module configuration in jsf?

Hi all,
I am building modules for a webapp as jar files which basically contain facelet templates, navigation rules, beans and other jsf goodies.
One problem with this is how to do module configuration when the webapp is started. Since the module can't modify web.xml to add a startup listener, I need another way.
So far, my best idea is to create a PhaseListener and use Lifecycle.removePhaseListener to deregister it as soon as it has run once. I'm just wondering... is there a better way?
Cheers,
Roger

I see, so Thread.sleep is indeed the way to go?I'd use Timer, but there's no reason why Thread.sleep shouldn't work.
Re the crash, there's no stacktrace at all. I usually
run it, and then leave it... and after random time
(hours), it just stops without any exception.
Are you starting it from the command line with java whatever...? If so, and you're getting no stacktrace, then either it's ending cleanly because you told it to, or you're smothering an exception with something like catch (Exception exc) {
    // do nothing
}

Similar Messages

  • Best Way to Migrate a configuration from one sun webserver to another

    Hi,
    What is the best way to migrate a configuration from one Sun Webserver to another? I am using Webserver 7 Update 5 on Linux. If I just copy the configuration directory, the administration server doesn't know it. Thanks!

    I found my answer.. I found this link - http://forums.sun.com/thread.jspa?threadID=5317534

  • Best way to remove CSM configuration from a switch

    have a redundant pair of CSM , would like to move slave CSM to a new switch, what is quickest way to eliminate all configuration from this switch so the same can be installed on the new switch , without reloading the switch or causing any downtime to already existing connections through the master CSM.

    HI Imre,
    Kindly read the following section for the required :
    http://www.cisco.com/en/US/docs/interfaces_modules/services_modules/csm/4.2.x/configuration/guide/redun.html#wp1047388

  • Best way to access JNDI configured DataSource from outside container

    I'm not sure if this is the right forum category, but it seemed like a good place to start.
    I have a DB2 database on an OS/390 mainframe that is configured as a JNDI datasource in WebSphere (WSAD) 5.1.x. I can get connections and do database transactions within my web-application just fine.
    Part of my project needs a cron managed stand-alone application to do some database clean up work. It essentially needs to query one database, and then based on the results stick some data into the DB2 database. Easy enough right?
    The issue here is that our Security department will not under any circumstances give us the passwords and users for either database. They give these only to the server admins who configure WSAD. We also can't use a properties file. The server admins either won't touch any properties file (it is considered "code" and they don't want to be responsible for problems) or they won't have access to the contents of the ears or jars we give them. This basically leaves us with our JNDI datasource as the only datasource we could access (because the admins will have it configured with a username and password). There is also no way to infer a valid username/password from the owner of the web-app since it will live on an NT box and the NT user won't have mainframe rights.
    There is also no possibility of bending these rules no matter how stupid or cumbersome they are.
    So my question is, what is the best method in which to gain access to this JNDI DataSource or a Connection from this DataSource? Can I even get a DataSource from a JNDI lookup? Is JMS/RMI or some other acronymn that I don't know about the only way to acomplish this?
    We're using Struts MVC -> Spring -> Hibernate in the webapp, if that helps.
    Thanks in advance.

    You seem to be asking: "how can a standalone app get a valid DB2 connection by leveraging the live objects in a WSAD application"?
    While this is pretty far from my area of expertise, I don't think you can. While both JMS and RMI (and other technologies) can export some types of Java objects, they have to be objects that implement the java.io.Serializable interface. Connections cannot be serialized because these objects (normally) encapsulate a live TCP/IP connection. I don't see any fundamental reason a DataSource object couldn't be serialized other than security, but that very reason means that no reasonable implementation is going to be serializable; if it were serializable, you could almost certainly extract the value of the username and password from the serialized object. In other words, what you're really trying to do is get around security and Java's security is probably robust enough to prevent it.
    If the DB credentials only live in the WSAD world, that's where the database work has to be done. However, there's no reason the work can't be driven by a servlet or JSP that is in turn invoked from a cron-driven script or application. Personally, I do such "event notifier" scripts in Perl; Java is a bit heavy for "start up, post to URL, shutdown", but if you have more work going on you could certainly use Java. If actually doing the work in the WSAD application is not acceptable, then you're probably stuck.

  • Best way to accomplish this configuration UC540

    Hi there,
    Customer wants all calls to main DID to go to a prompt and automatically transfer to a blast group.  Is there an easy way to do this minus BACD?
    Thanks!
    HelpDesk

    Hi Help Desk,
    To expand a little further on what Darren was saying, I just did a rebuild of a UC-520 on Monday night and needed to do the same as what you are trying to achieve, and I did it using the following method.
    Incoming calls get sent to an AA, no options presented just an announcement with the timer set low
    Calls get transferred to reception phone first
    Reception phone has a timer of 16 seconds if unanswered it times out and sent to Blast group
    Blast Group has a timer of 10 seconds
    If still unanswered then call is sent to reception VM using the 6... TransferVM option
    Reception VM has mini AA enabled, using CCA I configured options like you would in the AA of which one was to be transferred back into the Blast Group, or call externally to mobiles, or to continue to hold and be transferred to the VM
    This method seems to be working very well and the client is very happy with it, yes there is no hold music when doing it, but this is a limitation of the system which has been clearly outlined to the client to set their expectations correctly, whilst we could use a B-ACD (Hunt Group) to achieve the on-hold music, it is not what they wanted.
    I dont know if the above method would help, but it is the work around I have discovered and at least know I can use this methodology in the future for other sites
    Cheers,
    David Trad.

  • What is the best way to capture CUCM configurations?

    Rather than clicking though the drop down menus in CUCM, what is the most efficient way to capture a complete configuration settings in CUCM?  I know some of the settings can be done using BAT, but what about other settings like Enterprise Parameters, DHCP server/subnet, etc.?  If the captured configurations are in human readable format will be even better.

    [+5] to Rob and Brandon for sharing more info.
    Hi Brandon,
    I downlaoded the latest software  cipinventory-v0.11 from the site and unzipped it .I could find four files and not any exe .I have attached the snapshot.
    when I click on .pl file it asks which program to be used for opening.
    Am I following the correct procedure or missing something?
    regds,
    aman

  • Best Way to Configure Multi-boot System With GRUB/GRUB2

    Hello again,
    Sorry for posting so much, but I'm really enjoying Arch so far! I had been reading a lot about Cinnamon so I wanted to try it (without installing the dependencies on my Arch installation), so I decided to install Mint, that went fine, and then I was hoping to add the entry to GRUB. I couldn't figure out how to do this, so I decided to try and install GRUB2 because it can autodetect other OS'. Well it didn't work and then I found myself without a bootloader. I couldn't figure out how to reinstall grub to the MBR (I tried the solution in the wiki and a couple of other places). I decided to reinstall Mint, and now I am booting into Arch through Mint's GRUB2. Two questions:
    1) How can I fix grub through Arch to have that as my bootloader again? Nothing seems to work that I've tried.
    2) What is the best way to configure grub or grub2 from Arch to allow myself options to multiboot other OS's in the future? I want to learn as much about UNIX as possible so I was planning on installing some other Linux distros and some other non-Linux UNIX OS's. I know this is a really newbie question, but I'm at a loss, I thought it was easier than it turned out.
    PS. I didn't really like Cinnamon that much. I've been using Xfce and Openbox since I started using Linux (about a month ago), and it just seems too complicated! I don't like how little options you are given for customization. But that's just my opinion, everyone is different, I can see how it would be an improvement over GNOME3.
    Thank You!

    I have Arch Linux and Debian Testing installed side by side on my laptop.
    Arch uses Grub (legacy) and Debian uses Grub2. The way I have set it up is to have Arch's Grub on the MBR and then chainload Debian's Grub2 from there.
    Debian's Grub2 is installed on its own partition rather than on the MBR
    This is the line I use to chainload Grub2 from Grub (legacy)
    # (4) Debian chainload
    title Debian chainload
    root (hdX,X)
    chainloader +1
    Additionally just for kicks, I also have an entry in Grub2 to get back to Grub.
    menuentry "Arch Linux chainload" {
    insmod part_msdos
    insmod ext2
    set root='(hd0)'
    chainloader +1
    boot
    Note that the (hd0) above always points to the MBR.
    I do not have to bother with one bootloader interfering with the other and the OS entries on each are handled separately on their own.
    This setup has worked well for me for quite a while now. Before I started with Arch, I used a similar setup when I tried out various distros (Fedora,opensuse,etc.) alongside Ubuntu
    Hope it helps !

  • What is the best way to use EJB modules with JAX-WS?

    Hi.
    I am doing a project that returns EAN13 encoded data to external java clients.
    I think I need to use a webservice that send response, a webservice client that send the request, and other project that transforms a data to an EAN encoded data, returns it and store it in MySql database.
    It is possible that I need to authenticate users for every request made.
    -I have created a EJB module contained into Glassfish for the webservice
    -I have created a Common Java project with 3 layers: Entities, bussines and data access layer for mysql database
    -I have a project for the webservice client with JAX-WS ( is the best choice? or Would be better JAX-RPC? )
    **How would you suggest me create the structure of the project with all the java power?*
    **Could you help me with goods tutorial of design patterns about webservices using EJB and the best way for use databases for this kind of projects ( I have heard about JNDI, Hibernate, Session EJB, ... )?*
    **Would be better use other EJB module instead of a Common java project that has classes?*
    h3. {color:#333399}I shall be pleased with your help{color}

    Kappy is dead on correct about Bridge Mode as a requirement for the Time Capsule.
    Do you know how to check to see if the Time Capsule is configured this way?
    Next question.....you really should not try to have two wireless networks....one Arris and another Time Capsule.....unless it is absolutely necessary. Two wireless routers in close proximity can create wireless interference effects that can cause problems with either...or both...networks.
    Best to turn off the wireless on one router to keep the chances of wireless interference between routers minimized.
    Are both the Arris and Time Capsule providing wireless signals?

  • What is the "best" way to configure iTunes on an iMac with personal user acounts so each user can access the media library but sync devices on their personal user account?

    I am trying to determine the best way to set up our imac so each user account can access the same media (songs, movies etc.) through itunes and also back up and manage their personal devices under their own personal user account.  There are 4 users on our iMac.  Me, my wife, and our 2 children.  We have built an extensive library of music/media together using the same iTunes store account.  I would like to establish a seperate apple id and iTunes store account for each of us going forward but have the ability for each of us to share our purchases.  What is the best way to configure our system and devices in order to allow shared access to media and at the same time allow for individual management of devices including contacts, apps, photos, etc. Please help, I would like to do this once!
    Thank you in advance! 

    OK, seeing as no-one replied (presumably because a lot of this information is on the forums in bits elsewhere) here's how I've got on so far.
    Applications - just went through them.  About the only one I needed was my media server app.  Just downloaded and re-installed, had a quick look back though my email to find the license key and it all went on fine.  Installation never seemed quite right on my old machine so solved that problem too. 
    Movies - New iMovies just copied across the clips and projects into their respective folders.  Seems to have worked but haven't checked it all that thoroughly.  Some duplicate footage here but I can trim this out at some point when I get a chance to go through here. 
    Documents - Just copied these across. 
    Photos - used an app called iPhoto Library Manager.  You can download for free but have to pay to use the part that consolidates your libraries.  Possibly if I was willing to spend a bit more time I could have got away without using this but given I didn't know the state of my different libraries and just how many duplicates I had this was too much of a convenience to ignore.  Also got my library into a state where I can now spend a few hours organising it a bit better with Faces / Events etc. 
    Not attempted Music or iPhone sync yet as been stuck trying to solve a problem with my power adapter. 

  • What is the best way of accessing application module without page binding?

    Hi All
    I am using Jdeveloper 11g R2 (11.1.2.3) & Weblogic 10.3.5.0
    What is the best way of accessing application module without page binding?
    In my application after user authenticated from LDAP
    I need to read some information from database and set my menues.
    Thanks
    Mohsen

    Hi,
    if you don't have a binding the I am not sure the binding context is created. Anyway, try
    BindingContext.getCurrent().findDataControl("name here as ID in DataBindings.cpx") and see if it returns a valid instance
    Frank

  • Opinion needed on best way to map multiple table joins (of the same table)

    Hi all
    I have a query of the format:
    select A.col1, B.col1,C.col1
    FROM
    MASTER_TABLE A, ATTRIBUTE_TABLE B, ATTRIBUTE_TABLE C
    WHERE
    A.key1 = B.key1 (+)
    AND
    A.key1 = C.key1(+)
    AND
    B.key2(+) = 100001
    AND
    C.key2(+) = 100002
    As you can see, I am joining the master table to the attribute table MANY times over, (over 30 attributes in my actual query) and I am struggling to find the best way to map this efficiently as the comparison for script vs. mapping is 1:10 in execution time.
    I would appreciate the opinion of experienced OWB users as to how they would tackle this in a mapping and to see if they use the same approach as I have done.
    Many thanks
    Adi

    SELECT external_reference, b.attribute_value AS req_date,
    c.attribute_value AS network, d.attribute_value AS spid,
    e.attribute_value AS username, f.attribute_value AS ctype,
    g.attribute_value AS airtimecredit, h.attribute_value AS simnum,
    i.attribute_value AS lrcredit, j.attribute_value AS airlimitbar,
    k.attribute_value AS simtype, l.attribute_value AS vt,
    m.attribute_value AS gt, n.attribute_value AS dt,
    o.attribute_value AS datanum, p.attribute_value AS srtype,
    q.attribute_value AS faxnum,
    R.ATTRIBUTE_VALUE AS FAXSRTYPE,
    s.attribute_value AS extno,
    t.attribute_value AS tb, u.attribute_value AS gb
    v.attribute_value AS mb, w.attribute_value AS stolenbar,
    x.attribute_value AS hcredit, y.attribute_value AS adminbar,
    z.attribute_value AS portdate
    FROM csi_item_instances a,
    csi_iea_values b,
    csi_iea_values c,
    csi_iea_values d,
    csi_iea_values e,
    csi_iea_values f,
    csi_iea_values g,
    csi_iea_values h,
    csi_iea_values i,
    csi_iea_values j,
    csi_iea_values k,
    csi_iea_values l,
    csi_iea_values m,
    csi_iea_values n,
    csi_iea_values o,
    csi_iea_values p,
    csi_iea_values q,
    CSI_IEA_VALUES R,
    csi_iea_values s,
    csi_iea_values t,
    csi_iea_values u,
    csi_iea_values v,
    csi_iea_values w,
    csi_iea_values x,
    csi_iea_values y,
    csi_iea_values z
    WHERE a.instance_id = b.instance_id(+)
    AND a.instance_id = c.instance_id(+)
    AND a.instance_id = d.instance_id(+)
    AND a.instance_id = e.instance_id(+)
    AND a.instance_id = f.instance_id(+)
    AND A.INSTANCE_ID = G.INSTANCE_ID(+)
    AND a.instance_id = h.instance_id(+)
    AND a.instance_id = i.instance_id(+)
    AND a.instance_id = j.instance_id(+)
    AND a.instance_id = k.instance_id(+)
    AND a.instance_id = l.instance_id(+)
    AND a.instance_id = m.instance_id(+)
    AND a.instance_id = n.instance_id(+)
    AND a.instance_id = o.instance_id(+)
    AND a.instance_id = p.instance_id(+)
    AND a.instance_id = q.instance_id(+)
    AND A.INSTANCE_ID = R.INSTANCE_ID(+)
    AND a.instance_id = s.instance_id(+)
    AND a.instance_id = t.instance_id(+)
    AND a.instance_id = u.instance_id(+)
    AND a.instance_id = v.instance_id(+)
    AND a.instance_id = w.instance_id(+)
    AND a.instance_id = x.instance_id(+)
    AND a.instance_id = y.instance_id(+)
    AND a.instance_id = z.instance_id(+)
    AND b.attribute_id(+) = 10000
    AND c.attribute_id(+) = 10214
    AND d.attribute_id(+) = 10132
    AND e.attribute_id(+) = 10148
    AND f.attribute_id(+) = 10019
    AND g.attribute_id(+) = 10010
    AND h.attribute_id(+) = 10129
    AND i.attribute_id(+) = 10198
    AND j.attribute_id(+) = 10009
    AND k.attribute_id(+) = 10267
    AND l.attribute_id(+) = 10171
    AND m.attribute_id(+) = 10184
    AND n.attribute_id(+) = 10060
    AND o.attribute_id(+) = 10027
    AND p.attribute_id(+) = 10049
    AND q.attribute_id(+) = 10066
    AND R.ATTRIBUTE_ID(+) = 10068
    AND s.attribute_id(+) = 10065
    AND t.attribute_id(+) = 10141
    AND u.attribute_id(+) = 10072
    AND v.attribute_id(+) = 10207
    AND w.attribute_id(+) = 10135
    AND x.attribute_id(+) = 10107
    AND y.attribute_id(+) = 10008
    AND z.attribute_id(+) = 10103
    AND external_reference ='07920490103'
    If I run this it takes less than a second in TOAD, when mapped in OWB it takes ages. 10:1 is a conservative estimate. In reality it takes 15-20 minutes. CSI_IEA_VALUES has 30 million rows CSI_ITEM_INSTANCES has 500,000 rows.
    Hope that helps. I would love to know how others would tackle this query.

  • Best way to configure a network comprising WLSE and many APs ?

    Hi the Cisco NetPro community,
    I would like to have a discussion with you on the best way to configure a network containing a WLSE and a large amount of Access Points.
    The network I want to configure comprises some subnetnorks, each comprising about 10 access points (with some advanced settings for security). It might be a quite long and boring process to set the configuration for all those, so I am looking for the quickest and easiest solution to do so.
    First of all, the configuration of IP addresses have to be done on each Access Point after unpacking it. The configuration of my network comprises 1 WDS active AP, 1 WDS backup AP and the rest of infrastructure APs, that for each developement site.
    I thought about several solutions :
    - 1st solution could be to apply a configuration file (i.e. load the config.txt file) to each AP manually, changing some values (IP, local radius...).
    But problem is that passwords can't be changed with text editor because of the passwords written in "hash".
    - 2nd solution could be to configure each AP (after IP is set) using its web interface.
    No more problem for hash written passwords, but this method is quite boring when surfing on menu pages of the AP web interface...
    - 3rd solution, which could appear as the best solution, is to create a template on the WLSE, and to apply it to all APs.
    No more boring connection to each AP, but problem are : we need to create as many templates as APs (or change some parameters each time), and we still need to set parameters directly to APs before (SNMP, SSH, WDS configuration...), in order the WLSE to manage the APs.
    So, what do you think could be the best solution in order to deploy such a network with many APs ?
    How is it possible to avoid (so far as we can) the configuration of APs one by one ?
    Thanks a lot in advance for your consideration and your ideas !
    Alexis.

    Well for one of my clients that had over 60 sites, we actually created a couple of templates. We created a basic template and a template for each site. You can have the ap's obtain the configuration from the WLSE, but you need to configure a DHCP option. My client did mac address reservations, but of course you need the mac address first. I guess you can also let the ap get an address and change it later. They tried doing different things, first let the ap obtain a default config and then pushing out the configuration for that site.
    As for the hash, you can set the password in ascii... when you do a show run, then of cours it will be hash'd.
    http://www.cisco.com/en/US/docs/wireless/wlse/2.12/user/guide/deploywz.html#wp1936755

  • Best way to configure iTunes on network server for multiple macs

    Hi all
    Currently have a Mac Mini (late 2006 Tiger) running iTunes library on my QNAPTS239pro Network attached storage. It works great.
    On Monday I am getting a new iMac and MacBook Pro (i.e. with Snow Leopard).
    What is the best way for iTunes to be configured from each Mac to use the same library on the NAS?
    Ideally, I want to add music from any of the macs (usually from CD not the store) and have a single library updated on the NAS. I don't want multiple sync'd copies - that's a back up night mare.
    Any thought appreciated.
    Kind regards
    Andrew

    it's a rather old article but click here for one possible setup scenario.
    JGG

  • Best way to configure search toplogoy for multiple servers farm??

    Hi,
    My farm environment is 2 WFE and 2 App servers. Right now i am trying to configure Search Topology. what will be the best way to configure the search topology for this farm, so that query and crawling will be working perfectly. one thing i noticed with my
    previous search application Crawl DB had grown 140 GB, i dont know why it happened. please look at the following screen shot, this the current topology but i want to distribute component to different server.
    Any help will be appreciated!!

    The best topology depends on whether you want it to be fault tolerant or not. For a fault tolerant design with this number of servers I normally create two Index Partitions 0 and 1 with each on one of the App servers.  I then create Replicas of each
    partition on the front end servers. I then put the query role on both web fronts ends and the crawl role on both Ap servers.  So I end up with the following:
    FE1 = Index Replica 0 + Query
    FE2 = Index Replica 1 + Query
    Ap1 = Index 0 + Crawl
    Ap2 = Index 1 + Crawl
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Best way to load configuration

    Hi All
    I've developed an application and I want to give my client the possiblity to change some configuration data (paths, languaje, etc).
    Which is the best way to store this kind of data and wich is the best way to load it ?
    I don't want a simple book or manual reference. I'll appreciate words of experience wisdom.. :)
    Thanks in advance
    <jl>

    It used to be through java.util.Properties, but
    I've found the java.util.preferences classes to
    be almost too easy to use - pretty sweet stuff! (And
    that should be enough hints for you right there...)I'll read preferences tips in API reference.
    Thanks.
    <jl>

Maybe you are looking for

  • Issues after installing Hotfix Rollup 5 for SP3

    Hi, Last weekend we installed Hotfix Rollup Pack 5 for SP3 on our (single) Exchange 2010 Enterprise server. This was needed to fix the WebApp Light issue with IE11 and to fix the problem where users were unsable to delete mails sent from multifunctio

  • Sync Google Contacts via iTunes not working

    Hi Just got a new Macbook with Yosemite and am syncing my Google Mail, Calendar, Contacts with the Macbook without difficulty,  I have disabled iCloud syncing for Mail, Calendar, and Contacts.  Now, I want to get Google Contacts set up on my old iPho

  • Classpath and "ghost" libraries

    Greetings, I just did a fresh install of J2EE and NWDS stack 13. Before doing so, I deinstalled all previous versions. Now, when I rebuild a Web Dynpro project that has always worked, I get the task messages: "The project was not built due to classpa

  • .swf files not viewing properly

    I am trying to place a .swf file that was made on a PC into my keynote document. All I am getting is a tall black column with type in it. This file works fine in power point but I would like to use Keynote for this presentation. Can anyone help?

  • How do I retrieve my lost data that was backed up on iTunes?

    My phone recently had a problem where it needed to be restored every few hours. So I backed up my data on itunes and just before my phone restored, it completely broke and only the itunes logo appeared on my phone. So I sent it to be fixed and when I