Search Results

Search found 1105 results on 45 pages for 'jboss mdb'.

Page 21/45 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • Interface design pattern / Java / Seam

    - by Walter White
    Hi all, Is this possible somehow? @Name("geolocationService") public interface GeolocationService { @Query("SELECT g FROM Geolocation geolocation INNER JOIN geolocation.deployment deployment WHERE geolocation.ipStart <= INET_ATON(:ipAddress) AND deployment.active = TRUE") Geolocation findByIpAddress(@NamedParameter("ipAddress")final String ipAddress); } public GeolocationAction { @In private GeolocationService geolocationService; @RequestParameter("ipAddress") private String ipAddress; @Out private Geolocation geolocation; public void find() { geolocation = geolocationService.findByIpAddress(ipAddress); } } Is it possible to do this without implementing the interface? What is required to make that work? I want to maintain less and do more. If I can intercept invocations of the geolocationService then I am golden, how would I do that? I don't want it to ever be instantiated, so it will always be null (I don't want the @Name and @In annotations either then). Walter

    Read the article

  • Application time out issue

    - by harigm
    I have build the web application using Java1.5, Struts framework with Mysql database Deployed on the JBOSS4.0.5 Server Every thing seems to be fine when the activity is there on the server. Every morning, If I tried to connect to application, it shows the application is down. Once I restart the server, It works fine. From past 1 month, I am just restarting the server every day. Can any one help me where I am doing wrong in the configuration settings Please suggest me How i can eliminate this extra work every day

    Read the article

  • image viewer website

    - by ehab refaat
    i asked to make a website to view images and manage it's actions like max, min, autofit,..... (some thing like picasa but as a web application ) what is the suitable tool for that. JSF, JBoos Seam, dojo, digit ? and if any reference to enhance my skills on that branch will be appreciated.

    Read the article

  • Are JSF 2.x ViewScoped Beans Thread Safe?

    - by Mark
    I've been googling for a couple hours on this issue to no eval. WELD docs and the CDI spec are pretty clear regarding thread safety of the scopes provided. For example: Application Scope - not safe Session Scope - not safe Request Scope - safe, always bound to a single thread Conversation Scope - safe (due to the WELD proxy serializing access from multiple request threads) I can't find anything on the View Scope defined by JSF 2.x. It is in roughly the same bucket as the Conversation Scope in that it is very possible for multiple requests to hit the scope concurrently despite it being bound to a single view / user. What I don't know is if the JSF implementation serializes access to the bean from multiple requests. Anyone have knowledge of the spec or of the Morraja/MyFaces implementations that could clear this up?

    Read the article

  • Chossing an application server for an web application development

    - by harigm
    My manager has asked me to suggest an application server for the web application development work, What are the factors that needs to be considered before we select any application server for web application development in Java J2ee development? If I select one now and IN future, if I want to change to some other application server, Is if that minimum effort to change?

    Read the article

  • Can Java Code tell if it is in an App Server?

    - by Grasper
    Is there something I can call from a POJO to see if the code is currently in an App Server or outside of an App Server? Something like this (In rough PseudoCode): System.getRunningEnvironment().equals(Environment.Glassfish) or System.getRunningEnvironment().equals(Environment.ApplicationServer) or System.getRunningEnvironment().equals(Environment.JavaSE)

    Read the article

  • Choosing an application server for web application development

    - by harigm
    My manager has asked me to suggest an application server for web application development work. What are the factors that needs to be considered before we select any application server for web application development in Java J2EE development? If I select one now and IN future and I want to change to some other application server, is that minimum effort to change?

    Read the article

  • JPA Entity Manager resource handling

    - by chiragshahkapadia
    Every time I call JPA method its creating entity and binding query. My persistence properties are: <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/> <property name="hibernate.cache.provider_class" value="net.sf.ehcache.hibernate.SingletonEhCacheProvider"/> <property name="hibernate.cache.use_second_level_cache" value="true"/> <property name="hibernate.cache.use_query_cache" value="true"/> And I am creating entity manager the way shown below: emf = Persistence.createEntityManagerFactory("pu"); em = emf.createEntityManager(); em = Persistence.createEntityManagerFactory("pu").createEntityManager(); Is there any nice way to manage entity manager resource instead create new every time or any property can set in persistence. Remember it's JPA. See below binding log every time : 15:35:15,527 INFO [AnnotationBinder] Binding entity from annotated class: * 15:35:15,527 INFO [QueryBinder] Binding Named query: * = * 15:35:15,527 INFO [QueryBinder] Binding Named query: * = * 15:35:15,527 INFO [QueryBinder] Binding Named query: 15:35:15,527 INFO [QueryBinder] Binding Named query: 15:35:15,527 INFO [QueryBinder] Binding Named query: 15:35:15,527 INFO [QueryBinder] Binding Named query: 15:35:15,527 INFO [QueryBinder] Binding Named query: 15:35:15,527 INFO [QueryBinder] Binding Named query: 15:35:15,527 INFO [QueryBinder] Binding Named query: 15:35:15,527 INFO [EntityBinder] Bind entity com.* on table * 15:35:15,542 INFO [HibernateSearchEventListenerRegister] Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled. 15:35:15,542 INFO [NamingHelper] JNDI InitialContext properties:{} 15:35:15,542 INFO [DatasourceConnectionProvider] Using datasource: 15:35:15,542 INFO [SettingsFactory] RDBMS: and Real Application Testing options 15:35:15,542 INFO [SettingsFactory] JDBC driver: Oracle JDBC driver, version: 9.2.0.1.0 15:35:15,542 INFO [Dialect] Using dialect: org.hibernate.dialect.Oracle10gDialect 15:35:15,542 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory 15:35:15,542 INFO [TransactionManagerLookupFactory] No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recomm ended) 15:35:15,542 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled 15:35:15,542 INFO [SettingsFactory] Automatic session close at end of transaction: disabled 15:35:15,542 INFO [SettingsFactory] JDBC batch size: 15 15:35:15,542 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled 15:35:15,542 INFO [SettingsFactory] Scrollable result sets: enabled 15:35:15,542 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled 15:35:15,542 INFO [SettingsFactory] Connection release mode: auto 15:35:15,542 INFO [SettingsFactory] Default batch fetch size: 1 15:35:15,542 INFO [SettingsFactory] Generate SQL with comments: disabled 15:35:15,542 INFO [SettingsFactory] Order SQL updates by primary key: disabled 15:35:15,542 INFO [SettingsFactory] Order SQL inserts for batching: disabled 15:35:15,542 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory 15:35:15,542 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory 15:35:15,542 INFO [SettingsFactory] Query language substitutions: {} 15:35:15,542 INFO [SettingsFactory] JPA-QL strict compliance: enabled 15:35:15,542 INFO [SettingsFactory] Second-level cache: enabled 15:35:15,542 INFO [SettingsFactory] Query cache: enabled 15:35:15,542 INFO [SettingsFactory] Cache region factory : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge 15:35:15,542 INFO [RegionFactoryCacheProviderBridge] Cache provider: net.sf.ehcache.hibernate.SingletonEhCacheProvider 15:35:15,542 INFO [SettingsFactory] Optimize cache for minimal puts: disabled 15:35:15,542 INFO [SettingsFactory] Structured second-level cache entries: disabled 15:35:15,542 INFO [SettingsFactory] Query cache factory: org.hibernate.cache.StandardQueryCacheFactory 15:35:15,542 INFO [SettingsFactory] Statistics: disabled 15:35:15,542 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled 15:35:15,542 INFO [SettingsFactory] Default entity-mode: pojo 15:35:15,542 INFO [SettingsFactory] Named query checking : enabled 15:35:15,542 INFO [SessionFactoryImpl] building session factory 15:35:15,542 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured 15:35:15,542 INFO [UpdateTimestampsCache] starting update timestamps cache at region: org.hibernate.cache.UpdateTimestampsCache 15:35:15,542 INFO [StandardQueryCache] starting query cache at region: org.hibernate.cache.StandardQueryCache

    Read the article

  • Referencing CDI producer method result in h:selectOneMenu

    - by user953217
    I have a named session scoped bean CustomerRegistration which has a named producer method getNewCustomer which returns a Customer object. There is also CustomerListProducer class which produces all customers as list from the database. On the selectCustomer.xhtml page the user is then able to select one of the customers and submit the selection to the application which then simply prints out the last name of the selected customer. Now this only works when I reference the selected customer on the facelets page via #{customerRegistration.newCustomer}. When I simply use #{newCustomer} then the output for the last name is null whenever I submit the form. What's going on here? Is this the expected behavior as according to chapter 7.1 Restriction upon bean instantion of JSR-299 spec? It says: ... However, if the application directly instantiates a bean class, instead of letting the container perform instantiation, the resulting instance is not managed by the container and is not a contextual instance as defined by Section 6.5.2, “Contextual instance of a bean”. Furthermore, the capabilities listed in Section 2.1, “Functionality provided by the container to the bean” will not be available to that particular instance. In a deployed application, it is the container that is responsible for instantiating beans and initializing their dependencies. ... Here's the code: Customer.java: @javax.persistence.Entity @Veto public class Customer implements Serializable, Entity { private static final long serialVersionUID = 122193054725297662L; @Column(name = "first_name") private String firstName; @Column(name = "last_name") private String lastName; @Id @GeneratedValue() private Long id; public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } @Override public String toString() { return firstName + ", " + lastName; } @Override public Long getId() { return this.id; } } CustomerListProducer.java: @SessionScoped public class CustomerListProducer implements Serializable { @Inject private EntityManager em; private List<Customer> customers; @Inject @Category("helloworld_as7") Logger log; // @Named provides access the return value via the EL variable name // "members" in the UI (e.g., // Facelets or JSP view) @Produces @Named public List<Customer> getCustomers() { return customers; } public void onCustomerListChanged( @Observes(notifyObserver = Reception.IF_EXISTS) final Customer customer) { // retrieveAllCustomersOrderedByName(); log.info(customer.toString()); } @PostConstruct public void retrieveAllCustomersOrderedByName() { CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery<Customer> criteria = cb.createQuery(Customer.class); Root<Customer> customer = criteria.from(Customer.class); // Swap criteria statements if you would like to try out type-safe // criteria queries, a new // feature in JPA 2.0 // criteria.select(member).orderBy(cb.asc(member.get(Member_.name))); criteria.select(customer).orderBy(cb.asc(customer.get("lastName"))); customers = em.createQuery(criteria).getResultList(); } } CustomerRegistration.java: @Named @SessionScoped public class CustomerRegistration implements Serializable { @Inject @Category("helloworld_as7") private Logger log; private Customer newCustomer; @Produces @Named public Customer getNewCustomer() { return newCustomer; } public void selected() { log.info("Customer " + newCustomer.getLastName() + " ausgewählt."); } @PostConstruct public void initNewCustomer() { newCustomer = new Customer(); } public void setNewCustomer(Customer newCustomer) { this.newCustomer = newCustomer; } } not working selectCustomer.xhtml: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets"> <h:head> <title>Auswahl</title> </h:head> <h:body> <h:form> <h:selectOneMenu value="#{newCustomer}" converter="customerConverter"> <f:selectItems value="#{customers}" var="current" itemLabel="#{current.firstName}, #{current.lastName}" /> </h:selectOneMenu> <h:panelGroup id="auswahl"> <h:outputText value="#{newCustomer.lastName}" /> </h:panelGroup> <h:commandButton value="Klick" action="#{customerRegistration.selected}" /> </h:form> </h:body> </html> working selectCustomer.xhtml: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets"> <h:head> <title>Auswahl</title> </h:head> <h:body> <h:form> <h:selectOneMenu value="#{customerRegistration.newCustomer}" converter="customerConverter"> <f:selectItems value="#{customers}" var="current" itemLabel="#{current.firstName}, #{current.lastName}" /> </h:selectOneMenu> <h:panelGroup id="auswahl"> <h:outputText value="#{newCustomer.lastName}" /> </h:panelGroup> <h:commandButton value="Klick" action="#{customerRegistration.selected}" /> </h:form> </h:body> </html> CustomerConverter.java: @SessionScoped @FacesConverter("customerConverter") public class CustomerConverter implements Converter, Serializable { private static final long serialVersionUID = -6093400626095413322L; @Inject EntityManager entityManager; @Override public Object getAsObject(FacesContext context, UIComponent component, String value) { Long id = Long.valueOf(value); return entityManager.find(Customer.class, id); } @Override public String getAsString(FacesContext context, UIComponent component, Object value) { return ((Customer) value).getId().toString(); } }

    Read the article

  • Is it possible to destroy a CDI scope?

    - by Matt Ball
    I'm working on a Java EE application, primarily JAX-RS with a JSF admin console, that uses CDI/Weld for dependency injection with @ApplicationScoped objects. Minor debugging issues aside, CDI has worked beautifully for this project. Now I need some very coarse-grained control over CDI-injected object lifecycles. I need the ability to: Remove an injected object from the application context, or Destroy/delete/clear/reset/remove the entire application context, or Define my own @ScopeType and implementing Context in which I could provide methods to perform one of the two above tasks. I'm fully aware that this is across, if not against, the grain of CDI and dependency injection in general. I just want to know Is this remotely possible? If yes, what is the easiest/simplest/quickest/foolproofiest way to get the job done?

    Read the article

  • hibernate not picking sessionFactory

    - by Satya
    My application-context.xml is <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <bean id="myDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName"><value>com.mysql.jdbc.Driver</value></property> <property name="url"><value>jdbc:mysql://localhost:3306/myDB</value></property> <property name="username"><value>myUser</value></property> <property name="password"><value>myUser</value></property> </bean> <bean id="mySessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="mappingResources"> <property name="dataSource"><ref bean="myDataSource"/></property> <list> <value>com/x/model/config/hibernate/user.hbm.xml</value> </list> </property> <property name="hibernateProperties" > <value> hibernate.dialect=org.hibernate.dialect.MySQLDialect </value> </property> </bean> <bean id="userdao" class="com.x.y.z.UserDao"> <property name="sessionFactory"><ref bean="mySessionFactory"/></property> </bean> </beans> user.hbm.xml is <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping package="com.cpt.model"> <class name="User" table="user"> <id name="userId" column="id"> <generator class="native"/> </id> <property name="firstname" column="firstName" /> <property name="lastName" column="lastName"/> <property name="login" column="login"/> <property name="pass" column="pass"/> <property name="superemail" column="superEmail"/> </class> </hibernate-mapping> and the UserDao is package com.x.y.z; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.orm.hibernate.support.HibernateDaoSupport; import org.springframework.stereotype.Component; import com.x.model.User; @Component public class UserDao { private SessionFactory sessionFactory; public void addUser(User user) { Session session; try { try { session = getSessionFactory().openSession(); // session = sessionFactory.openSession(); session.save(user); } catch (RuntimeException e) { // TODO Auto-generated catch block e.printStackTrace(); } } catch (HibernateException e) { // TODO Auto-generated catch block System.out.println("printing in the catch"); e.printStackTrace(); } } public SessionFactory getSessionFactory() { System.out.println("returning session factory ::: sessionFactory == null :: "+sessionFactory.openSession()); return sessionFactory; } public void setSessionFactory(SessionFactory sessionFactory) { System.out.println("this is setting session factory" + sessionFactory.getClass()); System.out.println("setting session factory ::: sessionFactory == null :: "+sessionFactory==null); this.sessionFactory = sessionFactory; System.out.println("setting session factory ::: sessionFactory == null :: "+this.sessionFactory.openSession().getClass()); System.out.println(getSessionFactory().openSession().isOpen()); } } However, I keep getting 14:45:09,929 INFO [org.hibernate.impl.SessionFactoryImpl] building session fact ory 14:45:09,933 WARN [net.sf.ehcache.config.Configurator] No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: vfs:/C:/jb /server/default/deploy/C.war/WEB-INF/lib/ehcache-1.1.jar/ehcache-failsafe.xml 14:45:10,007 INFO [org.hibernate.impl.SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured 14:45:10,008 INFO [org.hibernate.impl.SessionFactoryImpl] Checking 0 named quer ies 14:45:10,017 INFO [STDOUT] this is setting session factoryclass $Proxy178 14:45:10,017 INFO [STDOUT] false 14:45:10,019 INFO [STDOUT] setting session factory ::: sessionFactory == null : : class org.hibernate.impl.SessionImpl 14:45:10,020 INFO [STDOUT] returning session factory ::: sessionFactory == null :: org.hibernate.impl.SessionImpl(PersistentContext[entitiesByKey={}] ActionQue ue[insertions=[] updates=[] deletions=[] collectionCreations=[] collectionRemova ls=[] collectionUpdates=[]]) It is giving sessionFactory null . Any Idea where am I failing ? Thanks

    Read the article

  • How does one programmatically create a topic w/ hornet q ?

    - by mP
    I have been looking at the org.hornetq.core.server package which seems to have the most interesting low level APIS relating to managing the server. The server session has a few methods labelled something Queue but none include Topic ... ServerSession void createQueue(SimpleString address, SimpleString name, SimpleString filterString, boolean temporary, boolean durable) throws Exception; void deleteQueue(SimpleString name) throws Exception interface QueueFactory Queue createQueue(long persistenceID, final SimpleString address, SimpleString name, Filter filter, boolean durable, boolean temporary); However i could not figure out how to create a topic. Am i missing something is a JMS topic implemented as a queue ?

    Read the article

  • sequence generators are getting ignored

    - by luvfort
    I'm getting the following error while saving a object. However similar configuration is working for other model objects in my projects. Any help would be greatly appreciated. @Entity @Table(name = "ENROLLMENT_GROUP_MEMBERSHIPS", schema = "LEAD_ROUTING") public class EnrollmentGroupMembership implements Serializable, Comparable,Auditable { @javax.persistence.SequenceGenerator(name = "enrollmentGroupMemID", sequenceName = "S_ENROLLMENT_GROUP_MEMBERSHIPS") @Id @GeneratedValue(strategy = GenerationType.AUTO, generator = "enrollmentGroupMemID") @Column(name = "ID") private Long id; @ManyToOne() @JoinColumn(name = "TIER_WEIGHT_OID", referencedColumnName = "OID", updatable = false, insertable = false) private TierWeight tierWeight; public EnrollmentGroupMembership() { } } Code: @Entity @Table(name = "TIER_WEIGHT", schema = "LEAD_ROUTING") public class TierWeight implements Serializable, Auditable { @SequenceGenerator(name = "tierSequence",sequenceName = "S_TIER_WEIGHT") @Column(name = "OID") @Id @GeneratedValue(strategy = GenerationType.AUTO, generator = "tierSequence") private Long id; @OneToMany @JoinColumn(name = "TIER_WEIGHT_OID", referencedColumnName = "OID") private Set<EnrollmentGroupMembership> memberships; public TierWeight() { } } The logic layer's code is @Override public void createTier(String tierName, float weight) { TierWeight tier = new TierWeight(); tier.setWeight(weight); tier.setTier(tierName); tierWeightDAO.create(tier); } Similar Many-one configuration is working through out the project. I don't know why this one instance is failing. Any help would be greatly appreciated. The following is the error that I'm getting Caused by: org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): edu.apollogrp.d2ec.model.TierWeight at org.hibernate.id.Assigned.generate(Assigned.java:3 3) at org.hibernate.event.def.AbstractSaveEventListener. saveWithGeneratedId(AbstractSaveEventListener.java :99) The log file is telling that the sequence generator tierSequence is not getting created. However other sequence generators are getting created. 2010-06-03 11:24:51,834 DEBUG [org.hibernate.cfg.AnnotationBinder:] Processing annotations of edu.apollogrp.d2ec.model.TierWeight.dateCreated 2010-06-03 11:24:51,834 DEBUG [org.hibernate.cfg.AnnotationBinder:] Processing annotations of edu.apollogrp.d2ec.model.TierWeight.dateCreated 2010-06-03 11:24:51,834 DEBUG [org.hibernate.cfg.Ejb3Column:] Binding column DATE_CREATED unique false ....................................... ....................................... 2010-06-03 11:24:51,756 DEBUG [org.hibernate.cfg.AnnotationBinder:] Processing annotations of edu.apollogrp.d2ec.model.CounselorAvailability.id 2010-06-03 11:24:51,756 DEBUG [org.hibernate.cfg.Ejb3Column:] Binding column OID unique false 2010-06-03 11:24:51,756 DEBUG [org.hibernate.cfg.Ejb3Column:] Binding column OID unique false 2010-06-03 11:24:51,756 DEBUG [org.hibernate.cfg.AnnotationBinder:] id is an id 2010-06-03 11:24:51,756 DEBUG [org.hibernate.cfg.AnnotationBinder:] id is an id 2010-06-03 11:24:51,756 DEBUG [org.hibernate.cfg.AnnotationBinder:] Add sequence generator with name: counselorAvailabilityID 2010-06-03 11:24:51,756 DEBUG [org.hibernate.cfg.AnnotationBinder:] Add sequence generator with name: counselorAvailabilityID While debugging, I see that the org.hibernate.impl.SessionFactoryImpl is returning the "Assigned" identifierGenerator. This is horrible. I've specified the identifierGenerator as "Auto". Please see the above code. As a sidenote, I was trying to debug and seeing how the objects are getting retrieved from the database. Looks like the enrollmentgroupmembership records have the tierweight value populated. However if I look at the tierweight object, it doesn't have the enrollmentgroupmembership records. I'm puzzled. I think these two problems must be related. Maddy.

    Read the article

  • RichFaces Toolbargroup centering a group

    - by Jeremiah
    Hello there I am trying use a toolbar so that it has three parts part A is aligned left part B is aligned Center part C is aligned right both the right and left i can use the location attribute ... but since there is no center attribute i am not able to center part b. I can use a rich:spacer but this makes the toolbar rigid and when the screen size is reduced the toolbar gets overlapped ... is there any i can center this without the toolbar getting over lapped. Any suggestions or workarounds is welcome cheers

    Read the article

  • Using Nuxeo, how do I lock down a page so that it redirects to the login page if the user is unauthe

    - by Aaron Chambers
    I have been put on to a project using Nuxeo, late in it's lifecycle and need to change a few things before it goes live. I am having trouble finding out where I need to look to lock down a Nuxeo based application so that a user is redirected to the login page if they are unauthorised and access a restricted page. Can someone please shoot my some direction on where this sort of logic is kept or defined?

    Read the article

  • Unique constraint not created in JPA

    - by homaxto
    I have created the following entity bean, and specified two columns as being unique. Now my problem is that the table is created without the unique constraint, and no errors in the log. Does anyone have an idea? @Entity @Table(name = "cm_blockList", uniqueConstraints = @UniqueConstraint(columnNames = {"terminal", "blockType"})) public class BlockList { @Id @GeneratedValue(strategy = GenerationType.AUTO) private int id; @ManyToOne(cascade = CascadeType.PERSIST) @JoinColumn(name="terminal") private Terminal terminal; @Enumerated(EnumType.STRING) private BlockType blockType; private String regEx; }

    Read the article

  • JSR-299 (CDI) configuration at runtime

    - by nsn
    I need to configure different @Alternatives, @Decorators and @Injectors for different runtime environments (think testing, staging and production servers). Right now I use maven to create three wars, and the only difference between those wars are in the beans.xml files. Is there a better way to do this? I do have @Alternative @Stereotypes for the different environments, but even then I need to alter beans.xml, and they don't work for @Decorators (or do they?) Is it somehow possible to instruct CDI to ignore the values in beans.xml and use a custom configuration source? Because then I could for example read a system property or other environment variable. The application exclusively runs in containers that use Weld, so a weld-specific solution would be ok. I already tried to google this but can't seem to find good search terms, and I asked the Weld-Users-Forums, but to no avail. Someone over there suggested to write my own custom extension, but I can't find any API to actually change the container configuration at runtime. I think it would be possible to have some sort of @ApplicationScoped configuration bean and inject that into all @Decorators which could then decide themselves whether they should be active or not and then in order to configure @Alternatives write @Produces methods for every interface with multiple implementations and inject the config bean there too. But this seems to me like a lot of unnecessary work to essentially duplicate functionality already present in CDI?

    Read the article

  • bounce multiple servers using ant

    - by Angrezy
    Hi All, This is restart target code which is defined in build.xml target name="restart" propertycopy name="remote.host" from="deploy.${target.env}.host.${remote.id}" propertycopy name="remote.port" from="deploy.${target.env}.port.${remote.id}" sshexec trust="true" host="${remote.host}" port="${remote.port}" username="${scm.user}" keyfile="${scm.user.key}" command="sudo /usr/local/bin/bounce_jboss" target server information is defined in build.properties. The above code is working fine, but the restarting process is very late bcas its stopping-starting server one and later its stopping-starting another server, Is there a way where i can restart both servers parallely with a time frame of 45 seconds.

    Read the article

  • getResourceAsStream() is always returning null

    - by Andreas Grech
    I have the following structure in a Java Web Application: TheProject -- [Web Pages] -- -- [WEB-INF] -- -- -- abc.txt -- -- index.jsp -- [Source Packages] -- -- [wservices] -- -- -- WS.java In WS.java, I am using the following code in a Web Method: InputStream fstream = this.getClass().getResourceAsStream("abc.txt"); But it is always returning a null. I need to read from that file, and I read that if you put the files in WEB-INF, you can access them with getResourceAsStream, yet the method is always returning a null. Any ideas of what I may be doing wrong? Btw, the strange thing is that this was working, but after I performed a Clean and Build on the Project, it suddenly stopped working :/

    Read the article

  • Does it mean JVM Suspended?

    - by Joe.wang
    When my application run . I got a message says : Ping: Timed out waiting for signal from JVM. The JVM was launched with debug options so this may be because the JVM is currently suspended by a debugger. Any future timeouts during this JVM invocation will be silently ignored. What does that mean? It seems it will block any web request from outside? because when I upload a file to it, it failed. help me .

    Read the article

  • Java's getResourceAsStream() is always returning null

    - by Andreas Grech
    I have the following structure in a Java Web Application: TheProject -- [Web Pages] -- -- [WEB-INF] -- -- -- abc.txt -- -- index.jsp -- [Source Packages] -- -- [wservices] -- -- -- WS.java In WS.java, I am using the following code in a Web Method: InputStream fstream = this.getClass().getResourceAsStream("abc.txt"); But it is always returning a null. I need to read from that file, and I read that if you put the files in WEB-INF, you can access them with getResourceAsStream, yet the method is always returning a null. Any ideas of what I may be doing wrong?

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >