Static again: methods vs direct access

Ok, I had the discussion about static some time ago.
I made some tests and have another question about that, but this time it will be a long code included.
Lets see:
TestTest.java
import java.io.*;
public class TestTest
     public static void main(String[] args)
          int amount = 100000000;
          int tester = 1;
          String testers = "X";
          long start;
          long time1=0;
          long time2=0;
          long time3=0;
          long time4=0;
          long time5=0;
          long time6=0;
          long time1s=0;
          long time2s=0;
          long time3s=0;
          long time4s=0;
          long time5s=0;
          long time6s=0;
          TestStatic blubStat     = new TestStatic();
// static instance int direct
          start = System.currentTimeMillis();
          for (int i=0;i<amount;i++)
               tester=blubStat.testint;
          time3 = System.currentTimeMillis()-start;
          System.out.println("3 :"+time3);
// static instance int method
          start = System.currentTimeMillis();
          for (int i=0;i<amount;i++)
               tester=blubStat.getint();
          time4 = System.currentTimeMillis()-start;
          System.out.println("4 :"+time4);
// static instance String direct
          start = System.currentTimeMillis();
          for (int i=0;i<amount;i++)
               testers=blubStat.teststring;
          time3s = System.currentTimeMillis()-start;
          System.out.println("3s:"+time3s);
// static instance String method
          start = System.currentTimeMillis();
          for (int i=0;i<amount;i++)
               testers=blubStat.getstring();
          time4s = System.currentTimeMillis()-start;
          System.out.println("4s:"+time4s);
          Test      blub = new Test();
// instance int direct
          start = System.currentTimeMillis();
          for (int i=0;i<amount;i++)
               tester=blub.testint;
          time5 = System.currentTimeMillis()-start;
          System.out.println("5 :"+time5);
// instance int method
          start = System.currentTimeMillis();
          for (int i=0;i<amount;i++)
               tester=blub.getint();
          time6 = System.currentTimeMillis()-start;
          System.out.println("6 :"+time6);
// instance String direct
          start = System.currentTimeMillis();
          for (int i=0;i<amount;i++)
               testers=blub.teststring;
          time5s = System.currentTimeMillis()-start;
          System.out.println("5s:"+time5s);
// instance String method
          start = System.currentTimeMillis();
          for (int i=0;i<amount;i++)
               testers=blub.getstring();
          time6s = System.currentTimeMillis()-start;
          System.out.println("6s:"+time6s);
}Test.java
import java.io.*;
public class Test
     public int     testint=5;     
     public String teststring = "Test";
     public Test()     
          testint=3;
     public int getint()     
          return testint;     
     public String getstring()     
          return teststring;     
}TestStatic.java
import java.io.*;
public class TestStatic
     public static int     testint=5;     
     public static String teststring = "Test";
     public TestStatic()     
          testint=3;
     public static int getint()     
          return testint;     
     public static String getstring()     
          return teststring;     
}Running TestTest prints the following output (JDK1.4):
3 :1100
4 :1150
3s:1100
4s:1100
5 :1210
6 :4560
5s:1310
6s:4560
As you see, the times from 6 and 6s are 4 times as high as the others.
My basic question is: Why is the access via a method so much slower when using an instanciated class??
Hope anybody can help me with this....

Hmm, thats what i feared. Then it seems to have no way around...
The problem is, I have a NetLib doing network communiction stuff. And one method is "isReady()", that test if I can read data from the InputStream of the socket. Now that call runs in a loop in my main program:
while (stuffnotdone)
   if (NetLib.isReady())
      NetLib.sendBack(NetLib.whatyourecieve());
}Summarized a simple echo server. And I wondered why this was so slow compared to a version without using the NetLib but copying the stuff from the Methods directly into the code.
Well then it will be a better way to get the stream and do everything in program itself or do it static.
Well then, lets see...
Thx for the answer.
Skippy

Similar Messages

  • Using a static wrapper method to access session

    Hello,
    I'm attempting to develop a utility class comprised of static convenience methods that will access the different scopes. Given the fact that the methods are static, will this pose any risk in a multi-threaded environment? See example below. Thanks.
    public static void setSessionObject(HttpServletRequest req, String attrName,
                   Object object) {
              HttpSession session = req.getSession(false);
              if (session != null) {
                   session.setAttribute(attrName, object);
         }

    What happens if two instances call this method simultaneously? Would it be possible to set the wrong attribute in the wrong session?

  • Static abstract methods - how can I avoid them?

    Hi everybody,
    just found out that java doesn't allow static abstract methods nor static methods in interfaces. Although I understand the reasons, I can't think of how to change my design to gain the required behavior without the need of static abstract methods.
    Here's what I want to do and how my thoughts lead to static abstract methods:
    ClassA provides access to native code (c-dll, using jna). The path to the dll can be set programmatically. Here's a draft of the class:
    public ClassA {
       private static String path;
       public static void setRealtivePath(String path) {
          //check if path exists and is not null -> get absolute path
          setPath(path);
       public static void setPath(String absolutePath) {
          this.path = path;
      //code to provide access to native lib
    }There is some more classes which provide access to different dlls (therefore the code for accessing the dlls differs from ClassA). Although this works, the setRelativePath method has to be implemented in each class. I thought it would be nice to put this method into a abstract super class that looks like this:
    public abstract class superClass {
       public static void setRelativePath(String path) {
          //check if path exists and is not null -> get absolute path
          setPath(path);
       //force inherting class to implement a static method
       public static abstract void setPath(String absolutePath);
    }thus simplifying ClassA and it's look-a-likes:
    public ClassA {
       private static String path;
       @Override
       public static void setPath(String absolutePath) {
          this.path = path;
      //code to provide access to native lib
    }Since static abstract methods (and overriding static methods) is not allowed, this doesn't work.
    I hope someone can catch my idea ;). Any suggestions how to do this in a nice clean way?
    Thanks in advance,
    Martin
    Edited by: morty2 on Jul 22, 2009 2:57 AM

    First of all, thanks a lot for your answer.
    YoungWinston wrote:
    Actually, you can "override" static methods (in that you can write the same method for both a subclass and a superclass, providing the superclass method isn't final); it's just that it doesn't work polymorphically. The "overriding" method masks the overridden one and the determination of what gets called is entirely down to the declared type.Yes, I know that. There's one problem: Your suggestion means that I simply have to drop the abstract modifier in the super classes setPath method. However, since the super class calls the setPath method (and not the inherting classes!) it will always be the super classes' method being called.
    YoungWinston wrote:
    Why are you so concerned with making everything static? Seems to me that the simplest solution would be to make all the contents instance-based.I want ClassA and it's look-a-likes to be set up properly at application start up, be accessible quite anytime and easily, they don't do anything themselves except for setting the path and calling into the native library which does the math. (Compareable to how you call e.g. Math.cos()). Therefore I don't think that an instance-based solution would be a better approach.
    YoungWinston wrote:
    Furthermore, you could make the class immutable; which might be a good thing - I'm not sure I'd want someone being able to change the pathname after I've >set up a class like this.Thanks for that!
    PS: As mentioned in my first post, I do have a working solution. However, I'm really corious about finding a nicer and cleaner way to do it!
    Martin

  • Calling static synchronized method in the constructor

    Is it ok to do so ?
    (calling a static synchronized method from the constructor of the same class)
    Please advise vis-a-vis pros and cons.
    regards,
    s.giri

    I would take a different take here. Sure you can do it but there are some ramifications from a best practices perspective. f you think of a class as a proper object, then making a method static or not is simple. the static variables and methods belong to the class while the non-static variables and methods belong to the instance.
    a method should be bound to the class (made static) if the method operates on the class's static variables (modifies the class's state). an instance object should not directly modify the state of the class.
    a method should be bound to the instance (made non-static) if it operates on the instance's (non-static) variables.
    you should not modify the state of the class object (the static variables) within the instance (non-static) method - rather, relegate that to the class's methods.
    although it is permitted, i do not access the static methods through an instance object. i only access static methods through the class object for clarity.
    and since the instance variables are not part of the class object itself, the language cannot and does not allow access to non-static variables and methods through the class object's methods.

  • Server 2012 Direct Access Single NIC cant get it to work

    Hi,
    I am having some real issues with setting up Direct Access with Server 2012 and a Windows 8 client, it simply won’t work at all.
    First of all I should describe my setup:
    I have an internet connection with a static IPv4 address on the external network adapter of the router
    The internal network address (the address of the router which has the internet connection) is 192.168.1.1
    Server1 (windows 2008 R2 Standard) has a static IPv4 address 192.168.1.2 and has some ports forwarded from the router (443, 25, 80) this server is a domain controller, email server, and has the DNS, DHCP and
    certificate services
    Server 2 (Windows 2008 R2 standard) has static IPv4 address 192.168.1.3 it has no ports forwarded from the router as it has no services accessed externally, it is used as a file server and print server, backup
    domain controller and backup DNS.
    Server 3 (Windows 2012) has static IPv4 address 192.168.1.4 and has the Remote Access server role installed along with all the other default features and roles it requires in the setup process.
    These servers have all got an IPv6 address which I assume the server has configured automatically, there has been no deliberate configurations made to disable IPv6
    I have no UAG or proxy server or anything else to route packets to internal servers. Just this router which has the option for port forwarding (I assume that’s NAT isn’t it?) sorry don’t know much about that
    area.
    I go through the setup wizard in remote access to configure direct access, in the external URL I have entered da.mydomain.com and created a host A record in my external domain name providers DNS which points
    the da record to my external IP address. The wizard creates all the GPO’s, scoped correctly, and applied to a Windows 8 client. The operational status shows its all working and I got green ticks. However, when I connect the client to the internal network it
    doesn’t seem to have correctly got the DA settings. I run the following in powershell
    Get-DnsClientNrptPolicy
    Nothing displays – at all
    Get-NCSIPolicyConfiguration
    Description                   
    : NCSI Configuration
    CorporateDNSProbeHostAddress  
    : fdd8:dd4a:ea42:7777::7f00:1
    CorporateDNSProbeHostName     
    : directaccess-corpConnectivityHost.mydomain.local
    CorporateSitePrefixList       
    : {fdd8:dd4a:ea42:1::/64, fdd8:dd4a:ea42:7777::/96, fdd8:dd4a:ea42:1000::1/128,
    fdd8:dd4a:ea42:1000::2/128}
    CorporateWebsiteProbeURL      
    : http://directaccess-WebProbeHost.mydomain.local
    DomainLocationDeterminationURL : https://DirectAccess-NLS.mydomain.local:62000/insideoutside
    Get-DAConnectionStatus
    Get-DAConnectionStatus : Network Connectivity Assistant service is stopped or not responding.
    At line:1 char:1
    + Get-DAConnectionStatus
    + ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo         
    : NotSpecified: (MSFT_DAConnectionStatus:root/StandardCi...onnectionStatus) [Get-DAConnect
       ionStatus], CimException
    + FullyQualifiedErrorId : Windows System Error 1753,Get-DAConnectionStatus
    I go into services.msc and find that the network connectivity assistant is not started, it wont start either something must trigger it but I have no idea how to get it triggered to start… this might be my only
    source of problem perhaps but on a more network level question:
    If I have such ports as 80, and 443 (which I assume DA uses in some form with a public IPv4 internet address) directed at server 1, how does the DA connection get to server 3 which has the DA role installed?
    I could create another record on the server which also opens port 443 to server as well as for server 1, but then how would the router know which server to pass the DA connection to if the same port is open for two different servers?
    Either way, this first issue is that the client doesn’t seem to have the ability to connect internally correctly yet, so maybe this connectivity service is a good place to start? My understanding is that the
    networks icon in the system tray should show that there is a corporate connection, but it doesn’t. also, the client seems to have the NLS certificate in the computer certificate store, so the cert side of things is working and the GPO side is working.
    Many thanks
    Steve

    ahh i see, so just to enlighten me even further...
    If a company has two web servers that would mean they would need two different public facing IP addresses so they can route to each internal web server. If, like the big companies have, they
    may have many web servers (possibly more than 100) I’m assuming that simply buying more public IP addresses would have a limit, especially since the IPv4 address space is pretty much exhausted. So is this where proxy systems come into play like ISA and Forefront,
    is this what they do?
    I assume if such a product was implemented you could go down to just one or two public IP addresses, point all traffic to the ISA server and that in turn would do all the routing of packets
    to each server behind the NAT/router (probably based on some sort of domain name or sub domain namespace as it’s parameter for forwarding?)
    Secondly, what I have done is installed windows server 2012 and used that as a direct access client (I read on another forum that the windows 8 RP doesn’t have the enterprise bits to make this
    work). I have got much further with the 2012 server acting as a client (installed on laptop, installed desktop experience and wireless LAN), 
    but when I run the following command on my DA client I get the following status
    Get-DAConnectionStatus
    Status:                 
    connectedlocally
    Substatus:          
    none
    This appears to work fine, when im connected to the local network. But then I disconnect and run the command again and I get the following:
    Status:                 
    Error
    Substatus:          
    NameResolutionFailure
    On my router what I did is temporarily disable port 443 going to my original server and instead opened it up pointing to my other server, so 443 traffic should be going to my DA server now, but I don’t understand why its giving the name resolution failure
    status. I have a host A record called “da” with my domain hoster, and entered the full domain namespace in the DA wizard as da.mydomain.com (the Host A record has been up there for more than a week so it’s propagated through the net)
    So, a bit further but stuck again.

  • Enterprise DNS servers are not responding when using Windows NLB with Direct Access 2012

    Hi
    We have installed Direct Access 2012 as one server installation:
    - Two network cards. First one in DMZ and second one in internal network
    - Two consecutive IP addresses configured in DMZ because of Teredo
    - PKI because of Win7 Clients IPSec
    - Our corporate network is native IPv4 so we use DNS64/NAT64 and DA-server is configured as DNS
    - DA-servers are VMWare virtual machines 
    One server installation works fine and now we want to use Windows NLB as load balancing. NLB installation goes fine too,
    but problem is DNS. If we still try to use DA-server as DNS there comes error message below
    None of the enterprise DNS servers 2002:xxxx:xxxx:3333::1 used by DirectAccess clients for name resolution are responding. This might affect DirectAccess client connectivity to corporate resources.
    When trying to configure DNS using Infrastructure access setup, DNS cannot be validated when using DA-servers DIP or cluster VIP. Only domain local DNS looks to be ok but those have no IPv6 addressess. So how DNS should be configured when using multicast
    NLB? 
    Tried to remove name suffix then adding again => Detect DNS server => DA-server IPv6 address found => validate => The specified DNS server is not responding...
    Then tried to ping detected address => General failure
    NLB clusters are configured as multicast and static ARPs are configured too. Both clusters can be connected from those subnets as they should be. 
    Any clues how to fix this?
    ~ Jukka ~

    Hi,
    Your question falls into the paid support category which requires a more in-depth level of support.  Please visit the below link to see the various
    paid support options that are available to better meet your needs.
    http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone
    Regards,
    Mike
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • [svn:osmf:] 10996: Changing MediaElementLayoutTarget to be constructed via a static ' getInstance' method, instead of by its constructor.

    Revision: 10996
    Author:   [email protected]
    Date:     2009-10-19 07:45:26 -0700 (Mon, 19 Oct 2009)
    Log Message:
    Changing MediaElementLayoutTarget to be constructed via a static 'getInstance' method, instead of by its constructor. This prevents the construction of multiple instances that reference one single media-element. Updating client code accordingly.
    Extending layout unit tests. Adding a custom renderer, checking calculation and layout passes invokation counts.
    Modified Paths:
        osmf/trunk/framework/MediaFramework/org/osmf/composition/CompositeViewableTrait.as
        osmf/trunk/framework/MediaFramework/org/osmf/composition/ParallelViewableTrait.as
        osmf/trunk/framework/MediaFramework/org/osmf/composition/SerialViewableTrait.as
        osmf/trunk/framework/MediaFramework/org/osmf/gateways/RegionSprite.as
        osmf/trunk/framework/MediaFramework/org/osmf/layout/DefaultLayoutRenderer.as
        osmf/trunk/framework/MediaFramework/org/osmf/layout/LayoutContextSprite.as
        osmf/trunk/framework/MediaFramework/org/osmf/layout/LayoutRendererBase.as
        osmf/trunk/framework/MediaFramework/org/osmf/layout/MediaElementLayoutTarget.as
        osmf/trunk/framework/MediaFramework/org/osmf/utils/MediaFrameworkStrings.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/composition/TestParallelViewableTrai t.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/gateways/TestRegionSprite.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/layout/TestDefaultLayoutRenderer.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/layout/TestLayoutUtils.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/layout/TestMediaElementLayoutTarget. as
    Added Paths:
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/composition/CustomRenderer.as

    AlexCox, can you clarify that once you get the default model out and save it in the temp var, that your ONLY access to the data is then through temp and never through the JList methods?
    Quick question for everyone: Are any of you using JList.setListData to set you initial dataset? I think that is where the bug lies. When I do not use it and start with an empty list, I am able to add to that list, and then remove from that list using the following line:
    ((DefaultListModel)myList.getModel).remove(###);
    And this cast works everytime.
    But when I start that list out with some data such as:
    myList.setListData(myStringArray);
    and then try to execute the above line, boom! I get the ClassCast exception.
    I think setListData creates a whole new model which is an inner class to JList (which seems stupid when DefaultListModel seems made for this).
    Just my thoughts on where the problem lies. I'll add my data directly to the list and see if that works better.
    PK

  • Using TCL to Directly Access Forwarding Databases

    Please can someone tell me if this is even possible with a TCL script on IOS?
    Open a TCP / SSL control channel from the router to an external monitoring server to do the following:
    Reliably replicate the global routing table and VRF routing tables with all information, such as protocol, metrics, next hop, prefix, mask, VRF, etc.
    Poll the global routing table and VRF routing tables for changes and send real time updates when there are changes
    Encapsulate the information into XML so it can be decoded by the monitoring server
    I don’t want to scrape show commands as I don’t believe it would scale or be accurate enough. I’m not even sure if it’s possible to direclty access the forwarding databases (MPLS, routing tables, etc)?  Does TCL only work with CLI output?
    Thanks!
    Richard

    Thanks for your help Joseph. Are there any plans to pass VRF information in the routing detector?
    Are there any other detector subsystems or methods to directly monitor the routing processes? For example by using the Application Detector (event_register_appl) to subscribe to IOS subsystem events and bypass the built in detectors, or use Resource Detector (event_register_resource) to detect a state change?  Even when writing custom TCL scripts are we bound by the predefined event detectors or are there other ways of accessing IOS subsystems?
    I also wondered if it was possible to create an EEM / TCL resource tracker or counter tracker that tracks the routing tables for changes via SNMP. The problem here is I’m not sure if it’s possible to monitor the MIB for specific changes, then poll for that specific change, as opposed to doing a complete SNMP walk? For example, with a number of VRFs and hundreds of thousands of routes I just need to know when there has been a change, and report just that change.
    I could take the output from the Routing Event then SNMP poll the global routing and all the VRFs for that prefix. With a lot of route updates and lots of VRFs there would be a lot of unnecessary SNMP polling (and it probably wouldn’t scale).
    Regarding the SSL limitation it looks like it’s possible (from one of your previous posts) to perform an MD5 hash (maybe even SHA). Therefore I’d expect I can hash the XML payload in the TCP session.
    Thanks again!

  • Direct Access 2012 R2 - Problems with Force Tunneling and other questions

    I have just setup a Direct Access 2012 R2 server in my network, 2012 domain and all Windows 8 clients. 
    Internal CA environment (no external CRL) using a public issued cert for IPHTTPS tunnel, 2 interfaces for the DA server, 1 internal and 1 in the DMZ behind a NAT firewall (1 public IPv4 address) and my test clients are connecting fine to internal resources.
    1.  When I enable Force Tunneling the clients no longer are able to access the external internet.  Is there anything I need to add to make this work?
    2.  I am having trouble with our Remote Desktop Session Hosts.  I can only assume it has something to do with the DNS  as we have our AD domain performing internal DNS of the int.contoso.com domain and public DNS performing for the external
    Contoso.com domain (RDWA etc).  DA has only int.contoso.com set as a DNS Name Suffix in the Infrastructure Setup.  Should I add the external contoso.com Name Suffix in there too?
    3.  I have a Kaspersky Security Center server for centralized AV admin, can I still push out AV updates to the clients that connect with DA.  Do I add my KSC server to the Management Servers list in the Infrastructure Server Setup page on the DA
    setup.   Does that list allow those servers to access the DA clients?

    Hi,
    Let's solve problems one by one. Force tunneling. When enabled, all network trafic from DirectAccess clients goes throught IPSEC tunnels. Just configure a proxy on your DirectAccess clients (with a FQDN of course) and your clients should be able to surf
    internet again.
    RDS : Depend. Where are your RDS servers registred internal zone DNS or external DNS zone. If a DirectAccess client cannot resolve a name it does not know if it has to go throught the tunnel. At last can you ping your RDS Server?
    Remote Management : Right. Adding servers in this list allow them to use the IPSEC infrastructure tunnel (computer established tunnel) without users being logged.
    BenoitS - Simple by Design http://danstoncloud.com/blogs/simplebydesign/default.aspx

  • Solution for Windows Store app "projectname.exe" does not contain a static 'Main' method suitable for an entry point . Error.

    Hi,
    I'm developed a blog reader for windows 8 store app. It was perfectly worked before. But suddenly it started to miss behave and I got an
    error. No other errors were there other than that.
    Error 
    Program c:\Users\.........\Desktop\Blog_Reader\Blog_Reader\obj\Release\intermediatexaml\Blog_Reader.exe' does not contain a static 'Main'
    method suitable for an entry point. 
    C:\Users\..........\Desktop\Blog_Reader\Blog_Reader\CSC    Blog_Reader
    But I found the solution while I fixing it.
    Solution for that is like below.
    Go to your App.Xaml and Right-Click thenGo to Properties
    Check whether the Build Action is
    ApplicationDefinition
    If not change it to ApplicationDefinition.
    Clean the code (solution) and Deploy
    Now the error is fiexed.

    Hi Robana, 
    Good sharing on the Technet. 
    This will definitely benefit other who may encounter the same issue as yours.
    Thanks for your sharing again. 
    Kate Li
    TechNet Community Support

  • Direct Access Migration of Root CA

    We have a Domain Controller "DC01" which has the Enterprise Certificate Services role installed and the CA on this Domain Controller is named "DC01"
    The CDP location on the CA "DC01" is <servername> so effectively it's LDAP://DC01 (only LDAP is published on the certificates, no http etc.)
    The CA "DC01" issues the version1 "Computer" certificates with AutoEnrollment to all clients and all our internal clients and external clients have a "Computer" certificate from CA "DC01"
    Now we have an UAG SP3 server with Direct Access and all our clients connect successfull with Direct Access as it's setup now
    In the UAG configuration (wizard) on the IPsec Certificate Authentication screen on the option "Use a certificate from a trusted root CA" the "DC01" Root CA certificate is selected
    As Microsoft best-practises we want to move the Enterprise Certificate Services to a new member server "CS01" and effectively create a new Root CA "CS01"
    As we use the version1 "Computer" certificate template we cannot select "reenroll all certificate holders"
    so idea is to duplicate the "Computer" certificate template as a v2 template that supersedes the version1 computer template, this effectively replaces all current Computer certificates based on the old v1 computer template on clients.
    Then all clients get a new "Computer" certificate from the new Root CA but in the UAG Direct Access configuration the "IPsec Certificate Authentication" "Use a certificate from a trusted root CA" the old "DC01" Root CA
    certificate is still selected
    Question1; will this lock out clients that have a new Computer certificate from the new Root CA but the UAG Direct Access configuration still use the Root CA certificate from the old DC01 CA?
    Another idea is NOT to supersede the the version1 Computer certificate but AutoEnroll the new v2 duplicated Computer template.
    This means that clients will have a Computer certificate from the old CA "DC01" but also a Computer certificate from the new CA "CS1"
    Question2; can a client have 2 computer certificates (1 from old DC01 ca and 1 from new CS01 ca) and connect Direct Access and will this still work?

    Yes, the clients will still connect with two different certificates. I haven't had your exact situation before, but I have had to deal with a CA server that died, and we had to replace it with a new one. We stood up a new CA, issued "Computer"
    certificates again from the new CA (the old certs still existed on all the client computers) - and then switched the UAG settings over to the new root CA. This worked.
    I do recommend deleting the old certificates from the client computers if possible, so that there is no potential for conflict down the road, but the above scenario worked fine for us and I have also worked with numerous companies that have multiple machine-type
    certificates on their client computers and as long as they have one which meets the DA criteria and chains up to the CA that is active in the UAG config, it'll build tunnels.

  • How to use Direct Access URL in the FORM tag

    I want to substitute the pageid url (/servlet/page?_pageid=161&_dad=portal30&_schema=PORTAL30) with the direct access urls (pls/portal30/url/page/my_page) to address the pageid conflict between development server and production server.
    It works perfectly fine in the redirection code such as:
    self.location.href="/pls/portal30/url/page/next_page". But I got "Page can not be found" error message when I use it in the <FORM> tag:
    <FORM ACTION="/pls/portal30/url/page/next_page" METHOD="POST" NAME="my_form">
    Does anyone out there know how to use the direct access url inside the <FORM> tag? I am trying not to write a bunch of code just to retrieve and insert the pageid at the run time.
    Thanks in advance.
    Arthur

    Use condition. If you are validating a record, just out the desired check in the condition field for that specific item.
    Thanks
    Nagamohan

  • Direct Access to Database in JDeveloper 11g TP4@FusionWebApplication?

    Hi,
    i have added a Database (Application Resources --> Connection --> Database --> "myDB") to my Application. I can creat Business Components et cetera with the wizard... all works...
    Now I have a simple Java-Class and i want a access to one table in my Database... must i creat a new Connection like
    Connection c = DriverManager.getConnection("jdbc:oracle:thin:@" + host + ":" + port + ":" + sid, user, pw); (simple java-code)
    or is there a chance for direct access to "myDB"?

    If you just want the connection information raw, you could try something like:
    package test.model;
    import oracle.adf.share.ADFContext;
    import oracle.jdeveloper.db.adapter.DatabaseProvider;
    public class Class1 {
        public static void main(String[] args) throws Throwable  {
              DatabaseProvider cd = (DatabaseProvider)ADFContext.getCurrent().getADFConfig().getConnectionsContext().lookup("scott_local");           
              System.out.println("ConnURL= "+cd.getConnectionURL());
              System.out.println("Host = "+cd.getProperty(DatabaseProvider.HOSTNAME_CLASS_REFTYPE));
              System.out.println("Port = "+cd.getProperty(DatabaseProvider.PORT_CLASS_REFTYPE));
              System.out.println("SID = "+cd.getProperty(DatabaseProvider.SID_CLASS_REFTYPE));
              System.out.println("Username = "+cd.getProperty(DatabaseProvider.USERNAME_CLASS_REFTYPE));
              System.out.println("Password = "+cd.getProperty(DatabaseProvider.PASSWORD_CLASS_REFTYPE));
    }

  • Direct access server reporting NAT64 Translation failure

    We are seeing strange issue , Direct Access server 2012 is reporting NAT64 warning.
    I am trying to isolate causing could not find any useful information.
    DA server is behind firewall having Ipv4 internal address.
    Error I see on dash board is
    NAT64 translation failures might be preventing remote clients from accessing IPv4-only servers in the corporate network.
    Any help appreciated.

    NAT64 is an internal component of DirectAccess and there really isn't anything that you configure manually for it. Seeing a message about NAT64 having trouble is more than likely being caused by some kind of external influence on that server. For example,
    many of the quirky error messages or problems that we see during DirectAccess implementations are caused by security policies being present in the domain. For example, if you plug in a new server to use as your DA server, if you do not block inheritance in
    Group Policy, as soon as you join that new server to your domain it may receive settings from existing GPOs in your network. Sometimes those GPOs conflict with the things that DirectAccess needs, and they have therefore broken DA before you even set it up.
    If you are setting this up as a new DA server, I recommend removing the Remote Access role, blocking inheritance in Group Policy so that none of your preexisting GPOs get applied to it, and starting the configuration again.

  • Static synchronized methods VS non-static synchronized methods ??

    what is the difference between static synchronized methods and non-static synchronized methods as far as the behavior of the threads is concerned? if a thread is in static synchronized method can another thread access simple (ie. non static) synchronized methods?

    javanewbie80 wrote:
    Great. Thanks. This whole explanation made a lot of sense to me.Cool, glad I was able to help!
    Probably I was just trying to complicate things unnecessarily.It's a classic case of complexity inversion. It seems simpler to say something like "synchronization locks the class" or "...locks the method" than to give my explanation and then extrapolate the implications. Just like the seemingly simpler, but incorrect, "Java passes objects by reference," vs. the correct "Java passes references by value," or Java's seemingly complex I/O vs. other languages' int x = readInt(); or whatever.
    In the seemingly complex case, the primitive construct is simpler, but the higher level construct requires more assembly or derivation of the primitive constructs, making that case seem more complicated.
    Okay, I just re-read that, and it seems like I'm making no sense, but I'll leave it, just in case somebody can get some meaning out of it. :-)

Maybe you are looking for