Exercise 8, Ch Access Control from Thinking  in Java

I am learning java using Bruce Eckel book "Thinking in Java" 4th edition and I got stuck on one exercise:
.. create a class called ConnectionManager that manages a fixed array of Connection objects. The client programmer must not be able to explicitely cteate Connection objects, but can only get them via a static method in ConnectionManager. When the ConnectionManager runs out of objects, it returns a null reference."
So, as I understand client programmer should be able to use Connection object meaning the class is public, but cannot create one. Creating Connection objects is granted only to ConnectionManager. How to permit creating objects only to an object of certain type?
serezha.

Hi Peter,
the point to look at is the Product Availability Matrix under service.sap.com/pam
There max NW 7.0 EHP1 is supported for the java platform.
Only thing you could do is to open an OSS message to clarify if and when it will be supported.
Best,
Frank

Similar Messages

  • Dynamic Access Control from PowerShell

    Hi Guys 
    Please I need your help, I am working with AD Dynamics Access Control (AD DAC)  and Windows Powershell (PS), the Idea is create a menu for AD DAC in PS, Everything is OK but I have a problem when I create  a new  ClaimType, because from AD DAC
    windows  Menu you can select an AD Attribute and there is a Column naming  "Value Type" , but in my Script I Don't know how to get this to show in OUT-GridView, I dont know what is the correct property. 
    My Code:
    Get-ADObject -SearchBase ((Get-AdRootDSE).SchemaNamingContext) -SearchScope 1 -filter *  -Property name, Ldapdisplayname | out-gridview -outputmode Single
    Sorry But I can't put my image here 
    Thanks in advance 

    Hi,
    Change the -Property parameter to a wildcard and check the output. Once you know what property you need (assuming it is actually listed), you can add it to your current list.
    As for posting screenshots, you'll need to post in the current verification thread stuck at the top of this forum here:
    https://social.technet.microsoft.com/Forums/en-US/home?forum=reportabug
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • Install GRC Access Control 5.3 on Java only?

    Hello,
    we want to install SAP GRC Access Control 5.3 on a stand alone system. We tried to figure out, if it's possible to install it on a NW 07 Java stack only or if it's necessary to make a add-in installation with Abap and Java.
    For the backends and the RTA we need Abap, but also for the GRC itself?
    Thanks in Advance
    Ingmar

    I just found something useful..
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/408bd039-d9c1-2a10-0fab-a92b97c7cd25
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a07b4cc8-1a57-2b10-1798-d2fec068473a

  • Get Resource Access Descriptor from OID in Java

    Hi,
    I'm trying to get my ADF program to read DB credentials from a Database RAD - Resource Access Descriptor defined for my SSO users in OID (version 10.1.2.1.0).
    Examples are rare and sometimes they refer to deprecated functions or librairies.
    If someone had already the pleasure ;-) of reading username, password and database from a predefined RAD in OID please help: steps, examples, version of libraries, anything would be very much appreciated.
    Many thanks in advance,
    Pierre

    The api�s are suitable for the values in proper table
    format.
    But the excel sheet is like a form and from that i
    have to get the values.Write an ActiveX plug-in for Excel that will send the values to your Java program. Or write an ActiveX plug-in for Excel that runs your Java program and passes it the values.

  • How to access MS ACCESS database from Solaris running Java application

    Hello I have a reqmt
    My Java application is running on Weblogic server on Solaris 2.7 and now I want to connect to MS Access database running on Win NT.
    How do I do that??
    Any help is appreciated
    Thanks
    Suresh

    You have to use a proxy server and client.
    You can search for commercial solutions via the sun jdbc site or use RmiJdbc at http://www.objectweb.org/

  • Getting exception while trying to access OIM from a standalone java program

    Hi All,
    When i am trying to run the below java class i am getting some exception. Please suggest.
    import java.util.Hashtable;
    import java.util.Iterator;
    import java.util.Map;
    import java.util.Vector;
    import com.thortech.xl.util.config.ConfigurationClient;
    import Thor.API.tcResultSet;
    import Thor.API.tcUtilityFactory;
    import Thor.API.Operations.tcGroupOperationsIntf;
    import Thor.API.Operations.tcUserOperationsIntf;
    import Thor.API.Security.ClientLoginUtility;
    import Thor.API.Security.LoginHandler.LoginSession;
    public class OIMAPI {
    public static void main(String[] args) {
    try{
    System.out.println("Startup...");
    System.out.println("Getting configuration...");
    ConfigurationClient.ComplexSetting config =
    ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
    System.out.println("Login...");
    Hashtable env = config.getAllSettings();
    tcUtilityFactory ioUtilityFactory = new tcUtilityFactory(env,"xelsysadm","xelsysadm");
    if (ioUtilityFactory!=null){
    System.out.println("Login OK...");
    System.out.println("Getting utility interfaces...");
    tcUserOperationsIntf moUserUtility = (tcUserOperationsIntf)ioUtilityFactory.getUtility("Thor.API.Operations.tcUserOperationsIntf");
    System.out.println("Starting processing...");
    for (int i=0;i<2;i++){
    Map attrs = new Hashtable();
    attrs.put("Users.User ID","testuser"+i);
    attrs.put("Users.Last Name","lastname"+i);
    attrs.put("Users.First Name","firstname"+i);
    attrs.put("Organizations.Key","1");
    attrs.put("Users.Role","Full-Time");
    attrs.put("Users.Xellerate Type","End-User");
    attrs.put("Users.Password","welcome1");
    long t1 = System.currentTimeMillis();
    long key = moUserUtility.createUser(attrs);
    long t2 = System.currentTimeMillis();
    System.out.println("User testuser" + i + " with key=" +
    key + " created in "+(t2-t1));
    System.out.println("Processing DONE...");
    ioUtilityFactory.close();
    }catch(Exception e ){
    System.out.println("---" + e.getMessage());
    e.printStackTrace();
    ---Unable to locate a login configuration
    java.lang.SecurityException: Unable to locate a login configuration
    at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:97)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
    at java.lang.Class.newInstance0(Class.java:308)
    at java.lang.Class.newInstance(Class.java:261)
    at javax.security.auth.login.Configuration$3.run(Configuration.java:221)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.login.Configuration.getConfiguration(Configuration.java:215)
    at javax.security.auth.login.LoginContext$1.run(LoginContext.java:170)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.login.LoginContext.init(LoginContext.java:167)
    at javax.security.auth.login.LoginContext.<init>(LoginContext.java:404)
    at Thor.API.Security.LoginHandler.jbossLoginHandler.login(Unknown Source)
    at Thor.API.Security.ClientLoginUtility.login(Unknown Source)
    at Thor.API.tcUtilityFactory.<init>(Unknown Source)
    at OIMAPI.main(OIMAPI.java:28)
    Caused by: java.io.IOException: Unable to locate a login configuration
    at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:206)
    at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:95)
    ... 17 more

    you need to tell it where the config files are
    java -DXL.HomeDir=C:\oimqa\xlclient -Djava.security.auth.login.config=C:\oimqa\xlclient\Config\authwl.conf
    the authwl.conf file will have a different name depending on which app server you use
    authwl is for Web Logic (for example).

  • EJB and access controll???

    Hi all,
    I have a question about access control via EJB,
    For example I have a client app�ication and on start I will prompt user for user name and password, and now what to do with this information how to pas it to the ejb server, or??? Or may be some of you have any link to tutorial as an answer? My EJB will access database and I want to use the access control from database.
    Thank you in advance.

    Hi Eshwa,
    thank you for your reply, I found a nice developer guide on the link that you give me, but I steal have a problem with undestanding of practical way to pas user information from client application to ejb server, may be you can give mi a pice of code or an small example, where is geted 2 String (user name and password) and sent to the ejb server to be autentificated, and then to have acces to the resources that is accessable for this user (discribed in the deployment description user - role).
    Anyway thank you again.
    Best regards Alexander Hincu .

  • Not able to access SOAP web service data control from adf mobile

    Hi,
    I am trying to call web services from adf mobile..
    I have created data control from external web service and it is perfectlly working on web browser..
    But why it is showing an error on emulator??
    Is there any .jar file missing in adf mobile so that it is not supporting a web service?
    Or is there any other problem? Emulator is connected to network and I am able to run WSDL in emulator's browser..
    Please help me to solve this issue..
    Thanks,
    Laxmi

    Emulator is connected to network and I am able to run WSDL in emulator's browser..
    Connecting to WSDL in the browser is not the same as connecting to WSDL in an application.
    To access a web service from an Android device enable a permission in AndroidManifest.xml that allows applications to open network sockets. Add the following uses-permission element.
    <uses-permission android:name="android.permission.INTERNET"></uses-permission>

  • I can't access iCloud, i keep getting a message to try again later. This is the first time i have tried to log into icloud. I  know my account is working, i want to access it from my macbook. I think its looking for my old icloud email, what to do?

    I can't access iCloud, i keep getting a message to try again later. This is the first time i have tried to log into icloud. I  know my account is working, i want to access it from my macbook. I think its looking for my old icloud email, what to do? I have a working apple id, i dont understand, could it be linked to an old account iD?

    Hi smccarrison,
    Thanks for visiting Apple Support Communities.
    You may find the steps in this article helpful with troubleshooting signing into iCloud:
    iCloud: Account troubleshooting
    http://support.apple.com/kb/TS3988
    All the best,
    Jeremy

  • I brought up my itunes through a friends laptop. I signed out thinking I could get on my home computer and still have my iTunes accessible, how do i access them from this computer? HELP

    I brought up my itunes through a friends laptop. I signed out thinking I could get on my home computer and still have my iTunes accessible, how do i access them from this computer? HELP

    Copy everything from the old computer or your backup copy of your old computer, to your new one.

  • Can i do a remote desktop from my 2007 iMac(computer that I need to access) controlled by my 2010 mbp

    i don't have a wireless keyboard or mouse for my 2007 iMac, is there any way that can use remote desktop and access it from my 2010mbp.

    Hi champrider,
    You can use an application such as Apple Remote Desktop to control your iMac remotely. See this article -
    OS X Mavericks: Allow access using Apple Remote Desktop
    This help page will provide you with some other useful resources for Apple Remote Desktop -
    Remote Desktop Help
    Thanks for using Apple Support Communities.
    Best,
    Brett L 

  • Access Control up grade from 5.2 to 5.3

    Hi,
    One of my client have
    1. Earlier Access control 5.2 was installed but only FF are configured and is in use.
    2. After some time Access Control GRC 5.2 server (front end) have some problem so they have
    installed 5.3 to front end level
      --no back end patch was updated
    --no connector are created.
    Now the situation is as follows
    Front end -access control 5.3 -
    Back end -RTA is access control 5.2(they are only using FF)
    No connector are created
    From this situation how can we take it forward to access control 5.3.
    I have following question
    1. can  we update back end to 5.3 and start configuration --what is the impact?
    2. Do we need to take back up of table FF as client is using only FF.
    Thanks,
    Digambar

    Hi
    5.2 RTA will not be compatible with with GRC 5.3 RTA .
    So best would ne to upgrade your backend RTA to 5.3 and SP level shoul;d be in Synch with level of SP of front end i.e SA P GRC 5.3 .
    Thanks & Regards
    Asheesh

  • 401 Unauthorized Error when accessing a task from REST API which contains Role or Privilege in Access Control definition

    Hi Team,
    As of IDM 7.2 SP8 patch2, when we use Enterprise role or Privilege in the access control definition of a task, accessing this task from UI5 i.e REST API is giving unauthorized error even though user is already having the required role or privilege.
    But the task is working fine if we use fixed user ID or keeping blank value in allowed users field.
    Attached the current access control definition of the task we configured & the error message info for reference
    Regards,
    Venkata Bavirisetty

    Hi Ralitsa,
    Thanks for your response and sorry for late reply.
    The XXXX in role is not used as a wild card. the name itself is in that format. I have searched the role and then selected from search list.
    Let me know if you need any clarifications?
    Refards,
    Venkata Bavirisetty

  • I can't access "control panel" on my 4s from the lock screen. My settings are active

    I can't access "control panel" on my 4s from the lock screen or home screen. My settings are active.

    You can try resetting  Settings>General>Reset>Reset All Settings 
    if not
    Basics from the manual are restart, reset, restore
    Follow the 3R's- if a restart does not solve your problem proceed
    User troubleshooting is:
    1.restart, ie power off/on,
    2. reset  http://support.apple.com/kb/HT1430,
    3. restore from backup, restore as new device. http://support.apple.com/kb/HT1414

  • Accessing remote jcs/jcx controls from page flows

    Hi,
    Is there a standard way to access remote jcx/jcs controls from page flows ?
    If i am correct the call to the dispatcher bean is a remote call , so can we run jcx/jcs controls on a different machine from where jpfs are running.
    I am just trying to dig into workshop framework to understand this , any pointers would be of great help.
    Thanks
    Varun

    Thanks for the tip. Unfortunately, I've tried this and there was no change.
    Here's how I tried to implement it:
    1. Edited the HTTP Configuration page in the Web Service wizard. Added http://portletserver/portlets/portletfolder/portlet.aspx. I've looked at this a million times to make sure there aren't any typos.
    2. Beforehand, I added http://portletserver/portlets/portletfolder/. to the HTTP Configuration page. I thought that would gateway everything in the portlet folder... Is that an incorrect assumption?
    3. I also tried to modify the .aspx page by adding a pt:url transformer tag to the target attribute of the form. The portlet works but it is still prompting with the pop up.

Maybe you are looking for

  • Error while doing MIGO for a sub-contracted item

    Hello to Everybody, I am facing below problem - Error : Incorrect CCtr <Cost Center Code> with this account (CCtr category must=D) for <Item Code> , while doing MIGO. (for receiving sub-contracted item from vendor). May I request for possible solutio

  • Problem with mid-2009 MacBook Pro 13" hard drives

    In May of this year I upgraded my stock hard drive to a 500GB Hitachi from the stock 160. About 5 days ago the computer froze and hung gor several minutes. Mouse still moved but no response from the OS. Forced a restart after several minutes. The com

  • Export option for highest quality posting to Google video and YouTube

    I'm trying to figure out what the best export options are for posting video on Google Video and YouTube. My primary interest is skiing video with quick actions. Here are the 5 options I tried on my iMovie HD 6, the latest and the greatest: MPEG4, LAN

  • Problem with merging changes made in Business Catalyst

    I put some text frames in my Muse project and now my client try to make some changes in text using Business Catalyst but we have big problem because it is impossible to merge changes back to the Muse project. The site is in Polish language but I also

  • How to add currency converter icon to toolbar

    Does firefox 5 have an icon for currency converter? How do I add a currency converter to a toolbar?