Search Results

Search found 9 results on 1 pages for 'mehmet6parmak'.

Page 1/1 | 1 

  • Custom SessionListener, name is not bound in this context, javax.naming.NameNotFoundException

    - by mehmet6parmak
    Hi, I am trying to implement HttpSessionListener so that users of this listener can register implementation of ISessionEvent interface to session Events.code is below: public class MySessionListener implements HttpSessionListener{ @Resource ISessionEvent sessionEvent; public ISessionEvent getSessionEvent() { return sessionEvent; } public void setSessionEvent(ISessionEvent sessionEvent) { this.sessionEvent = sessionEvent; } @Override public void sessionCreated(HttpSessionEvent arg0) { sessionEvent.SessionCreated(arg0.getSession()); } @Override public void sessionDestroyed(HttpSessionEvent arg0) { sessionEvent.SessionDestroyed(arg0.getSession()); } } When user implement ISessionEvent and add as a bean, SessionCreated and SessionDestroyed functions of implementation will be called when these events occured. You can ask why dont you just write inside listeners methods, i dont i'm just trying. When i try the code above i got the following error message: javax.naming.NameNotFoundException: Name com.mehmet6parmak.sessionlistener.MySessionListener is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:770) at org.apache.naming.NamingContext.lookup(NamingContext.java:153) at org.apache.catalina.util.DefaultAnnotationProcessor.lookupFieldResource(DefaultAnnotationProcessor.java:278) at org.apache.catalina.util.DefaultAnnotationProcessor.processAnnotations(DefaultAnnotationProcessor.java:187) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4082) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445) at org.apache.catalina.core.StandardService.start(StandardService.java:519) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:581) 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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Resource annotation causes the error but i could not resolve it. Thanks All... Interface and Implementation @Resource public interface ISessionEvent { public void SessionCreated(HttpSession session); public void SessionDestroyed(HttpSession session); } @Resource public class SessionEvent implements ISessionEvent { @Override public void SessionDestroyed(HttpSession session) { System.out.println("From Session Event Callback(Destroy):" + session.getId()); } @Override public void SessionCreated(HttpSession session) { System.out.println("From Session Event Callback(Create):" + session.getId()); } } Bean Definition <context:annotation-config/> <context:component-scan base-package="com.mehmet6parmak"> </context:component-scan> <bean id="sessionEvent" autowire="byName" class="com.mehmet6parmak.sessionlistener.SessionEvent"></bean> Solution:Using the method used in link works.

    Read the article

  • Consuming SAP Web Service from ASP.Net

    - by mehmet6parmak
    Hi, Next week i am supposed to develop an asp.net application which will connect to SAP, retrieve some data, change them and send back to SAP. We decided to use web services to achieve this and now i just want to know what diffuculties may i face with? I have URL of WSDL of the Web Service, will it be enough for me to adding web reference and giving the WSDL's URL? How will i authenticate? And Will it be the same with consuming normal web services? Also i wonder is there anybody that can share a .NET dll that can be used in visual studio 2008? There are some articles relating how to create such a dll using SAP .Net Connector and visual studio 2003 but i could not find anybody sharing the resulting dll under their post. Thanks...

    Read the article

  • .NET SAP Connection Authentication via WEB Service

    - by mehmet6parmak
    Hi, I am trying to connect to a web service served by SAP and i have authentication problem. I simply added the service by right clicking project, selecting add service reference, giving WSDL url for the service and clicking OK.(After clicking ok asked for credentials and i provided them) Then when i tried to call a method from the serviceclien object i got the error message below: The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Basic realm="SAP Web Application Server <hostname>"'. Web Config Related Part: <basicHttpBinding> <binding name="binding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <security mode="None"> <transport clientCredentialType="None" proxyCredentialType="None" realm=""> <extendedProtectionPolicy policyEnforcement="Never" /> </transport> <message clientCredentialType="UserName" algorithmSuite="Default" /> </security> </binding> Also, What problems will i face with? I do not want to use SAP .NET Connector. Thanks...

    Read the article

  • What does a JIT compiler do?

    - by mehmet6parmak
    Hi all, I was just watching the google IO videos and they talked about the JIT compiler they included in the android and showed a demo about performance improvements thanks to JIT compiler. I wondered what does exactly a JIT compiler do and wanted to hear from different people. So, What is the duty of a JIT compiler? Thanks all

    Read the article

  • Problem with LINQ Generated class and IEnumerable to Excel

    - by mehmet6parmak
    Hi all, I wrote a method which exports values to excel file from an IEnumerable parameter. Method worked fine for my little test class and i was happy till i test my method with a LINQ class. Method: public static void IEnumerableToExcel<T>(IEnumerable<T> data, HttpResponse Response) { Response.Clear(); Response.ContentEncoding = System.Text.Encoding.Default; Response.Charset = "windows-1254"; // set MIME type to be Excel file. Response.ContentType = "application/vnd.ms-excel;charset=windows-1254"; // add a header to response to force download (specifying filename) Response.AddHeader("Content-Disposition", "attachment;filename=\"ResultFile.xls\""); Type typeOfT = typeof(T); List<string> result = new List<string>(); FieldInfo[] fields = typeOfT.GetFields(); foreach (FieldInfo info in fields) { result.Add(info.Name); } Response.Write(String.Join("\t", result.ToArray()) + "\n"); foreach (T t in data) { result.Clear(); foreach (FieldInfo f in fields) result.Add((typeOfT).GetField(f.Name).GetValue(t).ToString()); Response.Write(String.Join("\t", result.ToArray()) + "\n"); } Response.End(); } My Little Test Class: public class Mehmet { public string FirstName; public string LastName; } Two Usage: Success: Mehmet newMehmet = new Mehmet(); newMehmet.FirstName = "Mehmet"; newMehmet.LastName = "Altiparmak"; List<Mehmet> list = new List<Mehmet>(); list.Add(newMehmet); DeveloperUtility.Export.IEnumerableToExcel<Mehmet>(list, Response); Fail: ExtranetDataContext db = new ExtranetDataContext(); DeveloperUtility.Export.IEnumerableToExcel<User>(db.Users, Response); Fail Reason: When the code reaches the code block used to get the fields of the template(T), it can not find any field for the LINQ Generated User class. For my weird class it works fine. Why? Thanks...

    Read the article

  • SAP .NET Connector

    - by mehmet6parmak
    Hi all, I need to connect to SAP and do a simple update but it will be the first time for me connecting to SAP and i know almost nothing. After some search on web i learned that there is an API which works only in visual studio 2003 (SAP .NET Connector). But i have a win7 .net 3.5 sp1 system. Is there any free way to connect to SAP using visual studio 2008 on the system above? (Free means without additional payment, we have an SAP account) Thanks...

    Read the article

  • ASP.NET validation controls

    - by mehmet6parmak
    Hi All, I want to use Validation Controls but I dont want them to show their Error Messages when invalid data exist. Instead I'm going to iterate through the validation controls and show error messages inside my little ErrorMessage Control for (int i = 0; i < Page.Validators.Count; i++) { if (!Page.Validators[i].IsValid) { divAlert.InnerText = Page.Validators[i].ErrorMessage; return false; } } I'm doing this because i have little space to show the error message. You can ask why are you using validation control if you dont want to show them My asnwer is "I use them for validation logic they handle" I looked the properties of the validation controls and cant find something that wil help me doing this. Any Idea? Thanks

    Read the article

1